mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-01 05:26:45 +08:00
refs #743, utility functions and formatting / typos
* simulator info for FS family / as set * fixed synchronized typo * info string for caches * getter for cached models from the loaders * get all FS family models (FSX/P3D/FS9) from list
This commit is contained in:
committed by
Mathew Sutcliffe
parent
7446ffcb80
commit
11e32a065e
@@ -145,6 +145,16 @@ namespace BlackMisc
|
||||
this->setSimulator(this->getSimulator() | other.getSimulator());
|
||||
}
|
||||
|
||||
QSet<CSimulatorInfo> CSimulatorInfo::asSingleSimulatorSet() const
|
||||
{
|
||||
QSet<CSimulatorInfo> set;
|
||||
if (this->m_simulator & FSX) { set.insert(CSimulatorInfo(FSX)); }
|
||||
if (this->m_simulator & FS9) { set.insert(CSimulatorInfo(FS9)); }
|
||||
if (this->m_simulator & P3D) { set.insert(CSimulatorInfo(P3D)); }
|
||||
if (this->m_simulator & XPLANE) { set.insert(CSimulatorInfo(XPLANE)); }
|
||||
return set;
|
||||
}
|
||||
|
||||
CSimulatorInfo::Simulator CSimulatorInfo::boolToFlag(bool fsx, bool fs9, bool xp, bool p3d)
|
||||
{
|
||||
Simulator s = fsx ? FSX : None;
|
||||
@@ -185,6 +195,12 @@ namespace BlackMisc
|
||||
return s;
|
||||
}
|
||||
|
||||
const CSimulatorInfo &CSimulatorInfo::allFsFamilySimulators()
|
||||
{
|
||||
static const CSimulatorInfo s(CSimulatorInfo::AllFsFamily);
|
||||
return s;
|
||||
}
|
||||
|
||||
const CSimulatorInfo CSimulatorInfo::getLocallyInstalledSimulators()
|
||||
{
|
||||
//! \todo add XP, ...
|
||||
|
||||
Reference in New Issue
Block a user