eVaf
eVaf::Common::Event Class Reference

Event class for all the eVaf events. More...

#include <Common/event.h>

Public Member Functions

QSharedDatadata () const
 Returns the shared data object attached to the event. More...
 
 Event (uint eventId, quint32 intValue=0, QSharedData *dataObj=0)
 Creates the event object. More...
 
uint id () const
 Returns the event ID value. More...
 
quint32 value () const
 Returns the 32-bit integer value. More...
 

Static Public Attributes

static QEvent::Type const eVafEvent
 Event type for eVaf events. More...
 

Detailed Description

Event class for all the eVaf events.

@include <Common/Event>

The Event class is an event container for all the eVaf events.

Definition at line 39 of file event.h.

Constructor & Destructor Documentation

eVaf::Common::Event::Event ( uint  eventId,
quint32  intValue = 0,
QSharedData dataObj = 0 
)
inline

Creates the event object.

Parameters
eventIdThe ID of the event
intValueA 32-bit integer value
dataObjShared data object attached to the event

Creates the event object with the given event ID value and attaches optional data to the event.

The optional 32-bit integer value can be used to store information that fits into the value and is not reference-counted.

The optional reference-counted shared data object is owned by the event and the reference counter is decreased by 1 when the event object is destroyed. If nobody else claimed the ownership, then the shared data object is destroyed too.

Definition at line 61 of file event.h.

Member Function Documentation

QSharedData* eVaf::Common::Event::data ( ) const
inline

Returns the shared data object attached to the event.

The shared data object is valid only while in the event handler. Once the event loop is finished, the event and shared data attached to it are destroyed. To keep the shared data object, use QExplicitlySharedDataPointer<> to claim ownership.

Definition at line 85 of file event.h.

uint eVaf::Common::Event::id ( ) const
inline

Returns the event ID value.

Definition at line 71 of file event.h.

quint32 eVaf::Common::Event::value ( ) const
inline

Returns the 32-bit integer value.

Definition at line 76 of file event.h.

Member Data Documentation

QEvent::Type const eVaf::Common::Event::eVafEvent
static

Event type for eVaf events.

Definition at line 44 of file event.h.


The documentation for this class was generated from the following file: