26 #ifndef QVCT_CUNITSPEED_HPP
27 #define QVCT_CUNITSPEED_HPP
69 static const QMap<EUnit,QString> &
symbols();
75 static const QMap<EUnit,QString> &
codes();
83 static QString
toString(
double _fdValue,
EUnit _eUnit,
int _iPrecision = 0 );
85 static QString
toString(
double _fdValue );
96 static double fromString(
const QString& _rqString,
EUnit _eUnit,
bool* _pbOK = 0 );
98 static double fromString(
const QString& _rqString,
bool* _pbOK = 0 );
Container class for supported machine-friendly format/unit codes.
QMap< CUnitSpeed::EUnit, QString > qMapCodes
Container class for supported human-readable format/unit symbols.
QMap< CUnitSpeed::EUnit, QString > qMapSymbols
Speed unit (m/s,km/h,mi/h,kt) rendering/parsing class.
static const QMap< EUnit, QString > & symbols()
Returns the list of supported human-readable format/unit symbols.
static QString toString(double _fdValue, EUnit _eUnit, int _iPrecision=0)
Returns the formatted represention of the given value, using the specified format/unit and decimal pr...
static double fromString(const QString &_rqString, EUnit _eUnit, bool *_pbOK=0)
Returns the numeric value corresponding (parsed) from the string.
static QString toCode(EUnit _eUnit)
Returns the machine-friendly code corresponding to the given format/unit ID.
static double toValue(double _fdValue, EUnit _eUnit)
Returns the converted value, using the specified format/unit.
static QString toSymbol(EUnit _eUnit)
Returns the human-readable symbol corresponding to the given format/unit ID.
static const CUnitSpeedCodes oUnitSpeedCodes
Container for supported machine-friendly format/unit codes.
static EUnit fromSymbol(const QString &_rqsSymbol)
Returns the format/unit ID corresponding to the given human-readable symbol.
static EUnit fromCode(const QString &_rqsCode)
Returns the format/unit ID corresponding to the given machine-friendly code.
static const CUnitSpeedSymbols oUnitSpeedSymbols
Container for supported human-readable format/unit symbols.
@ UNDEFINED
undefined format/unit
@ KM_H
kilometers per hour [km/h]
@ MI_H
statute miles per hour [mi/h]
@ KT
nautical miles per hour (knots) [kt]
@ M_S
meters per second [m/s]
static const QMap< EUnit, QString > & codes()
Returns the list of supported machine-friendly format/unit codes.