QKnxTimeBase Class

The 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()
QKnxTimeBase(quint8 h, quint8 m, quint8 s = ..., QAbstractKnxTime::DayOfWeek day = ...)
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

Detailed Description

The QKnxTimeBase class is a base class for datapoint types that contain time information.

See also QKnxTime, QKnxTime24, and Qt KNX Datapoint Type Classes.

Member Type Documentation

enum QKnxTimeBase::TimeFlag

This enum holds the time flag.

ConstantValue
QKnxTimeBase::NullTime-1
QKnxTimeBase::MsecPerDay86400000
QKnxTimeBase::SecondsPerHour3600
QKnxTimeBase::MsecPerHour3600000
QKnxTimeBase::SecondsPerMinute60
QKnxTimeBase::MsecPerMinute60000

Member Function Documentation

QKnxTimeBase::QKnxTimeBase()

Creates a datapoint type for storing time information.

QKnxTimeBase::QKnxTimeBase(quint8 h, quint8 m, quint8 s = ..., QAbstractKnxTime::DayOfWeek day = ...)

Creates a datapoint type with hours set to h, minutes to m, seconds to s, and the day of week to day.

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.

See also hour() and second().

qint8 QKnxTimeBase::second() const

Returns the seconds specified as a part of the time information.

See also hour() and minute().

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.

© 2018 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.