4VehicleClockFactGroup::VehicleClockFactGroup(QObject *parent)
5 :
FactGroup(1000, QStringLiteral(
":/json/Vehicle/ClockFact.json"), parent)
7 _addFact(&_currentTimeFact);
8 _addFact(&_currentUTCTimeFact);
9 _addFact(&_currentDateFact);
11 _currentTimeFact.setRawValue(QTime().toString());
12 _currentUTCTimeFact.setRawValue(std::numeric_limits<float>::quiet_NaN());
13 _currentDateFact.setRawValue(std::numeric_limits<float>::quiet_NaN());
16void VehicleClockFactGroup::_updateAllValues()
18 currentTime()->setRawValue(QTime::currentTime().toString());
19 currentUTCTime()->setRawValue(QDateTime::currentDateTimeUtc().time().toString());
20 currentDate()->setRawValue(QDateTime::currentDateTime().toString(
qgcApp()->getCurrentLanguage().dateFormat(QLocale::ShortFormat)));
Used to group Facts together into an object hierarachy.
virtual void _updateAllValues()
void _setTelemetryAvailable(bool telemetryAvailable)