6#ifndef SWIFT_MISC_SIMULATION_SIMULATORINFO_H
7#define SWIFT_MISC_SIMULATION_SIMULATORINFO_H
26namespace 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)
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);
284Q_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.
QString toQString() const
As QString.
void setCount(int count, const CSimulatorInfo &simulator)
Set count.
CCountPerSimulator()
Constructor.
int getCountForFsxFamilySimulators() const
P3D, MSFS or FSX.
int getMinimum() const
Minimum.
void increaseSimulatorCounts(const CSimulatorInfo &simulator)
Increase all simulators given here.
int simulatorsRepresented() const
Number of simulators with count > 0.
int getMaximum() const
Maximum.
int getCount(const CSimulatorInfo &simulator) const
Object count for given simulator.
int getCountForUnknownSimulators() const
Unknown count.
QMultiMap< int, CSimulatorInfo > countPerSimulator() const
Sorted (ascending) per simulator.
int getCountForFsFamilySimulators() const
P3D, FSX, MSFS or FS9.
Simple hardcoded info about the corresponding simulator.
bool isAllSimulators() const
Is all simulators?
void addSimulator(Simulator s)
Add simulator flags.
static const CSimulatorInfo & msfs()
Const simulator info objects.
static const CSimulatorInfo & xplane()
Const simulator info objects.
static const CSimulatorInfo & p3d()
Const simulator info objects.
void addSimulator(const CSimulatorInfo &simulatorInfo)
Add simulator.
static const CSimulatorInfo & fg()
Const simulator info objects.
bool matchesAll(const CSimulatorInfo &otherInfo) const
Matches all simulators.
bool isMSFS2024() const
MSFS2024?
bool isSingleSimulator() const
Single simulator selected.
bool isNoSimulator() const
No simulator?
bool isMultipleSimulators() const
Represents > 1 simulator.
CSimulatorInfo()=default
Default constructor.
static const CSimulatorInfo & msfs2024()
Const simulator info objects.
bool matchesAny(const CSimulatorInfo &otherInfo) const
Matches any simulator.
bool isUnspecified() const
Unspecified simulator.
Simulator getSimulator() const
Simulator.
bool isMicrosoftSimulator() const
Microsoft Simulator?
bool isFsxP3DFamily() const
FSX family, i.e. FSX or P3D?
void setSimulator(Simulator s)
Simulator.
bool isAnySimulator() const
Any simulator?
int numberSimulators() const
Number simulators selected.
void setAllSimulators()
All simulators.
bool isXPlane() const
XPlane.
static constexpr int NumberOfSimulators
Number of known individual simulators.
bool isMicrosoftOrPrepare3DSimulator() const
Microsoft Simulator or P3D?
bool matchesAnyOrNone(const CSimulatorInfo &otherInfo) const
Matches any simulator or None (NULL).
#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 ...