mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-03 15:45:46 +08:00
refs #873, added cabin and recognition light plus anyEngineOn
This commit is contained in:
committed by
Mathew Sutcliffe
parent
e3ab9d08c3
commit
b6ac5cbb45
@@ -22,24 +22,31 @@ namespace BlackMisc
|
||||
: m_strobeOn(strobeOn), m_landingOn(landingOn), m_taxiOn(taxiOn), m_beaconOn(beaconOn), m_navOn(navOn), m_logoOn(logoOn)
|
||||
{ }
|
||||
|
||||
CAircraftLights::CAircraftLights(bool strobeOn, bool landingOn, bool taxiOn, bool beaconOn, bool navOn, bool logoOn, bool recognition, bool cabin)
|
||||
: m_strobeOn(strobeOn), m_landingOn(landingOn), m_taxiOn(taxiOn), m_beaconOn(beaconOn), m_navOn(navOn), m_logoOn(logoOn), m_recognition(recognition), m_cabin(cabin)
|
||||
{ }
|
||||
|
||||
CAircraftLights CAircraftLights::allLightsOn()
|
||||
{
|
||||
return CAircraftLights {true, true, true, true, true, true};
|
||||
return CAircraftLights {true, true, true, true, true, true, true, true};
|
||||
}
|
||||
|
||||
CAircraftLights CAircraftLights::allLightsOff()
|
||||
{
|
||||
return CAircraftLights {false, false, false, false, false, false};
|
||||
return CAircraftLights {false, false, false, false, false, false, false, false};
|
||||
}
|
||||
|
||||
QString CAircraftLights::convertToQString(bool /** i18n */) const
|
||||
QString CAircraftLights::convertToQString(bool i18n) const
|
||||
{
|
||||
Q_UNUSED(i18n);
|
||||
const QString s = QLatin1Literal("strobe: ") % boolToYesNo(m_strobeOn) %
|
||||
QLatin1Literal(" landing: ") % boolToYesNo(m_landingOn) %
|
||||
QLatin1Literal(" taxi: ") % boolToYesNo(m_taxiOn) %
|
||||
QLatin1Literal(" beacon: ") % boolToYesNo(m_beaconOn) %
|
||||
QLatin1Literal(" nav: ") % boolToYesNo(m_navOn) %
|
||||
QLatin1Literal(" logo: ") % boolToYesNo(m_logoOn);
|
||||
QLatin1Literal(" logo: ") % boolToYesNo(m_logoOn) %
|
||||
QLatin1Literal(" recognition: ") % boolToYesNo(m_recognition) %
|
||||
QLatin1Literal(" cabin: ") % boolToYesNo(m_cabin);
|
||||
return s;
|
||||
}
|
||||
|
||||
@@ -63,6 +70,10 @@ namespace BlackMisc
|
||||
return CVariant::from(m_strobeOn);
|
||||
case IndexTaxi:
|
||||
return CVariant::from(m_taxiOn);
|
||||
case IndexRecognition:
|
||||
return CVariant::from(m_recognition);
|
||||
case IndexCabin:
|
||||
return CVariant::from(m_cabin);
|
||||
default:
|
||||
return CValueObject::propertyByIndex(index);
|
||||
}
|
||||
@@ -94,6 +105,12 @@ namespace BlackMisc
|
||||
case IndexTaxi:
|
||||
this->m_taxiOn = variant.toBool();
|
||||
break;
|
||||
case IndexCabin:
|
||||
this->m_cabin = variant.toBool();
|
||||
break;
|
||||
case IndexRecognition:
|
||||
this->m_recognition = variant.toBool();
|
||||
break;
|
||||
default:
|
||||
CValueObject::setPropertyByIndex(index, variant);
|
||||
break;
|
||||
@@ -108,6 +125,8 @@ namespace BlackMisc
|
||||
m_navOn = true;
|
||||
m_strobeOn = true;
|
||||
m_taxiOn = true;
|
||||
m_cabin = true;
|
||||
m_recognition = true;
|
||||
}
|
||||
|
||||
void CAircraftLights::setAllOff()
|
||||
@@ -118,6 +137,8 @@ namespace BlackMisc
|
||||
m_navOn = false;
|
||||
m_strobeOn = false;
|
||||
m_taxiOn = false;
|
||||
m_recognition = false;
|
||||
m_cabin = false;
|
||||
}
|
||||
} // namespace
|
||||
} // namespace
|
||||
|
||||
Reference in New Issue
Block a user