mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-07 11:05:33 +08:00
refs #207, added simulator setup to CSimulatorInfo
* setup will provide some metadata about the flight simulator, such as path, version etc. * there will be a sim independent setup class, providing common information such as path, is simulator installed, etc. * a sim dependent class on top will provide the values specific to one sim * setup will contain the logic to fetch its values: setup->init
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
#ifndef BLACKSIM_SIMULATORINFO_H
|
||||
#define BLACKSIM_SIMULATORINFO_H
|
||||
|
||||
#include "blackmisc/indexvariantmap.h"
|
||||
#include "blackmisc/valueobject.h"
|
||||
|
||||
namespace BlackSim
|
||||
{
|
||||
|
||||
//! \brief Describing a simulator
|
||||
class CSimulatorInfo : public BlackMisc::CValueObject
|
||||
{
|
||||
@@ -34,6 +34,15 @@ namespace BlackSim
|
||||
//! \copydoc CValueObject::getValueHash()
|
||||
virtual uint getValueHash() const override;
|
||||
|
||||
//! Single setting value
|
||||
QVariant getSimulatorSetupValue(int index) const;
|
||||
|
||||
//! Single setting value
|
||||
QString getSimulatorSetupValueAsString(int index) const;
|
||||
|
||||
//! Set single settings
|
||||
void setSimulatorSetup(const BlackMisc::CIndexVariantMap &setup);
|
||||
|
||||
//! \brief Simulator is FS9 - Microsoft Flight Simulator 2004
|
||||
static const CSimulatorInfo &FS9()
|
||||
{
|
||||
@@ -85,10 +94,11 @@ namespace BlackSim
|
||||
BLACK_ENABLE_TUPLE_CONVERSION(CSimulatorInfo)
|
||||
QString m_fullname;
|
||||
QString m_shortname;
|
||||
BlackMisc::CIndexVariantMap m_simsetup; //!< allows to access simulator keys requried on remote side
|
||||
};
|
||||
}
|
||||
|
||||
BLACK_DECLARE_TUPLE_CONVERSION(BlackSim::CSimulatorInfo, (o.m_fullname, o.m_shortname))
|
||||
BLACK_DECLARE_TUPLE_CONVERSION(BlackSim::CSimulatorInfo, (o.m_fullname, o.m_shortname, o.m_simsetup))
|
||||
Q_DECLARE_METATYPE(BlackSim::CSimulatorInfo)
|
||||
|
||||
#endif // guard
|
||||
|
||||
Reference in New Issue
Block a user