|
swift
|
Simple hardcoded info about the corresponding simulator. More...
#include <simulatorinfo.h>
Public Types | |
| enum | SimulatorFlag { None = 0 , FSX_DEPRECATED = 1 << 0 , FS9_DEPRECATED = 1 << 1 , XPLANE = 1 << 2 , P3D = 1 << 3 , FG = 1 << 4 , MSFS = 1 << 5 , MSFS2024 = 1 << 6 , AllFsFamily = P3D | MSFS | MSFS2024 , All = XPLANE | P3D | FG | MSFS | MSFS2024 } |
| Simulator. More... | |
| Public Types inherited from swift::misc::CValueObject< CSimulatorInfo > | |
| using | base_type |
| Base class. | |
| Public Types inherited from swift::misc::CEmpty | |
| using | base_type = CEmpty |
| Base class is alias of itself. | |
| Public Types inherited from swift::misc::mixin::Index< CSimulatorInfo > | |
| enum | ColumnIndex |
| Base class enums. More... | |
Public Member Functions | |
| CSimulatorInfo ()=default | |
| Default constructor. | |
| CSimulatorInfo (const QString &identifierString) | |
| Constructor. | |
| CSimulatorInfo (const QStringList &simulators) | |
| Constructor. | |
| CSimulatorInfo (Simulator s) | |
| Constructor. | |
| CSimulatorInfo (int flagsAsInt) | |
| Constructor. | |
| CSimulatorInfo (bool xp, bool isP3D, bool fg, bool msfs, bool msfs2024) | |
| Constructor. | |
| bool | isUnspecified () const |
| Unspecified simulator. | |
| bool | isXPlane () const |
| XPlane. | |
| bool | isP3D () const |
| P3D? | |
| bool | isFG () const |
| FG? | |
| bool | isMSFS () const |
| MSFS? | |
| bool | isMSFS2024 () const |
| MSFS2024? | |
| bool | isAnySimulator () const |
| Any simulator? | |
| bool | isSingleSimulator () const |
| Single simulator selected. | |
| bool | isNoSimulator () const |
| No simulator? | |
| bool | isMultipleSimulators () const |
| Represents > 1 simulator. | |
| bool | isAllSimulators () const |
| Is all simulators? | |
| bool | isMicrosoftSimulator () const |
| Microsoft Simulator? | |
| bool | isMicrosoftOrPrepare3DSimulator () const |
| Microsoft Simulator or P3D? | |
| bool | isFsxP3DFamily () const |
| FSX family, i.e. FSX or P3D? | |
| int | numberSimulators () const |
| Number simulators selected. | |
| bool | matchesAll (const CSimulatorInfo &otherInfo) const |
| Matches all simulators. | |
| bool | matchesAny (const CSimulatorInfo &otherInfo) const |
| Matches any simulator. | |
| bool | matchesAnyOrNone (const CSimulatorInfo &otherInfo) const |
| Matches any simulator or None (NULL). | |
| Simulator | getSimulator () const |
| Simulator. | |
| void | setSimulator (Simulator s) |
| Simulator. | |
| void | addSimulator (Simulator s) |
| Add simulator flags. | |
| void | addSimulator (const CSimulatorInfo &simulatorInfo) |
| Add simulator. | |
| void | setAllSimulators () |
| All simulators. | |
| int | comparePropertyByIndex (CPropertyIndexRef index, const CSimulatorInfo &compareValue) const |
| Cast as QString. | |
| QString | convertToQString (bool i18n=false) const |
| Cast as QString. | |
| CIcons::IconIndex | toIcon () const |
| As icon, not implemented by all classes. | |
| CSimulatorInfo | add (const CSimulatorInfo &other) |
| Add simulator. | |
| QSet< CSimulatorInfo > | asSingleSimulatorSet () const |
| As a set of single simulator info objects. | |
| void | invertSimulators () |
| All simulators selected become unselected and vice versa. | |
| CStatusMessage | validateSimulatorsForModel () const |
| Validate simulators for an aircraft model. | |
| Public Member Functions inherited from swift::misc::mixin::MetaType< CSimulatorInfo > | |
| int | getMetaTypeId () const |
| Returns the Qt meta type ID of this object. | |
| QString | getClassName () const |
| Class name. | |
| bool | isA (int metaTypeId) const |
| Returns true if this object is an instance of the class with the given meta type ID, or one of its subclasses. | |
| Public Member Functions inherited from swift::misc::mixin::DBusByMetaClass< CSimulatorInfo > | |
| void | marshallToDbus (QDBusArgument &arg, Tags...) const |
| Marshall without begin/endStructure, for when composed within another object. | |
| void | unmarshallFromDbus (const QDBusArgument &arg, Tags...) |
| Unmarshall without begin/endStructure, for when composed within another object. | |
| Public Member Functions inherited from swift::misc::mixin::DataStreamByMetaClass< CSimulatorInfo > | |
| void | marshalToDataStream (QDataStream &stream) const |
| Marshal a value to a QDataStream. | |
| void | unmarshalFromDataStream (QDataStream &stream) |
| Unmarshal a value from a QDataStream. | |
| Public Member Functions inherited from swift::misc::mixin::JsonByMetaClass< CSimulatorInfo > | |
| QJsonObject | toJson () const |
| Cast to JSON object. | |
| QString | toJsonString (QJsonDocument::JsonFormat format=QJsonDocument::Indented) const |
| Convenience function JSON as string. | |
| void | convertFromJson (const QJsonObject &json) |
| Assign from JSON object. | |
| Public Member Functions inherited from swift::misc::mixin::String< CSimulatorInfo > | |
| QString | toQString (bool i18n=false) const |
| Cast as QString. | |
| std::string | toStdString (bool i18n=false) const |
| To std string. | |
| QString | stringForStreaming () const |
| String for streaming operators. | |
| Public Member Functions inherited from swift::misc::mixin::Index< CSimulatorInfo > | |
| CPropertyIndexList | apply (const CPropertyIndexVariantMap &indexMap, bool skipEqualValues=false) |
| Update by variant map. | |
| void | setPropertyByIndex (CPropertyIndexRef index, const QVariant &variant) |
| Set property by index. | |
| QVariant | propertyByIndex (CPropertyIndexRef index) const |
| Property by index. | |
| int | comparePropertyByIndex (CPropertyIndexRef index, const CSimulatorInfo &compareValue) const |
| Compare for index. | |
| bool | equalsPropertyByIndex (const QVariant &compareValue, CPropertyIndexRef index) const |
| Is given variant equal to value of property index? | |
| Public Member Functions inherited from swift::misc::mixin::Icon< CSimulatorInfo > | |
| CIcons::CIcons::StandardIconUnknown16 | toIcon () const |
| As icon, not implemented by all classes. | |
Static Public Member Functions | |
| static Simulator | boolToFlag (bool xp, bool isP3D, bool fg, bool msfs, bool msfs2024) |
| Bool flags to enum. | |
| static Simulator | identifierToSimulator (const QString &identifier) |
| Identifer, as provided by plugin. | |
| static const CSimulatorInfo & | allSimulators () |
| All simulators. | |
| static const QStringList & | allSimulatorStrings () |
| All simulator strings. | |
| static const QSet< CSimulatorInfo > & | allSimulatorsSet () |
| All simulators as set. | |
| static const CSimulatorInfo & | allFsFamilySimulators () |
| All simulators of the FS family (P3D FSX, FS9). | |
| static CSimulatorInfo | getLocallyInstalledSimulators () |
| Locally installed simulators. | |
| static const CSimulatorInfo & | guessDefaultSimulator () |
| Guess a default simulator based on installation. | |
| static CSimulatorInfo | fromDatabaseJson (const QJsonObject &json, const QString &prefix) |
| From database JSON. | |
| static const CSimulatorInfo & | fg () |
| Const simulator info objects. | |
| static const CSimulatorInfo & | p3d () |
| Const simulator info objects. | |
| static const CSimulatorInfo & | xplane () |
| Const simulator info objects. | |
| static const CSimulatorInfo & | msfs () |
| Const simulator info objects. | |
| static const CSimulatorInfo & | msfs2024 () |
| Const simulator info objects. | |
| Static Public Member Functions inherited from swift::misc::mixin::MetaType< CSimulatorInfo > | |
| static void | registerMetadata () |
| Register metadata. | |
| Static Public Member Functions inherited from swift::misc::mixin::JsonByMetaClass< CSimulatorInfo > | |
| static DerivedObj | fromJson (const QJsonObject &json) |
| Get object from QJsonObject. | |
| static DerivedObj | fromJsonNoThrow (const QString &jsonString, bool acceptCacheJson, bool &success, QString &errMsg) |
| Get object from JSON string. | |
Static Public Attributes | |
| static constexpr int | NumberOfSimulators = 7 |
| Number of known individual simulators. | |
Additional Inherited Members | |
| Protected Member Functions inherited from swift::misc::CValueObject< CSimulatorInfo > | |
| CEmpty ()=default | |
| Inheriting constructors. | |
| CEmpty (const CEmpty &)=default | |
| Inheriting constructors. | |
| CValueObject ()=default | |
| Default constructor. | |
| CValueObject & | operator= (const CValueObject &)=default |
| Copy assignment operator. | |
| ~CValueObject ()=default | |
| Destructor. | |
| Protected Member Functions inherited from swift::misc::CEmpty | |
| CEmpty ()=default | |
| Protected default constructor. | |
| CEmpty (const CEmpty &)=default | |
| Protected copy constructor. | |
| CEmpty & | operator= (const CEmpty &)=default |
| Protected copy assignment operator. | |
| ~CEmpty ()=default | |
| Non-virtual protected destructor. | |
Simple hardcoded info about the corresponding simulator.
If someone manages to remove this hardcoded simulator information and makes it entirely flexible based upon the plugin metadata feel free.
Definition at line 40 of file simulatorinfo.h.
Simulator.
Definition at line 44 of file simulatorinfo.h.
| swift::misc::simulation::CSimulatorInfo::CSimulatorInfo | ( | const QString & | identifierString | ) |
Constructor.
Definition at line 30 of file simulatorinfo.cpp.
| swift::misc::simulation::CSimulatorInfo::CSimulatorInfo | ( | const QStringList & | simulators | ) |
Constructor.
Definition at line 34 of file simulatorinfo.cpp.
| swift::misc::simulation::CSimulatorInfo::CSimulatorInfo | ( | Simulator | s | ) |
Constructor.
Definition at line 40 of file simulatorinfo.cpp.
| swift::misc::simulation::CSimulatorInfo::CSimulatorInfo | ( | int | flagsAsInt | ) |
Constructor.
Definition at line 46 of file simulatorinfo.cpp.
| swift::misc::simulation::CSimulatorInfo::CSimulatorInfo | ( | bool | xp, |
| bool | isP3D, | ||
| bool | fg, | ||
| bool | msfs, | ||
| bool | msfs2024 ) |
Constructor.
Definition at line 42 of file simulatorinfo.cpp.
| CSimulatorInfo swift::misc::simulation::CSimulatorInfo::add | ( | const CSimulatorInfo & | other | ) |
Add simulator.
Definition at line 137 of file simulatorinfo.cpp.
|
inline |
Add simulator.
Definition at line 145 of file simulatorinfo.h.
|
inline |
Add simulator flags.
Definition at line 142 of file simulatorinfo.h.
|
static |
All simulators of the FS family (P3D FSX, FS9).
Definition at line 289 of file simulatorinfo.cpp.
|
static |
All simulators.
Definition at line 263 of file simulatorinfo.cpp.
|
static |
All simulators as set.
Definition at line 283 of file simulatorinfo.cpp.
|
static |
All simulator strings.
Definition at line 269 of file simulatorinfo.cpp.
| QSet< CSimulatorInfo > swift::misc::simulation::CSimulatorInfo::asSingleSimulatorSet | ( | ) | const |
As a set of single simulator info objects.
Definition at line 154 of file simulatorinfo.cpp.
|
static |
Bool flags to enum.
Definition at line 207 of file simulatorinfo.cpp.
| int swift::misc::simulation::CSimulatorInfo::comparePropertyByIndex | ( | CPropertyIndexRef | index, |
| const CSimulatorInfo & | compareValue ) const |
Cast as QString.
Definition at line 117 of file simulatorinfo.cpp.
| QString swift::misc::simulation::CSimulatorInfo::convertToQString | ( | bool | i18n = false | ) | const |
Cast as QString.
Definition at line 123 of file simulatorinfo.cpp.
|
inlinestatic |
Const simulator info objects.
Definition at line 200 of file simulatorinfo.h.
|
static |
From database JSON.
Definition at line 340 of file simulatorinfo.cpp.
|
static |
Locally installed simulators.
Definition at line 295 of file simulatorinfo.cpp.
|
inline |
Simulator.
Definition at line 136 of file simulatorinfo.h.
|
static |
Guess a default simulator based on installation.
Definition at line 334 of file simulatorinfo.cpp.
|
static |
Identifer, as provided by plugin.
Definition at line 229 of file simulatorinfo.cpp.
| void swift::misc::simulation::CSimulatorInfo::invertSimulators | ( | ) |
All simulators selected become unselected and vice versa.
Definition at line 180 of file simulatorinfo.cpp.
| bool swift::misc::simulation::CSimulatorInfo::isAllSimulators | ( | ) | const |
Is all simulators?
Definition at line 68 of file simulatorinfo.cpp.
| bool swift::misc::simulation::CSimulatorInfo::isAnySimulator | ( | ) | const |
Any simulator?
Definition at line 60 of file simulatorinfo.cpp.
| bool swift::misc::simulation::CSimulatorInfo::isFG | ( | ) | const |
FG?
Definition at line 54 of file simulatorinfo.cpp.
| bool swift::misc::simulation::CSimulatorInfo::isFsxP3DFamily | ( | ) | const |
Definition at line 74 of file simulatorinfo.cpp.
| bool swift::misc::simulation::CSimulatorInfo::isMicrosoftOrPrepare3DSimulator | ( | ) | const |
Microsoft Simulator or P3D?
Definition at line 72 of file simulatorinfo.cpp.
| bool swift::misc::simulation::CSimulatorInfo::isMicrosoftSimulator | ( | ) | const |
Microsoft Simulator?
Definition at line 70 of file simulatorinfo.cpp.
| bool swift::misc::simulation::CSimulatorInfo::isMSFS | ( | ) | const |
MSFS?
Definition at line 56 of file simulatorinfo.cpp.
| bool swift::misc::simulation::CSimulatorInfo::isMSFS2024 | ( | ) | const |
MSFS2024?
Definition at line 58 of file simulatorinfo.cpp.
| bool swift::misc::simulation::CSimulatorInfo::isMultipleSimulators | ( | ) | const |
Represents > 1 simulator.
Definition at line 66 of file simulatorinfo.cpp.
| bool swift::misc::simulation::CSimulatorInfo::isNoSimulator | ( | ) | const |
No simulator?
Definition at line 64 of file simulatorinfo.cpp.
| bool swift::misc::simulation::CSimulatorInfo::isP3D | ( | ) | const |
P3D?
Definition at line 52 of file simulatorinfo.cpp.
| bool swift::misc::simulation::CSimulatorInfo::isSingleSimulator | ( | ) | const |
Single simulator selected.
Definition at line 62 of file simulatorinfo.cpp.
| bool swift::misc::simulation::CSimulatorInfo::isUnspecified | ( | ) | const |
Unspecified simulator.
Definition at line 48 of file simulatorinfo.cpp.
| bool swift::misc::simulation::CSimulatorInfo::isXPlane | ( | ) | const |
XPlane.
Definition at line 50 of file simulatorinfo.cpp.
| bool swift::misc::simulation::CSimulatorInfo::matchesAll | ( | const CSimulatorInfo & | otherInfo | ) | const |
Matches all simulators.
Definition at line 98 of file simulatorinfo.cpp.
| bool swift::misc::simulation::CSimulatorInfo::matchesAny | ( | const CSimulatorInfo & | otherInfo | ) | const |
Matches any simulator.
Definition at line 103 of file simulatorinfo.cpp.
| bool swift::misc::simulation::CSimulatorInfo::matchesAnyOrNone | ( | const CSimulatorInfo & | otherInfo | ) | const |
Matches any simulator or None (NULL).
Definition at line 108 of file simulatorinfo.cpp.
|
inlinestatic |
Const simulator info objects.
Definition at line 215 of file simulatorinfo.h.
|
inlinestatic |
Const simulator info objects.
Definition at line 220 of file simulatorinfo.h.
| int swift::misc::simulation::CSimulatorInfo::numberSimulators | ( | ) | const |
Number simulators selected.
Definition at line 76 of file simulatorinfo.cpp.
|
inlinestatic |
Const simulator info objects.
Definition at line 205 of file simulatorinfo.h.
|
inline |
All simulators.
Definition at line 148 of file simulatorinfo.h.
|
inline |
Simulator.
Definition at line 139 of file simulatorinfo.h.
| CIcons::IconIndex swift::misc::simulation::CSimulatorInfo::toIcon | ( | ) | const |
As icon, not implemented by all classes.
Definition at line 135 of file simulatorinfo.cpp.
| CStatusMessage swift::misc::simulation::CSimulatorInfo::validateSimulatorsForModel | ( | ) | const |
Validate simulators for an aircraft model.
Definition at line 185 of file simulatorinfo.cpp.
|
inlinestatic |
Const simulator info objects.
Definition at line 210 of file simulatorinfo.h.
|
staticconstexpr |
Number of known individual simulators.
Definition at line 60 of file simulatorinfo.h.