![]() |
VR-Forces 4.3 Class Documentation
|
The timezone manager keeps track of all timezones available for the user to select from in the system. More...

Classes | |
| struct | IlluminationIconData |
| struct | TimezoneData |
Public Types | |
| typedef std::map< std::string, TimezoneData > | Timezones |
| Key is abbreviation. | |
| typedef std::map< int, std::vector < IlluminationIconData > > | IlluminationIcon |
| typedef std::vector< std::string > | DateTimeFormats |
Public Member Functions | |
| DtTimeZoneManager (makVrv::DtDe &) | |
| CTOR. | |
| virtual | ~DtTimeZoneManager () |
| DTOR. | |
| virtual const Timezones & | timezones () const |
| virtual void | addTimezone (const std::string &abbrev, const std::string &title, double offset, const std::string &location) |
| Adds a new timezone into the system. | |
| virtual void | removeTimezone (const std::string &abbrev) |
| Removes the current timezone by abbreviation. | |
| virtual void | setUseLocalTimezone (bool) |
| Use local timezone for timezone, irregardless of what the current timezone is set to be. | |
| virtual bool | useLocalTimezone () const |
| virtual void | setDateAndTimeOfDayFormat (const std::string &) |
| Sets the format for displaying the date/time of day as specified in Qt documentation. | |
| virtual std::string | dateAndTimeOfDayFormat () const |
| virtual time_t | offsetForTimezone (const std::string &abbrev) const |
| Returns offset for the current timezone. | |
| virtual time_t | modifyTimeBasedOnTimezoneSelection (time_t) |
| Returns time based from utc time on current timezone selected as defined in the application settings. | |
| virtual void | setCurrentTimezone (const std::string &) |
| Sets the current timezone by abbreviation and sends out signal for the timezone change. | |
| virtual std::string | currentTimezone () const |
| Returns current timezone. Blank timezone means local timezone. | |
| virtual std::string | timezoneTitle () const |
| Returns the title of the currently selected timezone. | |
| virtual time_t | offsetForTimezone () const |
| Returns the offset for the currently selected timezone. | |
| virtual time_t | convertFromLocalTimeToUtcTime (time_t) const |
| Converts from local timezone time to utc time. | |
| virtual time_t | currentUtcDateTime () const |
| Return current simulation date/time as a UTC time. | |
| virtual time_t | currentLocalDateTime () const |
| Return current simulation date/time in local timezone representation. | |
| virtual time_t | convertFromUtcTimeToLocalTime (time_t) const |
| Converts from utc time to local timezone. | |
| virtual void | convertFromUtcTimeToLocalTime (int y, int m, int d, int h, int mm, int sec, int &year, int &month, int &day, int &hours, int &minutes, int &seconds) const |
| virtual time_t | convert (const std::string &source, time_t, const std::string &dest) |
| Converts from supplied timezone to new local timezone given a time in the supplied timezone time. | |
| virtual void | load (const DtFilename &, bool merge=false) |
| Loads the timezone file, clearing any existing timezones first if the merge flag is false. | |
| virtual std::string | dateTimeFormatString (time_t) |
| Returns a string formatted with asctime for the current utc value offset to the local timezone. | |
| virtual double | illuminationValue (const DtGeodeticCoord &position, time_t time, double nighttimeMaximum=0.1, double illuminationMinimum=0.001, bool useGMTPosition=false, int *sunstate=0) const |
| Give a geodetic coordinate and a UTC time, return an illumination value (0 - 1) at that position based on sun/moon position. | |
| virtual double | maximumNighttimeValue () const |
| Get/set the maximum nighttime value. Default is .2. | |
| virtual void | setMaximumNighttimeValue (double) |
| virtual double | minimumIlluminationValue () |
| Get/set the minimal value that the illumination can be. Default is .1. | |
| virtual void | setMinimumIlluminationValue (double) |
| virtual std::string | illuminationIcon (double illumination, int sunState) const |
| Returns the illumination icon given the sunstate and the illumination value. | |
| virtual void | addIlluminationIcon (int sunState, double lowIllumination, double highIllumination, const std::string &) |
| Adds a new illumination icon for the given state and the given range of illumination values. | |
| const IlluminationIcon & | illuminationIcons () const |
| IlluminationIcon & | illuminationIcons () |
| virtual const DateTimeFormats & | dateTimeFormats () const |
| virtual DateTimeFormats & | dateTimeFormats () |
| virtual void | addDateTimeFormat (const std::string &) |
Public Member Functions inherited from makVrv::DtVirtualBaseClass | |
| DtVirtualBaseClass () | |
| Do nothing constructor. | |
| virtual | ~DtVirtualBaseClass () |
| Virtual do nothing destructor. | |
Static Public Member Functions | |
| static DtTimeZoneManager & | instance (makVrv::DtDe &de) |
| Returns instance of the manager. | |
| static void | registerInstance (makVrv::DtDe &, DtTimeZoneManager *) |
| Register a new manager instance. | |
Public Attributes | |
| boost::signal< void(std::string, std::string)> | signal_timezoneChanged |
| Signal of old and new timezone. | |
| boost::signal< void(std::string)> | signal_dateAndTimeFormatChanged |
Protected Attributes | |
| Timezones | myTimezones |
| makVrv::DtDe & | myDe |
| double | myNighttimeMaximumValue |
| double | myMinimumIlluminationValue |
| IlluminationIcon | myIlluminationIcons |
| DateTimeFormats | myDateTimeFormats |
The timezone manager keeps track of all timezones available for the user to select from in the system.
It will also modify UTC timezones for the currently selected timezone. The default timezone file loaded is from the settings directory, timezones.csv
| typedef std::map<std::string, TimezoneData> makVrf::DtTimeZoneManager::Timezones |
Key is abbreviation.
| typedef std::map<int, std::vector<IlluminationIconData> > makVrf::DtTimeZoneManager::IlluminationIcon |
| typedef std::vector<std::string> makVrf::DtTimeZoneManager::DateTimeFormats |
| makVrf::DtTimeZoneManager::DtTimeZoneManager | ( | makVrv::DtDe & | ) |
CTOR.
|
virtual |
DTOR.
|
static |
Returns instance of the manager.
|
static |
Register a new manager instance.
|
virtual |
|
virtual |
Adds a new timezone into the system.
|
virtual |
Removes the current timezone by abbreviation.
|
virtual |
Use local timezone for timezone, irregardless of what the current timezone is set to be.
If set to false use the timezone that is set
|
virtual |
|
virtual |
Sets the format for displaying the date/time of day as specified in Qt documentation.
Default is: MM/dd/yyyy hh:mm Sends out signal when format has changed
|
virtual |
|
virtual |
Date/time format information. To remove or change use the non-const member access to get direct access to the date/time format list
|
virtual |
Date/time format information. To remove or change use the non-const member access to get direct access to the date/time format list
|
virtual |
Date/time format information. To remove or change use the non-const member access to get direct access to the date/time format list
|
virtual |
Returns offset for the current timezone.
|
virtual |
Returns time based from utc time on current timezone selected as defined in the application settings.
If no settings are specific assume local timezone
|
virtual |
Sets the current timezone by abbreviation and sends out signal for the timezone change.
|
virtual |
Returns current timezone. Blank timezone means local timezone.
|
virtual |
Returns the title of the currently selected timezone.
|
virtual |
Returns the offset for the currently selected timezone.
|
virtual |
Converts from local timezone time to utc time.
|
virtual |
Return current simulation date/time as a UTC time.
|
virtual |
Return current simulation date/time in local timezone representation.
|
virtual |
Converts from utc time to local timezone.
|
virtual |
|
virtual |
Converts from supplied timezone to new local timezone given a time in the supplied timezone time.
|
virtual |
Loads the timezone file, clearing any existing timezones first if the merge flag is false.
|
virtual |
Returns a string formatted with asctime for the current utc value offset to the local timezone.
|
virtual |
Give a geodetic coordinate and a UTC time, return an illumination value (0 - 1) at that position based on sun/moon position.
The nighttimeMaximum is the maximum illumination to the full moon. The minimum illumination is that of sunset and no moon (accounting for possible illumination due to stars).
If use GMT position is true then the illumination value returned will always be 1.0
If sunstate is defined, returns the following value: 0 - Sun is not visible 1 - Sun is fully visible 2 - Dawn 3 - Dusk
|
virtual |
Get/set the maximum nighttime value. Default is .2.
|
virtual |
|
virtual |
Get/set the minimal value that the illumination can be. Default is .1.
|
virtual |
|
virtual |
Returns the illumination icon given the sunstate and the illumination value.
|
virtual |
Adds a new illumination icon for the given state and the given range of illumination values.
|
inline |
|
inline |
| boost::signal<void (std::string, std::string)> makVrf::DtTimeZoneManager::signal_timezoneChanged |
Signal of old and new timezone.
| boost::signal<void (std::string)> makVrf::DtTimeZoneManager::signal_dateAndTimeFormatChanged |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |