![]() |
VR-Forces Developer's Guide
|
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.

Classes | |
| struct | FormatsSet |
| struct | IlluminationIconData |
| struct | TimezoneData |
Public Types | |
| typedef std::map< std::string, TimezoneData > | Timezones |
| typedef std::map< int, std::vector < IlluminationIconData > > | IlluminationIcon |
| typedef std::vector< std::string > | DateTimeFormats |
| typedef std::map< std::string, FormatsSet > | FormatsSetsMap |
Public Member Functions | |
| DtTimeZoneManager (makVrv::DtDe &) | |
| virtual | ~DtTimeZoneManager () override |
| virtual const Timezones & | timezones () const |
| virtual void | setUseLocalTimezone (bool) |
| virtual bool | useLocalTimezone () const |
| virtual void | setBlockLocalTimeZoneUsage (bool) |
| virtual bool | blockLocalTimeZoneUsage () const |
| virtual void | setDateAndTimeOfDayFormat (const std::string &) |
| virtual std::string | dateAndTimeOfDayFormat () const |
| virtual time_t | offsetForTimezone (const std::string &key) const |
| virtual time_t | modifyTimeBasedOnTimezoneSelection (time_t) |
| virtual void | setCurrentTimezone (const std::string &) |
| virtual std::string | currentTimezone () const |
| virtual void | setCurrentFormatsSet (const std::string &) |
| virtual std::string | currentFormatsSet () const |
| virtual std::string | currentTimezoneAbbreviation () const |
| virtual std::string | timezoneTitle () const |
| virtual time_t | offsetForTimezone () const |
| virtual time_t | convertFromLocalTimeToUtcTime (time_t) const |
| virtual time_t | currentUtcDateTime () const |
| virtual time_t | currentLocalDateTime () const |
| virtual time_t | convertFromUtcTimeToLocalTime (time_t) const |
| 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 | convertToUtcTime (int y, int m, int d, int h, int mm, int sec) const |
| virtual time_t | convert (const std::string &source, time_t, const std::string &dest) |
| virtual void | load (const DtFilename &, bool merge=false) |
| virtual std::string | dateTimeFormatString (time_t) |
| virtual double | illuminationValue (const DtGeodeticCoord &position, time_t time, double nighttimeMaximum=0.1, double illuminationMinimum=0.001, bool useGMTPosition=false, int *sunstate=0) const |
| virtual double | maximumNighttimeValue () const |
| virtual void | setMaximumNighttimeValue (double) |
| virtual double | minimumIlluminationValue () |
| virtual void | setMinimumIlluminationValue (double) |
| virtual std::string | illuminationIcon (double illumination, int sunState) const |
| virtual void | addIlluminationIcon (int sunState, double lowIllumination, double highIllumination, const std::string &) |
| const IlluminationIcon & | illuminationIcons () const |
| IlluminationIcon & | illuminationIcons () |
| virtual void | resetSystemDateTime () |
| virtual time_t | utcTime (struct tm *tod) const |
| virtual time_t | offsetTimeByObserverPosition (time_t curTime) const |
| virtual time_t | unoffsetTimeByObserverPosition (time_t curTime) const |
| virtual time_t | timeZoneOffsetForPosition (const DtVector &) const |
| virtual time_t | timeZoneOffsetForCurrentObserver () const |
| virtual time_t | utcOffsetHours () const |
| virtual QString | utcLabel () const |
| virtual time_t | currentSimulationUtcTime () const |
| virtual const DateTimeFormats & | dateTimeFormats () const |
| virtual DateTimeFormats & | dateTimeFormats () |
Public Member Functions inherited from makVrv::DtVirtualBaseClass | |
| DtVirtualBaseClass () | |
| virtual | ~DtVirtualBaseClass () |
Static Public Member Functions | |
| static DtTimeZoneManager & | instance (makVrv::DtDe &de) |
| static void | registerInstance (makVrv::DtDe &, DtTimeZoneManager *) |
Public Attributes | |
| boost::signals2::signal< void(std::string, std::string)> | signal_timezoneChanged |
| boost::signals2::signal< void(std::string)> | signal_dateAndTimeFormatChanged |
| boost::signals2::signal< void(std::string)> | signal_formatsSetChanged |
| boost::signals2::signal< void(time_t old, time_t newTime)> | signal_utcTimeChangedWithObserverPosition |
Protected Member Functions | |
| virtual void | tick () |
Protected Attributes | |
| Timezones | myTimezones |
| makVrv::DtDe & | myDe |
| double | myNighttimeMaximumValue |
| double | myMinimumIlluminationValue |
| IlluminationIcon | myIlluminationIcons |
| DateTimeFormats | myDateTimeFormats |
| FormatsSetsMap | myFormatsSetsMap |
| time_t | myCurrentObserverUTCOffsetTime |
| boost::signals2::scoped_connection | myObserverTrackConnection |
| bool | myBlockLocalTimeZoneUsage |
| 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 |
| typedef std::map<std::string, FormatsSet> makVrf::DtTimeZoneManager::FormatsSetsMap |
| makVrf::DtTimeZoneManager::DtTimeZoneManager | ( | makVrv::DtDe & | ) |
CTOR.
|
overridevirtual |
DTOR.
|
static |
Returns instance of the manager.
|
static |
Register a new manager instance.
|
virtual |
|
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 |
Block the usage of local time zone. This is needed for displays without observers.
|
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 |
Returns offset for the current timezone. Returned in seconds.
|
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 key and sends out signal for the timezone change.
|
virtual |
Returns current timezone. Blank timezone means local timezone.
|
virtual |
Sets the current formatsSet by key and sends out signal for the change.
|
virtual |
Returns current formatsSet.
|
virtual |
Returns current timezone abbreviation. 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 |
|
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 |
|
virtual |
Resets the system date and time to the current date/time at 10am GMT.
|
virtual |
|
virtual |
Given the current observer position, add the time given by the time zone the observer is in.
|
virtual |
Given the current observer position, subtract the time given by the time zone the observer is in.
|
virtual |
Give the time zone offset for the current geocentric position. The time is in seconds.
|
virtual |
Return the time zone offset for the current observer position. The time is in seconds.
|
virtual |
Given current settings, return the hours offset of either the current fixed time-zone or a time zone based on the observer position.
|
virtual |
Given the current time zone, return a UTC string +/- hours from GMT.
|
virtual |
Current UTC time from the back-end manager. If time is not frozen this will be converted to local time as the first entity has not yet been placed.
|
protectedvirtual |
| boost::signals2::signal<void (std::string, std::string)> makVrf::DtTimeZoneManager::signal_timezoneChanged |
Signal of old and new timezone.
| boost::signals2::signal<void (std::string)> makVrf::DtTimeZoneManager::signal_dateAndTimeFormatChanged |
| boost::signals2::signal<void(std::string)> makVrf::DtTimeZoneManager::signal_formatsSetChanged |
| boost::signals2::signal<void (time_t old, time_t newTime)> makVrf::DtTimeZoneManager::signal_utcTimeChangedWithObserverPosition |
Signal sent when tracking observer position and the utc time changes because of that.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |