The QKnxDate class is a datapoint type for a date. 更多...
头: | #include <QKnxDate> |
qmake: | QT += knx |
继承: | QKnxFixedSizeDatapointType |
QKnxDate (quint16 year , quint8 month , quint8 day ) | |
QKnxDate (const QDate & date ) | |
QKnxDate () | |
quint8 | day () const |
quint8 | month () const |
bool | setDay (quint8 day ) |
bool | setMonth (quint8 month ) |
bool | setValue (const QDate & date ) |
bool | setYear (quint16 year ) |
QDate | value () const |
quint16 | year () const |
virtual bool | isValid () const override |
This is a fixed size datapoint type with the length of 3 bytes.
The left byte of the data holds the day as 5 bits, the middle byte holds the month as 4 bits, and the right byte holds the year as 7 bits.
Valid dates are from
Monday, 1990-01-01
to
Saturday, 2089-12-31
.
另请参阅 QKnxDatapointType and Qt KNX Datapoint Type Classes .
Creates a fixed size datapoint type with the year set to year , month to month , and day to day .
Creates a fixed size datapoint type with the date set to date .
Creates a fixed size datapoint type with the date set to
2000, 0, 0
.
Returns the day stored in the datapoint type.
另请参阅 setDay ().
[override virtual]
bool
QKnxDate::
isValid
() const
重实现: QKnxDatapointType::isValid () const.
Returns the month stored in the datapoint type.
另请参阅 setMonth ().
Sets the day to day .
If the value is outside the allowed range, returns
false
and does not set the value.
另请参阅 day ().
Sets the month to month .
If the value is outside the allowed range, returns
false
and does not set the value.
另请参阅 month ().
Sets the date stored in the datapoint type to date .
If the value is outside the allowed range, returns
false
and does not set the value.
另请参阅 value ().
Sets the year to year .
If the value is outside the allowed range, returns
false
and does not set the value.
另请参阅 year ().
Returns the date stored in the datapoint type.
另请参阅 setValue ().
Returns the year stored in the datapoint type.
另请参阅 setYear ().