Version: 8.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SUIT_DataObject::Signal Class Reference

Watcher class, responsible for the emitting signals on behalf of the data objects. More...

#include <SUIT_DataObject.h>

Inheritance diagram for SUIT_DataObject::Signal:
Inheritance graph

Signals

void created (SUIT_DataObject *)
 Emitted when data object is created. More...
 
void destroyed (SUIT_DataObject *)
 Emitted when data object is destroyed. More...
 
void inserted (SUIT_DataObject *, SUIT_DataObject *)
 Emitted when data object is inserted to the parent data object. More...
 
void removed (SUIT_DataObject *, SUIT_DataObject *)
 Emitted when data object is removed from the parent data object. More...
 
void modified (SUIT_DataObject *)
 

Public Member Functions

 Signal ()
 Constructor. More...
 
virtual ~Signal ()
 Destructor. More...
 

Private Member Functions

void emitCreated (SUIT_DataObject *)
 Emit signal about data object creation. More...
 
void emitDestroyed (SUIT_DataObject *)
 Emit signal about data object destroying. More...
 
void emitInserted (SUIT_DataObject *, SUIT_DataObject *)
 Emit signal about data object adding to the parent data object. More...
 
void emitRemoved (SUIT_DataObject *, SUIT_DataObject *)
 Emit signal about data object removed from the parent data object. More...
 
void emitModified (SUIT_DataObject *)
 Emit a signal to notify that the data object has been modified. More...
 
void deleteLater (SUIT_DataObject *)
 Schedule data object for the late deleting. More...
 

Private Attributes

DataObjectList myDelLaterObjects
 

Friends

class SUIT_DataObject
 

Detailed Description

SUIT_DataObject class does not inherit from QObject for the performance reasons, so it can not use signals/slots mechanism directly. Instead it uses the only Signal object to emit the signals when the data object is created, destroyed, inserted to the parent object or removed from it.

If some object needs to handle, for example, data object destroying, it can use SUIT_DataObject::signal() method to connect the signal:

MyHandler* h = new MyHandler();
h, SLOT(onDestroyed(SUIT_DataObject*)) );

The same can be done by using static method SUIT_DataObject::connect(). For example,

MyHandler* h = new MyHandler();
h, SLOT(onDestroyed(SUIT_DataObject*)));

Constructor & Destructor Documentation

SUIT_DataObject::Signal::Signal ( )
SUIT_DataObject::Signal::~Signal ( )
virtual

Destroys data object which are scheduled for the deleting with the deleteLater().

Member Function Documentation

void SUIT_DataObject::Signal::created ( SUIT_DataObject object)
signal
Parameters
objectdata object being created
void SUIT_DataObject::Signal::deleteLater ( SUIT_DataObject object)
private
Parameters
objectdata object to be deleted later
void SUIT_DataObject::Signal::destroyed ( SUIT_DataObject object)
signal
Parameters
objectdata object being destroyed
void SUIT_DataObject::Signal::emitCreated ( SUIT_DataObject object)
private
Parameters
objectdata object being created
void SUIT_DataObject::Signal::emitDestroyed ( SUIT_DataObject object)
private
Parameters
objectdata object being destroyed
void SUIT_DataObject::Signal::emitInserted ( SUIT_DataObject object,
SUIT_DataObject parent 
)
private
Parameters
objectdata object being added
parentparent data object
void SUIT_DataObject::Signal::emitModified ( SUIT_DataObject object)
private
Parameters
objectdata object that has been modified

References SUIT_DataObject::modified().

void SUIT_DataObject::Signal::emitRemoved ( SUIT_DataObject object,
SUIT_DataObject parent 
)
private
Parameters
objectdata object being removed
parentparent data object
void SUIT_DataObject::Signal::inserted ( SUIT_DataObject object,
SUIT_DataObject parent 
)
signal
Parameters
objectdata object being created
parentparent data object
void SUIT_DataObject::Signal::modified ( SUIT_DataObject )
signal
void SUIT_DataObject::Signal::removed ( SUIT_DataObject object,
SUIT_DataObject parent 
)
signal
Parameters
objectdata object being removed
parentparent data object

Friends And Related Function Documentation

friend class SUIT_DataObject
friend

Member Data Documentation

DataObjectList SUIT_DataObject::Signal::myDelLaterObjects
private

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