|
|
| CMassUnit () |
| | Default constructor, required for Qt Metasystem.
|
| |
|
| CMassUnit (std::nullptr_t) |
| | Null constructor.
|
| |
| void | unmarshallFromDbus (const QDBusArgument &argument) |
| | Unmarshall without begin/endStructure, for when composed within another object. More...
|
| |
| void | unmarshalFromDataStream (QDataStream &stream) |
| | Unmarshal a value from a QDataStream. More...
|
| |
|
| CMeasurementUnit (const Data &&)=delete |
| | Constructor saves the address of its argument, so forbid rvalues.
|
| |
| QString | convertToQString (bool i18n=false) const |
| | Cast as QString. More...
|
| |
| void | marshallToDbus (QDBusArgument &argument) const |
| | Marshall without begin/endStructure, for when composed within another object. More...
|
| |
| void | unmarshallFromDbus (const QDBusArgument &) |
| | Unmarshall without begin/endStructure, for when composed within another object. More...
|
| |
| void | marshalToDataStream (QDataStream &stream) const |
| | Marshal a value to a QDataStream. More...
|
| |
| void | unmarshalFromDataStream (QDataStream &) |
| | Unmarshal a value from a QDataStream. More...
|
| |
|
QString | getName (bool i18n=false) const |
| | Name such as "meter".
|
| |
|
QString | getSymbol (bool i18n=false) const |
| | Unit name such as "m".
|
| |
|
bool | endsStringWithNameOrSymbol (const QString &candidate, Qt::CaseSensitivity cs=Qt::CaseSensitive) const |
| | Does a string end with name or symbol? E.g. 3meter, 3m, 3deg.
|
| |
| double | roundValue (double value, int digits=-1) const |
| | Rounded value. More...
|
| |
| double | roundToEpsilon (double value) const |
| | Rounded to the nearest CMeasurementUnit::getEpsilon. More...
|
| |
| virtual QString | makeRoundedQString (double value, int digits=-1, bool withGroupSeparator=false, bool i18n=false) const |
| | Rounded string utility method, virtual so units can have specialized formatting. More...
|
| |
| virtual QString | makeRoundedQStringWithUnit (double value, int digits=-1, bool withGroupSeparator=false, bool i18n=false) const |
| | Value rounded with unit, e.g. "5.00m", "30kHz". More...
|
| |
|
double | getEpsilon () const |
| | Threshold for comparions.
|
| |
|
int | getDisplayDigits () const |
| | Display digits.
|
| |
|
double | convertFrom (double value, const CMeasurementUnit &unit) const |
| | Convert from other unit to this unit.
|
| |
|
bool | isEpsilon (double value) const |
| | Is given value <= epsilon?
|
| |
|
bool | isNull () const |
| | Is unit null?
|
| |
|
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.
|
| |
|
CIcons::IconIndex | toIcon () const |
| | As icon, not implemented by all classes.
|
| |
| 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.
|
| |
| 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 CMassUnit &compareValue) const |
| | Compare for index.
|
| |
|
bool | equalsPropertyByIndex (const QVariant &compareValue, CPropertyIndexRef index) const |
| | Is given variant equal to value of property index?
|
| |
Specialized class for mass units (kg, lbs).
Definition at line 431 of file units.h.