The QKnxSceneControl class is a datapoint type for a scene control. 更多...
头: | #include <QKnxSceneControl> |
qmake: | QT += knx |
继承: | QKnxFixedSizeDatapointType |
enum | Control { Activate, Learn } |
QKnxSceneControl (quint8 sceneNumber , QKnxSceneControl::Control control ) | |
QKnxSceneControl () | |
QKnxSceneControl::Control | control () const |
quint8 | sceneNumber () const |
bool | setControl (QKnxSceneControl::Control control ) |
bool | setSceneNumber (quint8 number ) |
bool | setValue (quint8 sceneNumber , QKnxSceneControl::Control control ) |
virtual bool | isValid () const override |
This is a fixed size datapoint type with the length of 1 byte.
A scene control can be used to activate or learn the corresponding scene number. The range for scene numbers is from
0
to
63
.
另请参阅 Control , QKnxDatapointType , QKnxSceneNumber , QKnxSceneInfo ,和 Qt KNX Datapoint Type Classes .
This enum holds the action for the scene control.
常量 | 值 | 描述 |
---|---|---|
QKnxSceneControl::Activate
|
0x00
|
Activate the scene corresponding to the scene number. |
QKnxSceneControl::Learn
|
0x01
|
Learn the scene corresponding to the scene number. |
Creates a fixed size datapoint type with the scene number set to sceneNumber and the scene control action set to control .
另请参阅 Control .
Creates a fixed size datapoint type with the scene number set to
0
and the scene control action set to
Activate
.
另请参阅 Control .
Returns the scene control action stored in the datapoint type.
另请参阅 setControl ().
[override virtual]
bool
QKnxSceneControl::
isValid
() const
重实现: QKnxDatapointType::isValid () const.
Returns the scene number stored in the datapoint type.
另请参阅 setSceneNumber ().
Sets the scene control action stored in the datapoint type to control .
返回
true
if the value was set successfully.
另请参阅 control ().
Sets the scene number stored in the datapoint type to number .
If the value is outside the allowed range, returns
false
and does not set the value.
另请参阅 sceneNumber ().
Sets the scene number stored in the datapoint type to sceneNumber and the scene control action to control .
返回
true
if the value was set; otherwise returns
false
.