Ref T412, Ref T227, lists/parts improvements

* Ctor with timestamp
* detect/improved state detection (e.g. "takeoff")
* objects outside range
This commit is contained in:
Klaus Basan
2018-10-29 02:43:31 +01:00
parent 38bd626638
commit 2b51094b02
6 changed files with 72 additions and 17 deletions

View File

@@ -35,6 +35,13 @@ namespace BlackMisc
m_spoilersOut(spoilersOut), m_isOnGround(onGround)
{}
CAircraftParts::CAircraftParts(const CAircraftLights &lights, bool gearDown, int flapsPercent, bool spoilersOut, const CAircraftEngineList &engines, bool onGround, qint64 timestamp)
: m_lights(lights), m_engines(engines), m_flapsPercentage(flapsPercent), m_gearDown(gearDown),
m_spoilersOut(spoilersOut), m_isOnGround(onGround)
{
this->setMSecsSinceEpoch(timestamp);
}
QString CAircraftParts::convertToQString(bool i18n) const
{
return QStringLiteral("ts: ") % this->getFormattedTimestampAndOffset(true) %