Describes the centralized time manager of nymea. More...
Header: | #include <TimeManager> |
Inherits: |
TimeManager(const QByteArray & timeZone, QObject * parent = 0) | |
QList<QByteArray> | availableTimeZones() const |
QDate | currentDate() const |
QDateTime | currentDateTime() const |
QTime | currentTime() const |
void | setTime(const QDateTime & dateTime) |
bool | setTimeZone(const QByteArray & timeZone = QTimeZone::systemTimeZoneId()) |
void | stopTimer() |
QByteArray | timeZone() const |
void | dateTimeChanged(const QDateTime & dateTime) |
void | tick() |
Describes the centralized time manager of nymea.
Constructs a new TimeManager with the given timeZone and parent.
Returns a list of available time zones on this system.
Returns the current date of this TimeManager.
Returns the current dateTime of this TimeManager.
Returns the current time of this TimeManager.
[signal]
void TimeManager::dateTimeChanged(const QDateTime & dateTime)Will be emitted when the dateTime has changed.
Set the current time of this TimeManager to the given dateTime. * *
Note: This method should only be used in tests.
Sets the timeZone of this TimeManager. Allowed values according to the IANA database. Returns false if the given timezone is not valid.
See also timeZone().
Stop the time. * *
Note: This method should only be used in tests.
[signal]
void TimeManager::tick()Represents the central time tick. Will be emitted every second.
Returns the time zone of this TimeManager.
See also setTimeZone().