6 #ifndef SWIFT_MISC_SIMULATION_SIMULATORINFO_H
7 #define SWIFT_MISC_SIMULATION_SIMULATORINFO_H
11 #include <QJsonObject>
16 #include <QStringList>
26 namespace swift::misc::simulation
47 FSX_DEPRECATED = 1 << 0,
48 FS9_DEPRECATED = 1 << 1,
54 AllFsFamily = P3D | MSFS | MSFS2024,
55 All = XPLANE | P3D | FG | MSFS | MSFS2024
57 Q_DECLARE_FLAGS(Simulator, SimulatorFlag)
60 static constexpr
int NumberOfSimulators = 7;
78 CSimulatorInfo(
bool xp,
bool isP3D,
bool fg,
bool msfs,
bool msfs2024);
81 bool isUnspecified() const;
84 bool isXPlane() const;
96 bool isMSFS2024() const;
99 bool isAnySimulator() const;
102 bool isSingleSimulator() const;
105 bool isNoSimulator() const;
108 bool isMultipleSimulators() const;
111 bool isAllSimulators() const;
114 bool isMicrosoftSimulator() const;
117 bool isMicrosoftOrPrepare3DSimulator() const;
120 bool isFsxP3DFamily() const;
123 int numberSimulators() const;
136 Simulator getSimulator()
const {
return static_cast<Simulator
>(m_simulator); }
154 QString convertToQString(
bool i18n =
false)
const;
166 void invertSimulators();
172 static Simulator boolToFlag(
bool xp,
bool isP3D,
bool fg,
bool msfs,
bool msfs2024);
175 static Simulator identifierToSimulator(
const QString &identifier);
228 int m_simulator =
static_cast<int>(None);
246 int getCountForUnknownSimulators()
const;
249 int getCountForFsFamilySimulators()
const;
252 int getCountForFsxFamilySimulators()
const;
261 int getMaximum()
const;
264 int getMinimum()
const;
267 int simulatorsRepresented()
const;
284 Q_DECLARE_OPERATORS_FOR_FLAGS(swift::misc::simulation::CSimulatorInfo::Simulator)
IconIndex
Index for each icon, allows to send them via DBus, efficiently store them, etc.
Non-owning reference to a CPropertyIndex with a subset of its features.
Streamable status message, e.g.
Mix of the most commonly used mixin classes.
Count per simulator, small utility class allows to retrieve values as per simulator.
Simple hardcoded info about the corresponding simulator.
void addSimulator(Simulator s)
Add simulator flags.
void addSimulator(const CSimulatorInfo &simulatorInfo)
Add simulator.
Simulator getSimulator() const
Simulator.
static const CSimulatorInfo & msfs()
Const simulator info objects.
static const CSimulatorInfo & p3d()
Const simulator info objects.
static const CSimulatorInfo & xplane()
Const simulator info objects.
static const CSimulatorInfo & msfs2024()
Const simulator info objects.
void setSimulator(Simulator s)
Simulator.
void setAllSimulators()
All simulators.
static const CSimulatorInfo & fg()
Const simulator info objects.
#define SWIFT_MISC_EXPORT
Export a class or function from the library.
#define SWIFT_DECLARE_VALUEOBJECT_MIXINS(Namespace, Class)
Explicit template declaration of mixins for a CValueObject subclass to be placed near the top of the ...