QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
FactFloatAsBool Class Reference

#include <Common.h>

Inheritance diagram for FactFloatAsBool:
Collaboration diagram for FactFloatAsBool:

Public Member Functions

 FactFloatAsBool (QObject *parent, Fact *floatFact)
virtual ~FactFloatAsBool ()=default
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
Q_INVOKABLE QVariant rawToCooked (const QVariant &rawValue) const
QVariant rawValue () const
int componentId () const
int decimalPlaces () const
int maxStringLength () 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
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 cookedValuesChanged ()
 Cooked units, ranges, defaults, increment or precision changed without a raw value change.
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
Static Protected Attributes inherited from Fact
static constexpr const char * kMissingMetadata = "Meta data pointer missing"

Detailed Description

Fact to show a float fact as boolean, true if >0, false otherwise

Definition at line 53 of file Common.h.

Constructor & Destructor Documentation

◆ FactFloatAsBool()

FactFloatAsBool::FactFloatAsBool ( QObject * parent,
Fact * floatFact )

Definition at line 62 of file Common.cc.

References Fact::Fact(), and Fact::rawValueChanged().

◆ ~FactFloatAsBool()

virtual FactFloatAsBool::~FactFloatAsBool ( )
virtualdefault

References Fact::Fact().


The documentation for this class was generated from the following files: