A Device represents a installed and configured hardware device. More...
Header: | #include <Device> |
Inherits: |
bool | autoCreated() const |
DeviceClassId | deviceClassId() const |
bool | hasParam(const ParamTypeId & paramTypeId) const |
bool | hasState(const StateTypeId & stateTypeId) const |
DeviceId | id() const |
QString | name() const |
QVariant | paramValue(const ParamTypeId & paramTypeId) const |
ParamList | params() const |
DeviceId | parentId() const |
PluginId | pluginId() const |
void | setName(const QString & name) |
void | setParamValue(const ParamTypeId & paramTypeId, const QVariant & value) |
void | setParams(const ParamList & params) |
void | setParentId(const DeviceId & parentId) |
void | setStateValue(const StateTypeId & stateTypeId, const QVariant & value) |
void | setStates(const QList<State> & states) |
bool | setupComplete() const |
State | state(const StateTypeId & stateTypeId) const |
QVariant | stateValue(const StateTypeId & stateTypeId) const |
QList<State> | states() const |
void | nameChanged() |
void | stateValueChanged(const QUuid & stateTypeId, const QVariant & value) |
A Device represents a installed and configured hardware device.
This class holds the values for configured devices. It is associated with a {DeviceClass} which can be used to get more details about the device.
See also DeviceClass and DeviceDescriptor.
Returns true if this device has been auto-created (not created by the user)
Returns the deviceClassId of the associated DeviceClass.
Returns true, a Param with the given paramTypeId exists for this Device.
Returns true, a State with the given stateTypeId exists for this Device.
Returns the id of this Device.
Returns the name of this Device. This is visible to the user.
See also setName().
[signal]
void Device::nameChanged()Returns the value of the Param of this Device with the given paramTypeId.
See also setParamValue().
Returns the parameter of this Device. It must match the parameter description in the associated DeviceClass.
See also setParams().
Returns the DeviceId of the parent Device from Device. If the parentId is not set, this device is a parent device.
See also setParentId().
Returns the id of the DevicePlugin this Device is managed by.
Set the name for this Device. This is visible to the user.
See also name().
Sets the value of the Param with the given paramTypeId.
See also paramValue().
Sets the params of this Device. It must match the parameter description in the associated DeviceClass.
See also params().
Sets the parentId of this Device. If the parentId is not set, this device is a parent device.
See also parentId().
For convenience, this finds the State matching the given stateTypeId in this Device and sets the current value to value.
See also stateValue().
Set the States of this Device to the given states.
See also states().
Returns true, if setup of this Device is already completed.
Returns the State with the given stateTypeId of this Device.
For convenience, this finds the State matching the given stateTypeId and returns the current valie in this Device.
See also setStateValue().
[signal]
void Device::stateValueChanged(const QUuid & stateTypeId, const QVariant & value)This signal is emitted when the State with the given stateTypeId changed. The value parameter describes the new value of the State.
Returns the states of this Device. It must match the StateType description in the associated DeviceClass.
See also setStates().