swift
|
Simple hardcoded info about the corresponding simulator. More...
Public Types | |
enum | SimulatorFlag { None = 0 , FSX = 1 << 0 , FS9 = 1 << 1 , XPLANE = 1 << 2 , P3D = 1 << 3 , FG = 1 << 4 , MSFS = 1 << 5 , MSFS2024 = 1 << 6 , FSX_P3D = FSX | P3D , AllFsFamily = FSX | FS9 | P3D | MSFS | MSFS2024 , All = FSX | FS9 | XPLANE | P3D | FG | MSFS | MSFS2024 } |
Simulator. | |
![]() | |
using | base_type = CEmpty |
Base class. | |
![]() | |
using | base_type = CEmpty |
Base class is alias of itself. | |
![]() | |
enum | ColumnIndex { IndexPixmap = 10 , IndexIcon , IndexString } |
Base class enums. | |
Public Member Functions | |
CSimulatorInfo () | |
Default constructor. | |
CSimulatorInfo (const QString &identifierString) | |
Constructor. | |
CSimulatorInfo (const QStringList &simulators) | |
Constructor. | |
CSimulatorInfo (Simulator s) | |
Constructor. | |
CSimulatorInfo (int flagsAsInt) | |
Constructor. | |
CSimulatorInfo (bool isFSX, bool isFS9, bool xp, bool isP3D, bool fg, bool msfs, bool msfs2024) | |
Constructor. | |
bool | isUnspecified () const |
Unspecified simulator. | |
bool | isFSX () const |
FSX? | |
bool | isFS9 () const |
FS9? | |
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) More... | |
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. More... | |
QString | convertToQString (bool i18n=false) const |
Cast as QString. More... | |
CIcons::IconIndex | toIcon () const |
As icon, not implemented by all classes. More... | |
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. | |
![]() | |
int | getMetaTypeId () const |
Returns the Qt meta type ID of this object. More... | |
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. | |
![]() | |
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. | |
![]() | |
void | marshalToDataStream (QDataStream &stream) const |
Marshal a value to a QDataStream. | |
void | unmarshalFromDataStream (QDataStream &stream) |
Unmarshal a value from a QDataStream. | |
![]() | |
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. | |
void | convertFromJson (const QString &jsonString, bool acceptCacheFormat=false) |
Assign from JSON object string. | |
![]() | |
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. | |
![]() | |
CPropertyIndexList | apply (const CPropertyIndexVariantMap &indexMap, bool skipEqualValues=false) |
Update by variant map. More... | |
void | setPropertyByIndex (CPropertyIndexRef index, const QVariant &variant) |
Set property by index. | |
QVariant | propertyByIndex (CPropertyIndexRef index) const |
Property by index. | |
int | comparePropertyByIndex (CPropertyIndexRef index, const Derived &compareValue) const |
Compare for index. | |
bool | equalsPropertyByIndex (const QVariant &compareValue, CPropertyIndexRef index) const |
Is given variant equal to value of property index? | |
![]() | |
CIcons::IconIndex | toIcon () const |
As icon, not implemented by all classes. | |
Static Public Member Functions | |
static Simulator | boolToFlag (bool isFSX, bool isFS9, 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 & | fsx () |
Const simulator info objects. | |
static const CSimulatorInfo & | p3d () |
Const simulator info objects. | |
static const CSimulatorInfo & | fs9 () |
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 void | registerMetadata () |
Register metadata. | |
![]() | |
template<class DerivedObj = Derived> | |
static DerivedObj | fromJson (const QJsonObject &json) |
Get object from QJsonObject. | |
template<class DerivedObj = Derived> | |
static DerivedObj | fromJson (const QString &jsonString, bool acceptCacheJson=false) |
Get object from JSON string. | |
template<class DerivedObj = Derived> | |
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 | |
![]() | |
CValueObject ()=default | |
Default constructor. | |
CValueObject (const CValueObject &)=default | |
Copy constructor. | |
CValueObject & | operator= (const CValueObject &)=default |
Copy assignment operator. | |
~CValueObject ()=default | |
Destructor. | |
CEmpty ()=default | |
Inheriting constructors. | |
CEmpty (const CEmpty &)=default | |
Inheriting constructors. | |
![]() | |
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.
int swift::misc::simulation::CSimulatorInfo::comparePropertyByIndex | ( | CPropertyIndexRef | index, |
const CSimulatorInfo & | compareValue | ||
) | const |
Cast as QString.
Definition at line 116 of file simulatorinfo.cpp.
QString swift::misc::simulation::CSimulatorInfo::convertToQString | ( | bool | i18n = false | ) | const |
Cast as QString.
Definition at line 122 of file simulatorinfo.cpp.
bool swift::misc::simulation::CSimulatorInfo::matchesAnyOrNone | ( | const CSimulatorInfo & | otherInfo | ) | const |
Matches any simulator or None (NULL)
Definition at line 110 of file simulatorinfo.cpp.
CIcons::IconIndex swift::misc::simulation::CSimulatorInfo::toIcon | ( | ) | const |
As icon, not implemented by all classes.
Definition at line 136 of file simulatorinfo.cpp.