Class that provides write access to a state variable. More...
#include <HWritableStateVariable>
Public Member Functions | |
virtual | ~HWritableStateVariable () |
bool | setValue (const QVariant &newValue) |
HWritableStateVariable
is a core component of the HUPnP Device Model and it models a UPnP state variable, which allows read-write access. Typically, instances of this class are available only on server-side.
QObject
ancestor is largely not. ~HWritableStateVariable | ( | ) | [virtual] |
Destroys the instance.
An HWritableStateVariable
is always destroyed by the containing HService when it is being deleted. You should never destroy an HWritableStateVariable
.
bool setValue | ( | const QVariant & | newValue | ) |
Changes the value of the state variable.
If the instance is evented (eventingType() is not HStateVariable::NoEvents), after the value has been changed, valueChanged() signal is emitted.
newValue | specifies the new value of the state variable. The new value must have the same underlying data type as the previous value (and the default value). If the new value has different data type, the value is not changed, no event is sent and false is returned. |
true | in case the new value was successfully set. | |
false | in case the new value could not be set. |
Reimplemented from HStateVariable.