Add Elevation Widget to Train Video Overlays (#3411)

* 1 - Add forceSquareRatio to MeterWidget
* 2 - Adjust default colors and add background text.
* 3 - Add Elevation widget, included in default layout visible only on slope mode.
Based on the work done by Vianney Voyer
Co-authored-by: Peter <pkanatselis@gmail.com>
This commit is contained in:
human705
2020-04-30 18:26:40 -04:00
committed by GitHub
parent a0add0bdc9
commit 05ee4f40da
5 changed files with 155 additions and 10 deletions

View File

@@ -47,7 +47,7 @@ void VideoLayoutParser::SetDefaultValues()
meterWidget->m_MainColor = QColor(255,0,0,200);
meterWidget->m_ScaleColor = QColor(255,255,255,200);
meterWidget->m_OutlineColor = QColor(100,100,100,200);
meterWidget->m_BackgroundColor = QColor(100,100,100,200);
meterWidget->m_BackgroundColor = QColor(100,100,100,0);
meterWidget->m_MainFont = QFont(meterWidget->font().family(), 64);
meterWidget->m_AltFont = QFont(meterWidget->font().family(), 48);
}
@@ -134,6 +134,10 @@ bool VideoLayoutParser::startElement( const QString&, const QString&,
{
meterWidget = new CircularBargraphMeterWidget(meterName, containerWidget, source);
}
else if (meterType == QString("Elevation"))
{
meterWidget = new ElevationMeterWidget(meterName, containerWidget, source);
}
else
{
qDebug() << QObject::tr("Error creating meter");