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 .
This enum holds the time flag.
常量 | 值 |
---|---|
QKnxTimeBase::NullTime
|
-1
|
QKnxTimeBase::MsecPerDay
|
86400000
|
QKnxTimeBase::SecondsPerHour
|
3600
|
QKnxTimeBase::MsecPerHour
|
3600000
|
QKnxTimeBase::SecondsPerMinute
|
60
|
QKnxTimeBase::MsecPerMinute
|
60000
|
Creates a datapoint type with hours set to h , minutes to m , seconds to s , and the day of week to day .
Creates a datapoint type for storing time information.
Returns the day of the week.
另请参阅 setDayOfWeek ().
[protected]
int
QKnxTimeBase::
ds
() const
Returns the month, day, and seconds.
Returns the hour specified as a part of the time information.
返回
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
.
返回
true
if the time is valid; otherwise returns
false
.
另请参阅 isNull ().
Returns the minutes specified as a part of the time information.
Returns the seconds specified as a part of the time information.
Sets the day of the week to day .
另请参阅 dayOfWeek ().
Sets the time to the hour h , minutes m , and seconds s if the given arguments are valid.
另请参阅 isValid ().
返回
true
if this time is different from
o
;否则返回
false
.
返回
true
若此时间早于
o
;否则返回
false
.
返回
true
若此时间早于或等于
o
;否则返回
false
.
返回
true
若此时间等于
o
;否则返回
false
.
返回
true
若此时间晚于
o
;否则返回
false
.
返回
true
if this time is equal to or later than
o
;否则返回
false
.