|
QGroundControl
Ground Control Station for MAVLink Drones
|
A SettingsFact is Fact which holds a QSettings value. More...
#include <SettingsFact.h>
Inheritance diagram for SettingsFact:
Collaboration diagram for SettingsFact:Public Member Functions | |
| SettingsFact (QObject *parent=nullptr) | |
| SettingsFact (const QString &settingsGroup, FactMetaData *metaData, QObject *parent=nullptr) | |
| SettingsFact (const SettingsFact &other, QObject *parent=nullptr) | |
| ~SettingsFact () | |
| const SettingsFact & | operator= (const SettingsFact &other) |
| void | setUserVisible (bool userVisible) |
Public Member Functions inherited from Fact | |
| Fact (QObject *parent=nullptr) | |
| Fact (int componentId, const QString &name, FactMetaData::ValueType_t type, QObject *parent=nullptr) | |
| Fact (const Fact &other, QObject *parent=nullptr) | |
| Fact (const QString &settingsGroup, FactMetaData *metaData, QObject *parent=nullptr) | |
| virtual | ~Fact () |
| const Fact & | operator= (const Fact &other) |
| Q_INVOKABLE QString | validate (const QString &cookedValue, bool convertOnly) |
| Q_INVOKABLE QVariant | clamp (const QString &cookedValue) |
| Convert and clamp value. | |
| QVariant | cookedValue () const |
| QVariant | rawValue () const |
| Value after translation. | |
| int | componentId () const |
| int | decimalPlaces () const |
| QVariant | rawDefaultValue () const |
| QVariant | cookedDefaultValue () const |
| bool | defaultValueAvailable () const |
| QString | cookedDefaultValueString () const |
| QStringList | bitmaskStrings () const |
| QVariantList | bitmaskValues () const |
| QStringList | selectedBitmaskStrings () const |
| Provide a list of selected strings based on the fact value with the bitmaskString/bitmaskValues map. | |
| int | enumIndex () |
| QStringList | enumStrings () const |
| QString | enumStringValue () |
| QVariantList | enumValues () const |
| QString | category () const |
| QString | group () const |
| QString | longDescription () const |
| QVariant | rawMax () const |
| QVariant | cookedMax () const |
| QString | cookedMaxString () const |
| bool | maxIsDefaultForType () const |
| QVariant | rawMin () const |
| QVariant | cookedMin () const |
| QString | cookedMinString () const |
| bool | minIsDefaultForType () const |
| QVariant | rawUserMin () const |
| QVariant | cookedUserMin () const |
| QString | cookedUserMinString () const |
| QVariant | rawUserMax () const |
| QVariant | cookedUserMax () const |
| QString | cookedUserMaxString () const |
| QString | name () const |
| QString | label () const |
| QString | shortDescription () const |
| FactMetaData::ValueType_t | type () const |
| QString | cookedUnits () const |
| QString | rawUnits () const |
| QString | invalidValueString (int decimalPlaces) const |
| QString | invalidValueString () const |
| QString | rawValueString () const |
| QString | cookedValueString () const |
| bool | valueEqualsDefault () const |
| bool | vehicleRebootRequired () const |
| bool | qgcRebootRequired () const |
| QString | enumOrValueString () |
| double | rawIncrement () const |
| double | cookedIncrement () const |
| bool | typeIsString () const |
| bool | typeIsBool () const |
| bool | hasControl () const |
| bool | readOnly () const |
| bool | writeOnly () const |
| bool | volatileValue () const |
| Q_INVOKABLE FactValueSliderListModel * | valueSliderModel () |
| QString | rawValueStringFullPrecision () const |
| Returns the values as a string with full 18 digit precision if float/double. | |
| void | setRawValue (const QVariant &value) |
| void | setCookedValue (const QVariant &value) |
| void | setEnumIndex (int index) |
| void | setEnumStringValue (const QString &value) |
| int | valueIndex (const QString &value) const |
| void | setSendValueChangedSignals (bool sendValueChangedSignals) |
| bool | sendValueChangedSignals () const |
| bool | deferredValueChangeSignal () const |
| void | clearDeferredValueChangeSignal () |
| void | sendDeferredValueChangedSignal () |
| void | forceSetRawValue (const QVariant &value) |
| Sets and sends new value to vehicle even if value is the same. | |
| void | setMetaData (FactMetaData *metaData, bool setDefaultFromMetaData=false) |
| FactMetaData * | metaData () |
| void | containerSetRawValue (const QVariant &value) |
| Value coming from Vehicle. This does NOT send a _containerRawValueChanged signal. | |
| void | setName (const QString &name) |
| Generally you should not change the name of a fact. But if you know what you are doing, you can. | |
| void | setEnumInfo (const QStringList &strings, const QVariantList &values) |
| Generally this is done during parsing. But if you know what you are doing, you can. | |
Additional Inherited Members | |
Signals inherited from Fact | |
| void | bitmaskStringsChanged () |
| void | bitmaskValuesChanged () |
| void | enumsChanged () |
| void | sendValueChangedSignalsChanged (bool sendValueChangedSignals) |
| void | valueChanged (const QVariant &value) |
| This signal is only meant for use by the QT property system. It should not be connected to by client code. | |
| void | rawValueChanged (const QVariant &value) |
| void | vehicleUpdated (const QVariant &value) |
| Signalled when the param write ack comes back from the vehicle. | |
| void | containerRawValueChanged (const QVariant &value) |
| This signal is meant for use by Fact container implementations. Used to send changed values to vehicle. | |
Protected Member Functions inherited from Fact | |
| QString | _variantToString (const QVariant &variant, int decimalPlaces) const |
| void | _sendValueChangedSignal (const QVariant &value) |
Protected Attributes inherited from Fact | |
| QString | _name |
| int | _componentId = -1 |
| QVariant | _rawValue {0} |
| QRecursiveMutex | _rawValueMutex |
| FactMetaData::ValueType_t | _type = FactMetaData::valueTypeInt32 |
| FactMetaData * | _metaData = nullptr |
| bool | _sendValueChangedSignals = true |
| bool | _deferredValueChangeSignal = false |
| FactValueSliderListModel * | _valueSliderModel = nullptr |
Static Protected Attributes inherited from Fact | |
| static constexpr const char * | kMissingMetadata = "Meta data pointer missing" |
A SettingsFact is Fact which holds a QSettings value.
Definition at line 10 of file SettingsFact.h.
|
explicit |
Whether this setting should be shown in the UI. When false the setting is hidden from the user and its value is forced to the default. Controlled by QGCCorePlugin::adjustSettingMetaData and settings-override JSON files.
Definition at line 11 of file SettingsFact.cc.
|
explicit |
Definition at line 17 of file SettingsFact.cc.
References Fact::_name, Fact::_rawValue, Fact::_rawValueMutex, SettingsManager::adjustSettingMetaData(), FactMetaData::convertAndValidateRaw(), FactMetaData::defaultValueAvailable(), errorString, Fact::metaData(), Fact::rawDefaultValue(), FactMetaData::rawDefaultValue(), Fact::rawValueChanged(), QGC::runningUnitTests(), and Fact::setMetaData().
|
explicit |
Definition at line 57 of file SettingsFact.cc.
| SettingsFact::~SettingsFact | ( | ) |
Definition at line 64 of file SettingsFact.cc.
| const SettingsFact & SettingsFact::operator= | ( | const SettingsFact & | other | ) |
Definition at line 69 of file SettingsFact.cc.
References Fact::operator=().
|
inline |
Definition at line 27 of file SettingsFact.h.