swift
simulatorinternals.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (C) 2013 swift Project Community / Contributors
2 // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-swift-pilot-client-1
3 
5 
6 #ifndef SWIFT_MISC_SIMULATION_SIMULATORINTERNALS_H
7 #define SWIFT_MISC_SIMULATION_SIMULATORINTERNALS_H
8 
9 #include <tuple>
10 
11 #include <QHash>
12 #include <QMetaType>
13 #include <QString>
14 
15 #include "misc/containerbase.h"
16 #include "misc/dictionary.h"
17 #include "misc/metaclass.h"
19 #include "misc/propertyindexref.h"
20 #include "misc/swiftmiscexport.h"
21 #include "misc/valueobject.h"
22 
23 SWIFT_DECLARE_VALUEOBJECT_MIXINS(swift::misc::simulation, CSimulatorInternals)
24 
25 namespace swift::misc::simulation
26 {
30  class SWIFT_MISC_EXPORT CSimulatorInternals : public CValueObject<CSimulatorInternals>
31  {
32  public:
35  {
36  IndexData = CPropertyIndexRef::GlobalIndexCSimulatorInternals
37  };
38 
41 
43  swift::misc::CNameVariantPairList getData() const { return this->m_data; }
44 
46  void setData(const swift::misc::CNameVariantPairList &data) { this->m_data = data; }
47 
49  void setValue(const QString &name, const QString &value);
50 
52  void setValue(const QString &name, int value);
53 
55  CVariant getVariantValue(const QString &name) const;
56 
58  QString getStringValue(const QString &name) const;
59 
61  QStringList getSortedNames() const;
62 
64  QString getSimulatorName() const;
65 
67  void setSimulatorName(const QString &name);
68 
70  QString getSimulatorSwiftPluginName() const;
71 
73  void setSwiftPluginName(const QString &name);
74 
76  QString getSimulatorVersion() const;
77 
79  void setSimulatorVersion(const QString &versionInfo);
80 
82  QString getSimulatorInstallationDirectory() const;
83 
85  void setSimulatorInstallationDirectory(const QString &fullFilePath);
86 
88  QVariant propertyByIndex(CPropertyIndexRef index) const;
89 
91  void setPropertyByIndex(CPropertyIndexRef index, const QVariant &variant);
92 
94  QString convertToQString(bool i18n = false) const;
95 
97  static void registerMetadata();
98 
99  private:
101 
104  SWIFT_METAMEMBER(data));
105  };
106 } // namespace swift::misc::simulation
107 
109 
110 #endif // SWIFT_MISC_SIMULATION_SIMULATORINTERNALS_H
Value object encapsulating a list of name/variant pairs.
Non-owning reference to a CPropertyIndex with a subset of its features.
Mix of the most commonly used mixin classes.
Definition: valueobject.h:114
Wrapper around QVariant which provides transparent access to CValueObject methods of the contained ob...
Definition: variant.h:66
ColumnIndex
Base class enums.
Definition: mixinindex.h:44
Simulator internals for flight simulators. Those are obtained from a running simulator and represent ...
swift::misc::CNameVariantPairList getData() const
All values.
void setData(const swift::misc::CNameVariantPairList &data)
Settings.
#define SWIFT_METAMEMBER(MEMBER,...)
Macro to define an element within a metaclass.
Definition: metaclass.h:73
#define SWIFT_METACLASS(CLASS,...)
Macro to define a nested metaclass that describes the attributes of its enclosing class.
Definition: metaclass.h:53
void registerMetadata()
Register all relevant metadata in Misc.
#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 ...
Definition: valueobject.h:65