SystemTime Class

The SystemTime class manages the system date and time. More...

Header: #include <SystemTime>
qmake: QT += timedatesettings
Inherits: QObject

Properties

  • 1 property inherited from QObject

Public Functions

SystemTime(QObject *parent = Q_NULLPTR)
bool ntp() const
void setNtp(const bool aNtp)
void setTime(const QDateTime &aTime)
void setTimeZone(const QString &aTimeZone)
QDateTime time() const
QString timeZone() const
  • 31 public functions inherited from QObject

Signals

void ntpChanged()
void timeChanged()
void timeZoneChanged()

Static Public Members

const QMetaObject staticMetaObject
  • 9 static public members inherited from QObject

Protected Functions

SystemTime(const SystemTime &)
SystemTime &operator=(const SystemTime &)
  • 9 protected functions inherited from QObject

Protected Variables

SystemTimePrivate *d_ptr

Additional Inherited Members

  • 1 public slot inherited from QObject

Detailed Description

The SystemTime class manages the system date and time.

Property Documentation

ntp : bool

Holds whether the system time is synchronized using NTP (Network Time Protocol).

Access functions:

bool ntp() const
void setNtp(const bool aNtp)

Notifier signal:

void ntpChanged()

time : QDateTime

Holds the current date and time.

Access functions:

QDateTime time() const
void setTime(const QDateTime &aTime)

Notifier signal:

void timeChanged()

timeZone : QString

Holds the current time zone string.

Access functions:

QString timeZone() const
void setTimeZone(const QString &aTimeZone)

Notifier signal:

void timeZoneChanged()

Member Function Documentation

SystemTime::SystemTime(QObject *parent = Q_NULLPTR)

Default constructs an instance of SystemTime.

[protected] SystemTime::SystemTime(const SystemTime &)

Default constructs an instance of SystemTime.

[protected] SystemTime &SystemTime::operator=(const SystemTime &)

Copy-assignment operator.

© 2019 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.