|
struct | AffineConverter |
| Concrete strategy pattern for converting unit with offset linear conversion. More...
|
|
struct | Centi |
| Metapolicy that can be used to modify template parameters of converters. More...
|
|
struct | Data |
| Pimpl class. More...
|
|
struct | Giga |
| Metapolicy that can be used to modify template parameters of converters. More...
|
|
struct | Hecto |
| Metapolicy that can be used to modify template parameters of converters. More...
|
|
struct | IdentityConverter |
| Concrete strategy pattern for converting unit that does nothing. More...
|
|
struct | InEachHundred |
| Metapolicy that can be used to modify template parameters of converters. More...
|
|
struct | Kilo |
| Metapolicy that can be used to modify template parameters of converters. More...
|
|
struct | LinearConverter |
| Concrete strategy pattern for converting unit with linear conversion. More...
|
|
struct | Mega |
| Metapolicy that can be used to modify template parameters of converters. More...
|
|
struct | Milli |
| Metapolicy that can be used to modify template parameters of converters. More...
|
|
struct | NilConverter |
| Converter for default values, such as None, used with public constructor. More...
|
|
struct | One |
| Metapolicy that can be used to modify template parameters of converters. More...
|
|
struct | SubdivisionConverter |
| Concrete strategy pattern for converting unit with one subdivision conversion. More...
|
|
struct | SubdivisionConverter2 |
| Concrete strategy pattern for converting unit with two subdivision conversions. More...
|
|
struct | Two |
| Metapolicy that can be used to modify template parameters of converters. More...
|
|
|
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.
|
|
|
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.
|
|
Base class for all units, such as meter, hertz.
Definition at line 36 of file measurementunit.h.