Qt Virtual Chart Table (QVCT)
|
Time unit (HMS, HM) rendering/parsing class. More...
#include <units/CUnitTime.hpp>
Public Types | |
enum | EUnit { HMS , HM , UNDEFINED } |
Format/unit ID. More... | |
Static Public Member Functions | |
static const QMap< EUnit, QString > & | symbols () |
Returns the list of supported human-readable format/unit symbols. More... | |
static QString | toSymbol (EUnit _eUnit) |
Returns the human-readable symbol corresponding to the given format/unit ID. More... | |
static EUnit | fromSymbol (const QString &_rqsSymbol) |
Returns the format/unit ID corresponding to the given human-readable symbol. More... | |
static const QMap< EUnit, QString > & | codes () |
Returns the list of supported machine-friendly format/unit codes. More... | |
static QString | toCode (EUnit _eUnit) |
Returns the machine-friendly code corresponding to the given format/unit ID. More... | |
static EUnit | fromCode (const QString &_rqsCode) |
Returns the format/unit ID corresponding to the given machine-friendly code. More... | |
static double | toValue (double _fdValue, CUnitTimeZone::EUnit _eUnitTimeZone) |
Returns the converted value, using the specified format/unit. More... | |
static QString | toString (double _fdValue, CUnitTimeZone::EUnit _eUnitTimeZone, EUnit _eUnit, int _iPrecision=0) |
Returns the formatted represention of the given value, using the specified format/unit and decimal precision. More... | |
static QString | toString (double _fdValue, bool _bAlternateTimeZone=false) |
Returns the formatted represention of the given value, using the application settings. More... | |
static double | fromString (const QString &_rqString, double _fdDate, CUnitTimeZone::EUnit _eUnitTimeZone, bool *_pbOK=0) |
Returns the numeric value corresponding (parsed) from the string. More... | |
static double | fromString (const QString &_rqString, double _fdDate, bool *_pbOK=0) |
Returns the numeric value corresponding (parsed) from the string, using the application settings. More... | |
Static Private Attributes | |
static const CUnitTimeSymbols | oUnitTimeSymbols |
Container for supported human-readable format/unit symbols. More... | |
static const CUnitTimeCodes | oUnitTimeCodes |
Container for supported machine-friendly format/unit codes. More... | |
Time unit (HMS, HM) rendering/parsing class.
This class allows to render/parse UTC or local times according to the various supported (and user specified) formats/units.
Definition at line 38 of file CUnitTime.hpp.
enum CUnitTime::EUnit |
Format/unit ID.
Enumerator | |
---|---|
HMS | HH:MM:SS. |
HM | HH:MM. |
UNDEFINED | undefined format/unit |
Definition at line 47 of file CUnitTime.hpp.
|
static |
Returns the list of supported human-readable format/unit symbols.
Definition at line 41 of file CUnitTime.cpp.
|
static |
Returns the human-readable symbol corresponding to the given format/unit ID.
Definition at line 46 of file CUnitTime.cpp.
|
static |
Returns the format/unit ID corresponding to the given human-readable symbol.
Definition at line 51 of file CUnitTime.cpp.
|
static |
Returns the list of supported machine-friendly format/unit codes.
Definition at line 56 of file CUnitTime.cpp.
|
static |
Returns the machine-friendly code corresponding to the given format/unit ID.
Definition at line 61 of file CUnitTime.cpp.
|
static |
Returns the format/unit ID corresponding to the given machine-friendly code.
Definition at line 66 of file CUnitTime.cpp.
|
static |
Returns the converted value, using the specified format/unit.
Definition at line 71 of file CUnitTime.cpp.
|
static |
Returns the formatted represention of the given value, using the specified format/unit and decimal precision.
Definition at line 79 of file CUnitTime.cpp.
|
static |
Returns the formatted represention of the given value, using the application settings.
Definition at line 114 of file CUnitTime.cpp.
|
static |
Returns the numeric value corresponding (parsed) from the string.
This methods will attempt to automatically detect the used format/unit. If the format/unit can not be determined, it will default to the (optionally) specified format/unit). The success of the parsing may be retrieved using the (optionally) supplied boolean flag.
[in] | _rqString | Formatted represention of the value |
[in] | _fdDate | Date part, in seconds from Unix epoch (required for proper DST handling) |
[in] | _eUnitTimeZone | Timezone format/unit (if none can be automatically determined) |
[out] | _pbOK | Parsing success status |
Definition at line 122 of file CUnitTime.cpp.
|
static |
Returns the numeric value corresponding (parsed) from the string, using the application settings.
Definition at line 177 of file CUnitTime.cpp.
|
staticprivate |
Container for supported human-readable format/unit symbols.
Definition at line 55 of file CUnitTime.hpp.
|
staticprivate |
Container for supported machine-friendly format/unit codes.
Definition at line 57 of file CUnitTime.hpp.