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:
Klaus Basan
2015-04-11 01:51:21 +02:00
parent 291746bc57
commit 5d819b30f5
26 changed files with 448 additions and 349 deletions

View File

@@ -18,9 +18,7 @@
namespace BlackMisc
{
/*!
* Value / variant pair
*/
//! Value / variant pair
class CNameVariantPair : public CValueObject<CNameVariantPair>
{
public:
@@ -28,9 +26,7 @@ namespace BlackMisc
enum ColumnIndex
{
IndexName = BlackMisc::CPropertyIndex::GlobalIndexCNameVariantPair,
IndexVariant,
IndexIcon,
IndexPixmap
IndexVariant
};
//! Default constructor.
@@ -48,11 +44,14 @@ namespace BlackMisc
//! Set name.
void setName(const QString &name) { this->m_name = name; }
//! Name available?
bool hasName() const { return !this->m_name.isEmpty(); }
//! Set variant.
void setVariant(const CVariant &variant) { m_variant = variant; }
//! Icon
const CIcon &getIcon() const;
//! \copydoc CValueObject::toIcon()
virtual BlackMisc::CIcon toIcon() const override;
//! Has icon
bool hasIcon() const;