swift
Classes | Public Types | Public Member Functions | Static Public Member Functions | List of all members
swift::misc::physical_quantities::CAccelerationUnit Class Referencefinal

Specialized class for acceleration units (m/s2, ft/s2). More...

Inheritance diagram for swift::misc::physical_quantities::CAccelerationUnit:
[legend]

Public Types

using base_type = CMeasurementUnit
 Base type.
 
- Public Types inherited from swift::misc::mixin::Index< CAccelerationUnit >
enum  ColumnIndex
 Base class enums.
 

Public Member Functions

 CAccelerationUnit ()
 Default constructor, required for Qt Metasystem.
 
 CAccelerationUnit (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...
 
- Public Member Functions inherited from swift::misc::physical_quantities::CMeasurementUnit
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?
 
- Public Member Functions inherited from swift::misc::mixin::String< CMeasurementUnit >
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.
 
- Public Member Functions inherited from swift::misc::mixin::Icon< CMeasurementUnit >
CIcons::IconIndex toIcon () const
 As icon, not implemented by all classes.
 
- Public Member Functions inherited from swift::misc::mixin::MetaType< CAccelerationUnit >
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.
 
- Public Member Functions inherited from swift::misc::mixin::Index< CAccelerationUnit >
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 CAccelerationUnit &compareValue) const
 Compare for index.
 
bool equalsPropertyByIndex (const QVariant &compareValue, CPropertyIndexRef index) const
 Is given variant equal to value of property index?
 

Static Public Member Functions

static CAccelerationUnit defaultUnit ()
 Default unit.
 
static CAccelerationUnit nullUnit ()
 Null unit.
 
static CAccelerationUnit m_s2 ()
 Meter/second^2 (m/s^2)
 
static CAccelerationUnit ft_s2 ()
 Feet/second^2.
 
static const QList< CAccelerationUnit > & allUnits ()
 All units.
 
- Static Public Member Functions inherited from swift::misc::physical_quantities::CMeasurementUnit
template<class U >
static U unitFromSymbol (const QString &symbol, bool strict=true)
 Unit from symbol. More...
 
template<class U >
static const QStringList & allSymbols ()
 All symbols.
 
template<class U >
static const QStringList & allSymbolsLowerCase ()
 All symbols case insensitive.
 
template<class U >
static bool hasCaseSensitiveSymbols ()
 Are symbols case sensitive?
 
template<class U >
static bool isValidUnitSymbol (const QString &symbol)
 Valid unit symbol? More...
 
template<class U >
static bool isValidUnitSymbol (const QString &symbol, Qt::CaseSensitivity caseSensitivity)
 Valid unit symbol? More...
 
template<class U >
static bool containsValidUnitSymbol (const QString &candidate, Qt::CaseSensitivity caseSensitivity=Qt::CaseSensitive)
 Contains valid unit symbol? More...
 
template<class U >
static bool endWithValidUnitSymbol (const QString &candidate, Qt::CaseSensitivity caseSensitivity=Qt::CaseSensitive)
 Ends with valid unit symbol? More...
 
static CMeasurementUnit None ()
 Dimensionless unit.
 
- Static Public Member Functions inherited from swift::misc::mixin::MetaType< CAccelerationUnit >
static void registerMetadata ()
 Register metadata.
 

Additional Inherited Members

- Protected Types inherited from swift::misc::physical_quantities::CMeasurementUnit
using ConverterFunction = double(*)(double)
 Pointer to function for converting between units.
 
- Protected Member Functions inherited from swift::misc::physical_quantities::CMeasurementUnit
 CMeasurementUnit (const Data &data)
 Constructor.
 
 CMeasurementUnit (const Data &&)=delete
 Constructor saves the address of its argument, so forbid rvalues.
 
 ~CMeasurementUnit ()=default
 Destructor.
 
 CMeasurementUnit (const CMeasurementUnit &)=default
 Copy constructor.
 
CMeasurementUnitoperator= (const CMeasurementUnit &)=default
 Copy assignment operator.
 
- Static Protected Member Functions inherited from swift::misc::physical_quantities::CMeasurementUnit
template<int N>
static constexpr QLatin1String constQLatin1 (const char(&str)[N])
 Constant-initialize QLatin1String without using strlen.
 

Detailed Description

Specialized class for acceleration units (m/s2, ft/s2).

Definition at line 1055 of file units.h.

Member Function Documentation

◆ unmarshalFromDataStream()

void swift::misc::physical_quantities::CAccelerationUnit::unmarshalFromDataStream ( QDataStream &  stream)
inline

Unmarshal a value from a QDataStream.

Definition at line 1129 of file units.h.

◆ unmarshallFromDbus()

void swift::misc::physical_quantities::CAccelerationUnit::unmarshallFromDbus ( const QDBusArgument &  argument)
inline

Unmarshall without begin/endStructure, for when composed within another object.

Definition at line 1121 of file units.h.


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