6 #include <QStringBuilder>
13 namespace swift::misc::aviation
16 : m_strobeOn(strobeOn), m_landingOn(landingOn), m_taxiOn(taxiOn), m_beaconOn(beaconOn), m_navOn(navOn),
21 bool recognition,
bool cabin)
22 : m_strobeOn(strobeOn), m_landingOn(landingOn), m_taxiOn(taxiOn), m_beaconOn(beaconOn), m_navOn(navOn),
23 m_logoOn(logoOn), m_recognitionOn(recognition), m_cabinOn(cabin)
27 bool recognition,
bool cabin,
bool wing)
28 : m_strobeOn(strobeOn), m_landingOn(landingOn), m_taxiOn(taxiOn), m_beaconOn(beaconOn), m_navOn(navOn),
29 m_logoOn(logoOn), m_recognitionOn(recognition), m_cabinOn(cabin), m_wingOn(wing)
34 return CAircraftLights {
true,
true,
true,
true,
true,
true,
true,
true,
true };
39 return CAircraftLights {
false,
false,
false,
false,
false,
false,
false,
false,
false };
85 case IndexIsNull: m_isNull = variant.
toBool();
break;
86 case IndexBeacon: m_beaconOn = variant.
toBool();
break;
87 case IndexLanding: m_landingOn = variant.
toBool();
break;
88 case IndexLogo: m_logoOn = variant.
toBool();
break;
89 case IndexNav: m_navOn = variant.
toBool();
break;
90 case IndexStrobe: m_strobeOn = variant.
toBool();
break;
91 case IndexTaxi: m_taxiOn = variant.
toBool();
break;
92 case IndexCabin: m_cabinOn = variant.
toBool();
break;
93 case IndexRecognition: m_recognitionOn = variant.
toBool();
break;
94 case IndexWing: m_wingOn = variant.
toBool();
break;
104 case IndexIsNull:
return Compare::compare(m_isNull, compareValue.
isNull());
105 case IndexBeacon:
return Compare::compare(m_beaconOn, compareValue.
isBeaconOn());
106 case IndexLanding:
return Compare::compare(m_landingOn, compareValue.
isLandingOn());
107 case IndexLogo:
return Compare::compare(m_logoOn, compareValue.
isLogoOn());
108 case IndexNav:
return Compare::compare(m_navOn, compareValue.
isNavOn());
109 case IndexStrobe:
return Compare::compare(m_strobeOn, compareValue.
isStrobeOn());
110 case IndexTaxi:
return Compare::compare(m_taxiOn, compareValue.
isTaxiOn());
111 case IndexCabin:
return Compare::compare(m_cabinOn, compareValue.
isCabinOn());
112 case IndexRecognition:
return Compare::compare(m_recognitionOn, compareValue.
isRecognitionOn());
113 case IndexWing:
return Compare::compare(m_wingOn, compareValue.
isWingOn());
128 m_recognitionOn =
true;
140 m_recognitionOn =
false;
Non-owning reference to a CPropertyIndex with a subset of its features.
CastType frontCasted() const
First element casted to given type, usually the PropertIndex enum.
bool isMyself() const
Myself index, used with nesting.
Value object encapsulating information about aircraft's lights.
static CAircraftLights allLightsOn()
Returns object with all lights switched on.
void setPropertyByIndex(CPropertyIndexRef index, const QVariant &variant)
Set property by index.
int comparePropertyByIndex(CPropertyIndexRef index, const CAircraftLights &compareValue) const
Compare by index.
bool isRecognitionOn() const
Recognition lights on?
QVariant propertyByIndex(CPropertyIndexRef index) const
Property by index.
CAircraftLights()=default
Default constructor.
bool isCabinOn() const
Cabin lights on?
bool isLandingOn() const
Landing lights on?
bool isBeaconOn() const
Beacon lights on?
static CAircraftLights allLightsOff()
Returns object with all lights switched off.
QString convertToQString(bool i18n=false) const
Cast as QString.
bool isNavOn() const
Nac lights on?
bool isWingOn() const
Wing light on?
ColumnIndex
Properties by index.
bool isLogoOn() const
Logo lights on?
bool isTaxiOn() const
Taxi lights on?
bool isStrobeOn() const
Strobes lights on?
void setPropertyByIndex(CPropertyIndexRef index, const QVariant &variant)
Set property by index.
QVariant propertyByIndex(CPropertyIndexRef index) const
Property by index.
SWIFT_MISC_EXPORT const QString & boolToYesNo(bool v)
Bool to yes/no.
QVariant fromValue(T &&value)
bool toBool() const const
#define SWIFT_DEFINE_VALUEOBJECT_MIXINS(Namespace, Class)
Explicit template definition of mixins for a CValueObject subclass.