70 case M_S:
return _fdValue;
71 case FT_MIN:
return _fdValue * 196.8503937;
94 static const QRegExp __qRegExp(
"^\\s*(-?\\d+(\\.\\d+)?)\\s*([^\\d\\s]*)?\\s*$" );
96 if( _pbOK ) *_pbOK =
false;
97 if( !__qRegExp.exactMatch( _rqString ) )
return 0.0;
99 double __fdValue = __qRegExp.cap(1).toDouble( &__bOK );
100 if( !__bOK )
return 0.0;
101 QString __qsUnit = __qRegExp.cap(3);
105 case FT_MIN: __fdValue = __fdValue / 196.8503937;
break;
108 if( _pbOK ) *_pbOK =
true;
[UI] Container for the application's settings
int getPrecisionSpeedVertical()
[Precision] Returns the vertical speed decimal precision
CUnitSpeedVertical::EUnit getUnitSpeedVertical()
[Unit] Returns the vertical speed format/unit
Container class for supported machine-friendly format/unit codes.
QMap< CUnitSpeedVertical::EUnit, QString > qMapCodes
Container class for supported human-readable format/unit symbols.
QMap< CUnitSpeedVertical::EUnit, QString > qMapSymbols
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 QMap< EUnit, QString > & symbols()
Returns the list of supported human-readable format/unit symbols.
static double fromString(const QString &_rqString, EUnit _eUnit, bool *_pbOK=0)
Returns the numeric value corresponding (parsed) from the string.
@ FT_MIN
feet per minut [ft/min]
@ UNDEFINED
undefined format/unit
@ M_S
meters per second [m/s]
static const CUnitSpeedVerticalCodes oUnitSpeedVerticalCodes
Container for supported machine-friendly format/unit codes.
static const CUnitSpeedVerticalSymbols oUnitSpeedVerticalSymbols
Container for supported human-readable format/unit symbols.
static const QMap< EUnit, QString > & codes()
Returns the list of 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 QString toCode(EUnit _eUnit)
Returns the machine-friendly code corresponding to the given format/unit ID.
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 CSettings * useSettings()