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_recognition(recognition), m_cabin(cabin)
28 return CAircraftLights {
true,
true,
true,
true,
true,
true,
true,
true };
33 return CAircraftLights {
false,
false,
false,
false,
false,
false,
false,
false };
48 if (index.
isMyself()) {
return QVariant::fromValue(*
this); }
53 case IndexIsNull:
return QVariant::fromValue(this->
isNull());
54 case IndexBeacon:
return QVariant::fromValue(m_beaconOn);
55 case IndexLanding:
return QVariant::fromValue(m_landingOn);
56 case IndexLogo:
return QVariant::fromValue(m_logoOn);
57 case IndexNav:
return QVariant::fromValue(m_navOn);
58 case IndexStrobe:
return QVariant::fromValue(m_strobeOn);
59 case IndexTaxi:
return QVariant::fromValue(m_taxiOn);
60 case IndexRecognition:
return QVariant::fromValue(m_recognition);
61 case IndexCabin:
return QVariant::fromValue(m_cabin);
77 case IndexIsNull: m_isNull = variant.toBool();
break;
78 case IndexBeacon: m_beaconOn = variant.toBool();
break;
79 case IndexLanding: m_landingOn = variant.toBool();
break;
80 case IndexLogo: m_logoOn = variant.toBool();
break;
81 case IndexNav: m_navOn = variant.toBool();
break;
82 case IndexStrobe: m_strobeOn = variant.toBool();
break;
83 case IndexTaxi: m_taxiOn = variant.toBool();
break;
84 case IndexCabin: m_cabin = variant.toBool();
break;
85 case IndexRecognition: m_recognition = variant.toBool();
break;
95 case IndexIsNull:
return Compare::compare(m_isNull, compareValue.
isNull());
96 case IndexBeacon:
return Compare::compare(m_beaconOn, compareValue.
isBeaconOn());
97 case IndexLanding:
return Compare::compare(m_landingOn, compareValue.
isLandingOn());
98 case IndexLogo:
return Compare::compare(m_logoOn, compareValue.
isLogoOn());
99 case IndexNav:
return Compare::compare(m_navOn, compareValue.
isNavOn());
100 case IndexStrobe:
return Compare::compare(m_strobeOn, compareValue.
isStrobeOn());
101 case IndexTaxi:
return Compare::compare(m_taxiOn, compareValue.
isTaxiOn());
102 case IndexCabin:
return Compare::compare(m_cabin, compareValue.
isCabinOn());
103 case IndexRecognition:
return Compare::compare(m_recognition, compareValue.
isRecognitionOn());
118 m_recognition =
true;
129 m_recognition =
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?
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.
#define SWIFT_DEFINE_VALUEOBJECT_MIXINS(Namespace, Class)
Explicit template definition of mixins for a CValueObject subclass.