Public Member Functions

HStateVariableEvent Class Reference
[Device Model]

A class used to transfer HStateVariable event information. More...

#include <HStateVariableEvent>

List of all members.

Public Member Functions

 HStateVariableEvent ()
 HStateVariableEvent (HStateVariable *eventSource, const QVariant &previousValue, const QVariant &newValue)
 HStateVariableEvent (const HStateVariableEvent &)
virtual ~HStateVariableEvent ()
HStateVariableEventoperator= (const HStateVariableEvent &)
bool isValid () const
HStateVariableeventSource () const
QVariant previousValue () const
QVariant newValue () const

Detailed Description

See also:
HStateVariable::valueChanged()
Remarks:
this class is not thread-safe.

Constructor & Destructor Documentation

Creates a new, invalid instance.

See also:
isValid()
HStateVariableEvent ( HStateVariable eventSource,
const QVariant &  previousValue,
const QVariant &  newValue 
)

Creates a new instance based on the provided values.

Parameters:
eventSource specifies the state variable that generated the event.
previousValue specifies the value before the value changed.
newValue specifies the newly set value.
Remarks:
in case the previousValue and newValue contains a different data types, the values are ignored and the object will be invalid. Similarly, if the eventSource is not defined, the object will be invalid.
See also:
isValid()
HStateVariableEvent ( const HStateVariableEvent other  ) 

Copy constructor.

Copies the contents of the other to this.

~HStateVariableEvent (  )  [virtual]

Destroys the instance.


Member Function Documentation

HStateVariableEvent & operator= ( const HStateVariableEvent other  ) 

Assigns the contents of the other object to this.

Returns:
reference to this object.
bool isValid (  )  const

Indicates whether the object is valid.

Returns:
true in case previousValue() and newValue() return a valid QVariant and eventSource() is defined.
HStateVariable * eventSource (  )  const

Returns the source state variable that generated the event.

Returns:
the source state variable that generated the event.
QVariant previousValue (  )  const

Returns the previous value of the state variable.

Returns:
the previous value of the state variable.
QVariant newValue (  )  const

Returns the new, changed value of the state variable.

Returns:
the new, changed value of the state variable.