mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-04 00:16:51 +08:00
Split of CSimulatorPluginInfo and CSimulatorSetup
refs #404, and discussion https://dev.vatsim-germany.org/issues/404#note-8 * Changed CSimulatorSetup to use CNameVariantPairList as data. The old version was an hack and had to go, CNameVariantPairList would allow complex types in the future and can be already shown in the GUI. * CNameVariantPairList was improved slightly in the same step * Functions to get CSimulatorSetup from driver / context * Removed CSimulatorSetup data from CSimulatorPluginInfo
This commit is contained in:
@@ -22,22 +22,16 @@ namespace BlackMisc
|
||||
//! Describing a simulator plugin
|
||||
class CSimulatorPluginInfo : public BlackMisc::CValueObject<CSimulatorPluginInfo>
|
||||
{
|
||||
/**
|
||||
* The _name_ property identifies the plugin itself and must be uniqe.
|
||||
*/
|
||||
//! The _name_ property identifies the plugin itself and must be uniqe.
|
||||
Q_PROPERTY(QString getName READ getName)
|
||||
|
||||
/**
|
||||
* The _simulator_ property specifies which simulator the plugin handles.
|
||||
* There cannot be two plugins loaded for the same simulator.
|
||||
* swift enables some features for particular simulators. Currently recognized are:
|
||||
* fsx, fs9, xplane
|
||||
*/
|
||||
//! The _simulator_ property specifies which simulator the plugin handles.
|
||||
//! There cannot be two plugins loaded for the same simulator.
|
||||
//! swift enables some features for particular simulators. Currently recognized are:
|
||||
//! fsx, fs9, xplane
|
||||
Q_PROPERTY(QString getSimulator READ getSimulator)
|
||||
|
||||
/**
|
||||
* The _description_ property provides a short, human-readable description of the plugin.
|
||||
*/
|
||||
//! The _description_ property provides a short, human-readable description of the plugin.
|
||||
Q_PROPERTY(QString getDescription READ getDescription)
|
||||
|
||||
public:
|
||||
@@ -49,15 +43,6 @@ namespace BlackMisc
|
||||
//! Unspecified simulator
|
||||
bool isUnspecified() const;
|
||||
|
||||
//! Single setting value
|
||||
BlackMisc::CVariant getSimulatorSetupValue(int index) const;
|
||||
|
||||
//! Single setting value
|
||||
QString getSimulatorSetupValueAsString(int index) const;
|
||||
|
||||
//! Set single settings
|
||||
void setSimulatorSetup(const BlackMisc::CPropertyIndexVariantMap &setup);
|
||||
|
||||
//! Check if the provided plugin metadata is valid.
|
||||
//! Simulator plugin (driver) has to meet the following requirements:
|
||||
//! * implements org.swift.pilotclient.BlackCore.SimulatorInterface;
|
||||
@@ -88,7 +73,6 @@ namespace BlackMisc
|
||||
QString m_simulator;
|
||||
QString m_description;
|
||||
bool m_valid { false };
|
||||
BlackMisc::CPropertyIndexVariantMap m_simsetup; //!< allows to access simulator keys requried on remote side
|
||||
};
|
||||
} // ns
|
||||
} // ns
|
||||
@@ -97,8 +81,7 @@ BLACK_DECLARE_TUPLE_CONVERSION(BlackMisc::Simulation::CSimulatorPluginInfo, (
|
||||
attr(o.m_name),
|
||||
attr(o.m_simulator),
|
||||
attr(o.m_description),
|
||||
attr(o.m_valid),
|
||||
attr(o.m_simsetup, flags<DisabledForComparison>())
|
||||
attr(o.m_valid)
|
||||
))
|
||||
Q_DECLARE_METATYPE(BlackMisc::Simulation::CSimulatorPluginInfo)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user