Realtime checkpoint - WIN32 and Configurable Realtime

Fixups to compile video on WIN32 and added more configurability
in the realtime screens, but still not the chart and video use-case
needs to be decided.
This commit is contained in:
Mark Liversedge
2011-04-10 18:03:21 +01:00
parent 26402f0c36
commit 21afde2d0b
11 changed files with 209 additions and 59 deletions

View File

@@ -55,6 +55,9 @@ DialWindow::DialWindow(MainWindow *mainWindow) :
// setup fontsize etc
resizeEvent(NULL);
// set to zero
telemetryUpdate(RealtimeData());
}
void
@@ -85,15 +88,38 @@ void
DialWindow::telemetryUpdate(RealtimeData rtData)
{
// we got some!
RealtimeData::DataSeries series = static_cast<RealtimeData::DataSeries>(seriesSelector->itemData(seriesSelector->currentIndex()).toInt());
RealtimeData::DataSeries series = static_cast<RealtimeData::DataSeries>
(seriesSelector->itemData(seriesSelector->currentIndex()).toInt());
double value = rtData.value(series);
valueLabel->setText(QString("%1").arg(round(value)));
switch (series) {
case RealtimeData::Time:
case RealtimeData::LapTime:
{
long msecs = value;
valueLabel->setText(QString("%1:%2:%3.%4").arg(msecs/3600000)
.arg((msecs%3600000)/60000,2,10,QLatin1Char('0'))
.arg((msecs%60000)/1000,2,10,QLatin1Char('0'))
.arg((msecs%1000)/100));
}
break;
default:
valueLabel->setText(QString("%1").arg(round(value)));
break;
}
}
void DialWindow::resizeEvent(QResizeEvent * )
{
if (geometry().height()-37 < 0) return;
QFont font;
font.setPointSize(geometry().height()/2);
font.setPointSize((geometry().height()-37));
font.setWeight(QFont::Bold);
valueLabel->setFont(font);
}