69 case M:
return _fdValue;
70 case FT:
return _fdValue / 0.3048;
93 static const QRegExp __qRegExp(
"^\\s*(-?\\d+(\\.\\d+)?)\\s*([^\\d\\s]*)?\\s*$" );
95 if( _pbOK ) *_pbOK =
false;
96 if( !__qRegExp.exactMatch( _rqString ) )
return 0.0;
98 double __fdValue = __qRegExp.cap(1).toDouble( &__bOK );
99 if( !__bOK )
return 0.0;
100 QString __qsUnit = __qRegExp.cap(3);
104 case FT: __fdValue = __fdValue * 0.3048;
break;
107 if( _pbOK ) *_pbOK =
true;
[UI] Container for the application's settings
CUnitElevation::EUnit getUnitElevation()
[Unit] Returns the elevation format/unit
int getPrecisionElevation()
[Precision] Returns the elevation decimal precision
Container class for supported human-readable format/unit symbols.
QMap< CUnitElevation::EUnit, QString > qMapSymbols
static double toValue(double _fdValue, EUnit _eUnit)
Returns the converted value, using the specified format/unit.
static const QMap< EUnit, QString > & codes()
Returns the list of supported machine-friendly format/unit codes.
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 QString toCode(EUnit _eUnit)
Returns the machine-friendly code corresponding to the given format/unit ID.
@ UNDEFINED
undefined 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 EUnit fromSymbol(const QString &_rqsSymbol)
Returns the format/unit ID corresponding to the given human-readable symbol.
static double fromString(const QString &_rqString, EUnit _eUnit=UNDEFINED, bool *_pbOK=0)
Returns the numeric value corresponding (parsed) from the string.
static EUnit fromCode(const QString &_rqsCode)
Returns the format/unit ID corresponding to the given machine-friendly code.
static const CUnitElevationSymbols oUnitElevationSymbols
Container for supported human-readable format/unit symbols.
static CSettings * useSettings()