swift
|
xswiftbus settings More...
Public Types | |
enum | ColumnIndex { IndexDBusServerAddress = CPropertyIndexRef::GlobalIndexCXSwiftBusSettings , IndexMaxPlanes , IndexDrawingLabels , IndexBundleTaxiLandingLights , IndexMessageBoxMargins , IndexMaxDrawingDistance , IndexFollowAircraftDistance , IndexNightTextureMode } |
Properties by index. | |
![]() | |
using | base_type = CEmpty |
Base class. | |
![]() | |
using | base_type = CEmpty |
Base class is alias of itself. | |
![]() | |
enum | ColumnIndex { IndexPixmap = 10 , IndexIcon , IndexString } |
Base class enums. | |
![]() | |
enum | ColumnIndex { IndexUtcTimestamp = CPropertyIndexRef::GlobalIndexITimestampBased , IndexUtcTimestampFormattedYmdhms , IndexUtcTimestampFormattedYmdhmsz , IndexUtcTimestampFormattedMdhms , IndexUtcTimestampFormattedMdhmsz , IndexUtcTimestampFormattedDhms , IndexUtcTimestampFormattedHms , IndexUtcTimestampFormattedHm , IndexMSecsSinceEpoch } |
Properties by index. | |
Public Member Functions | |
CXSwiftBusSettings () | |
Default constructor. | |
CXSwiftBusSettings (const QString &json) | |
From JSON constructor. | |
QVariant | propertyByIndex (swift::misc::CPropertyIndexRef index) const |
Property by index. More... | |
void | setPropertyByIndex (swift::misc::CPropertyIndexRef index, const QVariant &variant) |
Set property by index. More... | |
QString | convertToQString (bool i18n=false) const |
Cast as QString. More... | |
QString | getDBusServerAddressQt () const |
DBus server. More... | |
void | setDBusServerAddressQt (const QString &dBusAddress) |
Set DBus server. More... | |
QString | getNightTextureModeQt () const |
The the night texture mode. More... | |
void | setNightTextureModeQt (const QString &nightTexture) |
The the night texture mode. More... | |
QString | toXSwiftBusJsonStringQt () const |
As JSON string. More... | |
void | parseXSwiftBusStringQt (const QString &json) |
Load and parse config file. More... | |
virtual void | setCurrentUtcTime () |
Sets both timestamps. | |
CStatusMessageList | validate () const |
Valid settings? | |
![]() | |
int | getMetaTypeId () const |
Returns the Qt meta type ID of this object. More... | |
QString | getClassName () const |
Class name. | |
bool | isA (int metaTypeId) const |
Returns true if this object is an instance of the class with the given meta type ID, or one of its subclasses. | |
![]() | |
void | marshallToDbus (QDBusArgument &arg, Tags...) const |
Marshall without begin/endStructure, for when composed within another object. | |
void | unmarshallFromDbus (const QDBusArgument &arg, Tags...) |
Unmarshall without begin/endStructure, for when composed within another object. | |
![]() | |
void | marshalToDataStream (QDataStream &stream) const |
Marshal a value to a QDataStream. | |
void | unmarshalFromDataStream (QDataStream &stream) |
Unmarshal a value from a QDataStream. | |
![]() | |
QJsonObject | toJson () const |
Cast to JSON object. | |
QString | toJsonString (QJsonDocument::JsonFormat format=QJsonDocument::Indented) const |
Convenience function JSON as string. | |
void | convertFromJson (const QJsonObject &json) |
Assign from JSON object. | |
void | convertFromJson (const QString &jsonString, bool acceptCacheFormat=false) |
Assign from JSON object string. | |
![]() | |
QString | toQString (bool i18n=false) const |
Cast as QString. | |
std::string | toStdString (bool i18n=false) const |
To std string. | |
QString | stringForStreaming () const |
String for streaming operators. | |
![]() | |
CPropertyIndexList | apply (const CPropertyIndexVariantMap &indexMap, bool skipEqualValues=false) |
Update by variant map. More... | |
void | setPropertyByIndex (CPropertyIndexRef index, const QVariant &variant) |
Set property by index. | |
QVariant | propertyByIndex (CPropertyIndexRef index) const |
Property by index. | |
int | comparePropertyByIndex (CPropertyIndexRef index, const Derived &compareValue) const |
Compare for index. | |
bool | equalsPropertyByIndex (const QVariant &compareValue, CPropertyIndexRef index) const |
Is given variant equal to value of property index? | |
![]() | |
CIcons::IconIndex | toIcon () const |
As icon, not implemented by all classes. | |
![]() | |
const std::string & | getDBusServerAddress () const |
DBus server. | |
void | setDBusServerAddress (const std::string &dBusServer) |
Set DBus server. | |
void | setDrawingLabels (bool drawing) |
Set whether the plugin draws type and callsign labels above aircraft. | |
bool | isDrawingLabels () const |
Get whether the plugin draws type and callsign labels above aircraft. | |
void | setLabelColor (int rgb) |
Set the color to draw the callsign labels above aircraft. | |
int | getLabelColor () const |
Get the color to draw the callsign labels above aircraft. | |
void | setBundlingTaxiAndLandingLights (bool bundle) |
Bundle taxi and landing lights. | |
bool | isBundlingTaxiAndLandingLights () const |
Bundle taxi and landing lights. | |
void | setNightTextureMode (const std::string &mode) |
The the night texture mode. | |
const std::string & | getNightTextureMode () const |
The the night texture mode. | |
void | setMessageBoxValues (const std::string &positions) |
Left, top, right, bottom, lines, duration, color(freq, priv, serv, stat, sup) | |
void | setMessageBoxValues (int leftPx, int topPx, int rightPx, int bottomPx, int lines, int durationMs, int freqRgb, int privRgb, int servRgb, int statRgb, int supRgb) |
Left, top, right, bottom, lines, duration, color(freq, priv, serv, stat, sup) | |
const std::string & | getMessageBoxValues () const |
Left, top, right, bottom, lines, duration, color(freq, priv, serv, stat, sup) | |
std::vector< int > | getMessageBoxValuesVector () const |
Left, top, right, bottom, lines, duration, color(freq, priv, serv, stat, sup) | |
bool | setMaxPlanes (int planes) |
Set the maximum number of aircraft. | |
int | getMaxPlanes () const |
Get the maximum number of aircraft. | |
bool | setFollowAircraftDistanceM (int meters) |
Set follow aircraft distance. | |
int | getFollowAircraftDistanceM () const |
Get follow aircraft distance. | |
double | getMaxDrawDistanceNM () const |
Set the maximum distance at which to draw aircraft (nautical miles). | |
bool | setMaxDrawDistanceNM (double nauticalMiles) |
Set the maximum distance at which to draw aircraft (nautical miles). | |
bool | isLogRenderPhases () const |
Debug messages? | |
void | setLogRenderPhases (bool log) |
Debug messages? | |
bool | isTcasEnabled () const |
TCAS functionality? | |
void | setTcasEnabled (bool tcas) |
TCAS functionality? | |
bool | isTerrainProbeEnabled () const |
Terrain probe to query ground elevation enabled? | |
void | setTerrainProbeEnabled (bool enabled) |
Terrain probe to query ground elevation enabled? | |
bool | parseXSwiftBusString (const std::string &json) |
Load and parse config file. | |
std::string | toXSwiftBusJsonString () const |
As JSON string. | |
std::string | convertToString () const |
Convert to string. | |
int | update (const CXSwiftBusSettingsQtFree &newValues) |
Update only changed values. | |
![]() | |
QDateTime | getUtcTimestamp () const |
Get timestamp. | |
qint64 | getMSecsSinceEpoch () const |
Timestamp as ms value. | |
qint64 | getTimeDifferenceMs (qint64 compareTime) const |
Time difference in ms. | |
qint64 | getTimeDifferenceAbsMs (qint64 compareTime) const |
Time difference in ms. | |
qint64 | getTimeDifferenceToNowMs () const |
Time difference to now. | |
qint64 | getTimeDifferenceMs (const ITimestampBased &compare) const |
Time difference in ms. | |
qint64 | getAbsTimeDifferenceMs (qint64 compareTime) const |
Time difference in ms. | |
qint64 | getAbsTimeDifferenceMs (const ITimestampBased &compare) const |
Time difference in ms. | |
void | setTimestampToNull () |
Set to null. | |
void | setMSecsSinceEpoch (qint64 mSecsSinceEpoch) |
Timestamp as ms value. | |
void | setByYearMonthDayHourMinute (const QString &yyyyMMddhhmmss) |
Set by value such as "20141003231045". | |
void | setUtcTimestamp (const QDateTime ×tamp) |
Set timestamp. | |
bool | isNewerThan (const ITimestampBased &otherTimestampObj) const |
Is this newer than other? | |
bool | isNewerThan (qint64 mSecsSinceEpoch) const |
Is newer than epoch value? | |
bool | isOlderThan (const ITimestampBased &otherTimestampObj) const |
Is this older than other? | |
bool | isOlderThan (qint64 mSecsSinceEpoch) const |
Is this older than other? | |
bool | isOlderThanNowMinusOffset (int offsetMs) const |
Older than now-offset. | |
bool | isSame (const ITimestampBased &otherTimestampObj) const |
Same timestamp. | |
qint64 | msecsTo (const ITimestampBased &otherTimestampObj) const |
Time difference. | |
qint64 | absMsecsTo (const ITimestampBased &otherTimestampObj) const |
Time difference. | |
qint64 | msecsToNow () const |
Milliseconds to now. | |
void | setCurrentUtcTime () |
Set the current time as timestamp. | |
void | addMsecs (qint64 ms) |
Add the given number of milliseconds to the timestamp. | |
QString | getFormattedUtcTimestampHms () const |
As hh:mm:ss. | |
QString | getFormattedUtcTimestampHmsz () const |
As hh:mm:ss.zzz. | |
QString | getFormattedUtcTimestampHm () const |
As hh:mm. | |
QString | getFormattedUtcTimestampDhms () const |
As dd HH mm ss. | |
QString | getFormattedUtcTimestampMdhms () const |
As MM dd HH mm ss. | |
QString | getFormattedUtcTimestampMdhmsz () const |
As MM dd HH mm ss.zzz. | |
QString | getFormattedUtcTimestampYmdhms () const |
As yyyy MM dd HH mm ss. | |
QString | getFormattedUtcTimestampYmdhmsz () const |
As yyyy MM dd HH mm ss.zzz. | |
bool | hasValidTimestamp () const |
Valid timestamp? | |
Static Public Member Functions | |
static const CXSwiftBusSettings & | defaultValue () |
Default value for settings. | |
![]() | |
static void | registerMetadata () |
Register metadata. | |
![]() | |
template<class DerivedObj = Derived> | |
static DerivedObj | fromJson (const QJsonObject &json) |
Get object from QJsonObject. | |
template<class DerivedObj = Derived> | |
static DerivedObj | fromJson (const QString &jsonString, bool acceptCacheJson=false) |
Get object from JSON string. | |
template<class DerivedObj = Derived> | |
static DerivedObj | fromJsonNoThrow (const QString &jsonString, bool acceptCacheJson, bool &success, QString &errMsg) |
Get object from JSON string. | |
![]() | |
static bool | isAnyTimestampIndex (int index) |
Any of the timestamp indexes. | |
static bool | canHandleIndex (CPropertyIndexRef index) |
Can given index be handled. | |
Protected Member Functions | |
virtual void | objectUpdated () final |
Object has been updated. More... | |
![]() | |
CValueObject ()=default | |
Default constructor. | |
CValueObject (const CValueObject &)=default | |
Copy constructor. | |
CValueObject & | operator= (const CValueObject &)=default |
Copy assignment operator. | |
~CValueObject ()=default | |
Destructor. | |
CEmpty ()=default | |
Inheriting constructors. | |
CEmpty (const CEmpty &)=default | |
Inheriting constructors. | |
![]() | |
CEmpty ()=default | |
Protected default constructor. | |
CEmpty (const CEmpty &)=default | |
Protected copy constructor. | |
CEmpty & | operator= (const CEmpty &)=default |
Protected copy assignment operator. | |
~CEmpty ()=default | |
Non-virtual protected destructor. | |
![]() | |
CXSwiftBusSettingsQtFree () | |
Constructor. | |
virtual | ~CXSwiftBusSettingsQtFree () |
Destructor. | |
![]() | |
ITimestampBased () | |
Constructor. | |
ITimestampBased (qint64 msSincePoch) | |
Constructor. | |
ITimestampBased (const QDateTime ×tamp) | |
Constructor. | |
QVariant | propertyByIndex (CPropertyIndexRef index) const |
Property by index. More... | |
void | setPropertyByIndex (CPropertyIndexRef index, const QVariant &variant) |
Set property by index. More... | |
int | comparePropertyByIndex (CPropertyIndexRef index, const ITimestampBased &compareValue) const |
Compare for index. More... | |
void | updateMissingParts (const ITimestampBased &other) |
Update missing parts. | |
Additional Inherited Members | |
![]() | |
std::string | m_dBusServerAddress |
DBus server (also in class CXSwiftBusConfigWriter) More... | |
std::string | m_nightTextureMode { "auto" } |
night texture mode | |
std::string | m_msgBox |
left, top, right, bottom, lines, duration, colors More... | |
int | m_maxPlanes = 100 |
max. More... | |
int | m_followAircraftDistanceM = 200 |
follow aircraft in distance | |
bool | m_drawingLabels = true |
labels in XPlane | |
int | m_labelColor = 0xffc000 |
labels in XPlane | |
bool | m_bundleTaxiLandingLights = true |
bundle taxi and landing lights | |
bool | m_logRenderPhases = false |
render phases debug messages | |
bool | m_tcasEnabled = true |
TCAS functionality. | |
bool | m_terrainProbeEnabled = true |
terrain probe to establish ground elevation | |
double | m_maxDrawDistanceNM = 50.0 |
distance in XPlane | |
int64_t | m_msSinceEpochQtFree = 0 |
timestamp | |
![]() | |
qint64 | m_timestampMSecsSinceEpoch = -1 |
timestamp value | |
![]() | |
static constexpr char | JsonDBusServerAddress [] = "dbusserveradress" |
The JSON members. | |
static constexpr char | JsonDrawingLabels [] = "drawinglabels" |
The JSON members. | |
static constexpr char | JsonLabelColor [] = "labelcolor" |
The JSON members. | |
static constexpr char | JsonLogRenderPhases [] = "renderPhases" |
The JSON members. | |
static constexpr char | JsonTcas [] = "tcas" |
The JSON members. | |
static constexpr char | JsonTerrainProbe [] = "terrainProbe" |
The JSON members. | |
static constexpr char | JsonMaxPlanes [] = "maxplanes" |
The JSON members. | |
static constexpr char | JsonMaxDrawDistance [] = "maxDrawDistance" |
The JSON members. | |
static constexpr char | JsonNightTextureMode [] = "nighttexture" |
The JSON members. | |
static constexpr char | JsonTimestamp [] = "timestamp" |
The JSON members. | |
static constexpr char | JsonMessageBox [] = "msgbox" |
The JSON members. | |
static constexpr char | JsonBundleTaxiLandingLights [] = "bundleLights" |
The JSON members. | |
static constexpr char | JsonFollowAircraftDistanceM [] = "followAircraftDistance" |
The JSON members. | |
xswiftbus settings
Definition at line 23 of file xswiftbussettings.h.
QString swift::misc::simulation::settings::CXSwiftBusSettings::convertToQString | ( | bool | i18n = false | ) | const |
Cast as QString.
Definition at line 60 of file xswiftbussettings.cpp.
|
inline |
DBus server.
Definition at line 58 of file xswiftbussettings.h.
|
inline |
The the night texture mode.
Definition at line 67 of file xswiftbussettings.h.
|
finalprotectedvirtual |
Object has been updated.
Implements swift::misc::simulation::settings::CXSwiftBusSettingsQtFree.
Definition at line 90 of file xswiftbussettings.cpp.
|
inline |
Load and parse config file.
Definition at line 79 of file xswiftbussettings.h.
QVariant swift::misc::simulation::settings::CXSwiftBusSettings::propertyByIndex | ( | swift::misc::CPropertyIndexRef | index | ) | const |
Property by index.
Definition at line 16 of file xswiftbussettings.cpp.
|
inline |
Set DBus server.
Definition at line 61 of file xswiftbussettings.h.
|
inline |
The the night texture mode.
Definition at line 70 of file xswiftbussettings.h.
void swift::misc::simulation::settings::CXSwiftBusSettings::setPropertyByIndex | ( | swift::misc::CPropertyIndexRef | index, |
const QVariant & | variant | ||
) |
Set property by index.
Definition at line 36 of file xswiftbussettings.cpp.
|
inline |
As JSON string.
Definition at line 76 of file xswiftbussettings.h.