QKnxTimeBase Class
template <typename Derived> class QKnxTimeBaseThe QKnxTimeBase class is a base class for datapoint types that contain time information. More...
Header: | #include <QKnxTimeBase> |
qmake: | QT += knx |
Inherits: | QAbstractKnxTime |
Inherited By: | QKnxTime and QKnxTime24 |
Public Functions
QKnxTimeBase(quint8 h, quint8 m, quint8 s = 0, QAbstractKnxTime::DayOfWeek day = DayOfWeek::Ignore) | |
QKnxTimeBase() | |
QAbstractKnxTime::DayOfWeek | dayOfWeek() const |
qint8 | hour() const |
bool | isNull() const |
bool | isValid() const |
qint8 | minute() const |
qint8 | second() const |
void | setDayOfWeek(QAbstractKnxTime::DayOfWeek day) |
void | setHMS(quint8 h, quint8 m, quint8 s) |
bool | operator!=(const QKnxTimeBase<Derived> &o) const |
bool | operator<(const QKnxTimeBase<Derived> &o) const |
bool | operator<=(const QKnxTimeBase<Derived> &o) const |
bool | operator==(const QKnxTimeBase<Derived> &o) const |
bool | operator>(const QKnxTimeBase<Derived> &o) const |
bool | operator>=(const QKnxTimeBase<Derived> &o) const |
Static Public Members
bool | isValid(qint8 h, qint8 m, qint8 s) |
Protected Types
enum | TimeFlag { NullTime, MsecPerDay, SecondsPerHour, MsecPerHour, SecondsPerMinute, MsecPerMinute } |
Protected Functions
int | ds() const |
See also QKnxTime, QKnxTime24, and Qt KNX Datapoint Type Classes.
Member Type Documentation
enum QKnxTimeBase::TimeFlag
This enum holds the time flag.
Constant | Value |
---|---|
QKnxTimeBase::NullTime | -1 |
QKnxTimeBase::MsecPerDay | 86400000 |
QKnxTimeBase::SecondsPerHour | 3600 |
QKnxTimeBase::MsecPerHour | 3600000 |
QKnxTimeBase::SecondsPerMinute | 60 |
QKnxTimeBase::MsecPerMinute | 60000 |
Member Function Documentation
QKnxTimeBase::QKnxTimeBase(quint8 h, quint8 m, quint8 s = 0, QAbstractKnxTime::DayOfWeek day = DayOfWeek::Ignore)
Creates a datapoint type with hours set to h, minutes to m, seconds to s, and the day of week to day.
QKnxTimeBase::QKnxTimeBase()
Creates a datapoint type for storing time information.
QAbstractKnxTime::DayOfWeek QKnxTimeBase::dayOfWeek() const
Returns the day of the week.
See also setDayOfWeek().
[protected]
int QKnxTimeBase::ds() const
Returns the month, day, and seconds.
qint8 QKnxTimeBase::hour() const
Returns the hour specified as a part of the time information.
See also minute() and second().
bool QKnxTimeBase::isNull() const
Returns true
if the time is null (that is, the time object was constructed using the default constructor); otherwise returns false
. A null time is also an invalid time.
See also isValid().
[static]
bool QKnxTimeBase::isValid(qint8 h, qint8 m, qint8 s)
Returns true
if the values specified for hours h, minutes m, and seconds s are valid; otherwise returns false
.
bool QKnxTimeBase::isValid() const
Returns true
if the time is valid; otherwise returns false
.
See also isNull().
qint8 QKnxTimeBase::minute() const
Returns the minutes specified as a part of the time information.
qint8 QKnxTimeBase::second() const
Returns the seconds specified as a part of the time information.
void QKnxTimeBase::setDayOfWeek(QAbstractKnxTime::DayOfWeek day)
Sets the day of the week to day.
See also dayOfWeek().
void QKnxTimeBase::setHMS(quint8 h, quint8 m, quint8 s)
Sets the time to the hour h, minutes m, and seconds s if the given arguments are valid.
See also isValid().
bool QKnxTimeBase::operator!=(const QKnxTimeBase<Derived> &o) const
Returns true
if this time is different from o; otherwise returns false
.
bool QKnxTimeBase::operator<(const QKnxTimeBase<Derived> &o) const
Returns true
if this time is earlier than o; otherwise returns false
.
bool QKnxTimeBase::operator<=(const QKnxTimeBase<Derived> &o) const
Returns true
if this time is earlier than or equal to o; otherwise returns false
.
bool QKnxTimeBase::operator==(const QKnxTimeBase<Derived> &o) const
Returns true
if this time is equal to o; otherwise returns false
.
bool QKnxTimeBase::operator>(const QKnxTimeBase<Derived> &o) const
Returns true
if this time is later than o; otherwise returns false
.
bool QKnxTimeBase::operator>=(const QKnxTimeBase<Derived> &o) const
Returns true
if this time is equal to or later than o; otherwise returns false
.
© 2024 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.