6 #include <QDBusMetaType>
13 namespace swift::misc::simulation
30 this->
setValue(
"all/versionInfo", versionInfo);
35 this->
setValue(
"all/installDir", fullFilePath);
55 qRegisterMetaType<swift::misc::simulation::CSimulatorInternals>();
56 qDBusRegisterMetaType<swift::misc::simulation::CSimulatorInternals>();
57 registerMetaValueType<swift::misc::simulation::CSimulatorInternals>();
64 if (index.
isMyself()) {
return QVariant::fromValue(*
this); }
68 case IndexData:
return QVariant::fromValue(m_data);
Value object encapsulating a list of name/variant pairs.
QStringList getNames(bool sorted=true) const
Get all names.
CVariant getVariantValue(const QString &name) const
Get pair's variant value or default if not existing.
QString getValueAsString(const QString &name) const
Get pair's variant value as string (empty if not existing)
bool addOrReplaceValue(const QString &name, const CVariant &value, const CIcon &icon=CIcon())
Add value, if name already exists replace (true) If one is sure(!) the name does not exists,...
Non-owning reference to a CPropertyIndex with a subset of its features.
CastType frontCasted() const
First element casted to given type, usually the PropertIndex enum.
bool isMyself() const
Myself index, used with nesting.
Wrapper around QVariant which provides transparent access to CValueObject methods of the contained ob...
ColumnIndex
Base class enums.
void setPropertyByIndex(CPropertyIndexRef index, const QVariant &variant)
Set property by index.
QVariant propertyByIndex(CPropertyIndexRef index) const
Property by index.
QString toQString(bool i18n=false) const
Cast as QString.
Simulator internals for flight simulators. Those are obtained from a running simulator and represent ...
void setPropertyByIndex(CPropertyIndexRef index, const QVariant &variant)
Set property by index.
QString getSimulatorVersion() const
Simulator version info, something like "10.3.2".
QStringList getSortedNames() const
Get sorted names.
void setSimulatorName(const QString &name)
Set simulator name.
void setSimulatorInstallationDirectory(const QString &fullFilePath)
Path where simulator is installed.
QString convertToQString(bool i18n=false) const
Cast as QString.
QString getSimulatorInstallationDirectory() const
Path where simulator is installed.
QVariant propertyByIndex(CPropertyIndexRef index) const
Property by index.
static void registerMetadata()
Register metadata.
void setValue(const QString &name, const QString &value)
Set value.
void setSimulatorVersion(const QString &versionInfo)
Simulator version info, something like "10.3.2".
QString getSimulatorName() const
Get the simulator name.
QString getSimulatorSwiftPluginName() const
Plugin name.
void setSwiftPluginName(const QString &name)
Set plugin name.
QString getStringValue(const QString &name) const
Get string value.
CVariant getVariantValue(const QString &name) const
Get value.
#define SWIFT_DEFINE_VALUEOBJECT_MIXINS(Namespace, Class)
Explicit template definition of mixins for a CValueObject subclass.