6 #include "misc/simulation/settings/xswiftbussettingsqtfree.inc"
10 namespace swift::misc::simulation::settings
18 if (index.
isMyself()) {
return QVariant::fromValue(*
this); }
23 case IndexMaxPlanes:
return QVariant::fromValue(
m_maxPlanes);
24 case IndexDBusServerAddress:
return QVariant::fromValue(QString::fromStdString(
m_dBusServerAddress));
25 case IndexNightTextureMode:
return QVariant::fromValue(QString::fromStdString(
m_nightTextureMode));
26 case IndexMessageBoxMargins:
return QVariant::fromValue(QString::fromStdString(
m_msgBox));
48 case IndexMaxPlanes:
m_maxPlanes = variant.toInt();
break;
50 case IndexMessageBoxMargins:
m_msgBox = variant.toString().toStdString();
break;
51 case IndexNightTextureMode:
m_nightTextureMode = variant.toString().toStdString();
break;
static bool isSessionOrSystemAddress(const QString &address)
True if address is session or system bus address.
static bool isQtDBusAddress(const QString &address)
True if a valid Qt DBus address, e.g. "unix:tmpdir=/tmp", "tcp:host=127.0.0.1,port=45000".
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.
constexpr static auto SeverityError
Status severities.
Status messages, e.g. from Core -> GUI.
void addValidationMessage(const QString &validationText, CStatusMessage::StatusSeverity severity)
Convenience function to push back a validation message.
void setPropertyByIndex(CPropertyIndexRef index, const QVariant &variant)
Set property by index.
static bool canHandleIndex(CPropertyIndexRef index)
Can given index be handled.
qint64 m_timestampMSecsSinceEpoch
timestamp value
void setCurrentUtcTime()
Set the current time as timestamp.
QVariant propertyByIndex(CPropertyIndexRef index) const
Property by index.
ColumnIndex
Base class enums.
void setPropertyByIndex(CPropertyIndexRef index, const QVariant &variant)
Set property by index.
QVariant propertyByIndex(CPropertyIndexRef index) const
Property by index.
QString convertToQString(bool i18n=false) const
Cast as QString.
void parseXSwiftBusStringQt(const QString &json)
Load and parse config file.
static const CXSwiftBusSettings & defaultValue()
Default value for settings.
virtual void objectUpdated() final
Object has been updated.
QVariant propertyByIndex(swift::misc::CPropertyIndexRef index) const
Property by index.
virtual void setCurrentUtcTime()
Sets both timestamps.
void setPropertyByIndex(swift::misc::CPropertyIndexRef index, const QVariant &variant)
Set property by index.
CStatusMessageList validate() const
Valid settings?
CXSwiftBusSettings()
Default constructor.
int m_followAircraftDistanceM
follow aircraft in distance
int64_t m_msSinceEpochQtFree
timestamp
std::string m_dBusServerAddress
DBus server (also in class CXSwiftBusConfigWriter)
std::string m_nightTextureMode
night texture mode
std::string m_msgBox
left, top, right, bottom, lines, duration, colors
bool m_bundleTaxiLandingLights
bundle taxi and landing lights
std::string convertToString() const
Convert to string.
double m_maxDrawDistanceNM
distance in XPlane
bool m_drawingLabels
labels in XPlane
#define SWIFT_DEFINE_VALUEOBJECT_MIXINS(Namespace, Class)
Explicit template definition of mixins for a CValueObject subclass.