QKnxTimeBase Class

template <typename Derived> class QKnxTimeBase

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

头: #include <QKnxTimeBase>
qmake: QT += knx
继承: QAbstractKnxTime
继承者:

QKnxTime and QKnxTime24

公共函数

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

静态公共成员

bool isValid (qint8 h , qint8 m , qint8 s )

保护类型

enum TimeFlag { NullTime, MsecPerDay, SecondsPerHour, MsecPerHour, SecondsPerMinute, MsecPerMinute }

保护函数

int ds () const

详细描述

另请参阅 QKnxTime , QKnxTime24 ,和 Qt KNX Datapoint Type Classes .

成员类型文档编制

enum QKnxTimeBase:: TimeFlag

This enum holds the time flag.

常量
QKnxTimeBase::NullTime -1
QKnxTimeBase::MsecPerDay 86400000
QKnxTimeBase::SecondsPerHour 3600
QKnxTimeBase::MsecPerHour 3600000
QKnxTimeBase::SecondsPerMinute 60
QKnxTimeBase::MsecPerMinute 60000

成员函数文档编制

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.

另请参阅 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.

另请参阅 minute () 和 second ().

bool QKnxTimeBase:: isNull () const

返回 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.

另请参阅 isValid ().

[static] bool QKnxTimeBase:: isValid ( qint8 h , qint8 m , qint8 s )

返回 true if the values specified for hours h , minutes m , and seconds s are valid; otherwise returns false .

bool QKnxTimeBase:: isValid () const

返回 true if the time is valid; otherwise returns false .

另请参阅 isNull ().

qint8 QKnxTimeBase:: minute () const

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

另请参阅 hour () 和 second ().

qint8 QKnxTimeBase:: second () const

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

另请参阅 hour () 和 minute ().

void QKnxTimeBase:: setDayOfWeek ( QAbstractKnxTime::DayOfWeek day )

Sets the day of the week to day .

另请参阅 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.

另请参阅 isValid ().

bool QKnxTimeBase:: operator!= (const QKnxTimeBase < Derived > & o ) const

返回 true if this time is different from o ;否则返回 false .

bool QKnxTimeBase:: operator< (const QKnxTimeBase < Derived > & o ) const

返回 true 若此时间早于 o ;否则返回 false .

bool QKnxTimeBase:: operator<= (const QKnxTimeBase < Derived > & o ) const

返回 true 若此时间早于或等于 o ;否则返回 false .

bool QKnxTimeBase:: operator== (const QKnxTimeBase < Derived > & o ) const

返回 true 若此时间等于 o ;否则返回 false .

bool QKnxTimeBase:: operator> (const QKnxTimeBase < Derived > & o ) const

返回 true 若此时间晚于 o ;否则返回 false .

bool QKnxTimeBase:: operator>= (const QKnxTimeBase < Derived > & o ) const

返回 true if this time is equal to or later than o ;否则返回 false .