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 .