GCF LOGO VCL LOGO
GCF::ObjectListWatcher Class Reference

This watches over ObjectList to emit signals when the objects are added, removed or deleted from GCF::ObjectList. More...

#include <GCF3/ObjectList>

Signals

void objectAdded (int index, QObject *obj)
 
void objectRemoved (int index, QObject *obj)
 
void objectDeleted (int index, QObject *obj)
 

Public Member Functions

 ObjectListWatcher (QObject *parent=0)
 
 ~ObjectListWatcher ()
 
void watch (ObjectList &list)
 
QString listenerType () const
 
- Public Member Functions inherited from GCF::ObjectListEventListener
 ObjectListEventListener ()
 
virtual ~ObjectListEventListener ()
 
virtual void objectAdded (int index, QObject *obj)
 
virtual void objectRemoved (int index, QObject *obj)
 
virtual void objectDeleted (int index, QObject *obj)
 

Detailed Description

You can set this to watch over an GCF::ObjectList by using GCF::ObjectListWatcher::watch(ObjectList &list) method.

Only one watcher can watch over GCF::ObjectList at a time.If there is already a watcher watching that ObjectList when a new one is set then it will be replaced by the new one.

Constructor & Destructor Documentation

GCF::ObjectListWatcher::ObjectListWatcher ( QObject *  parent = 0)

Default constructor.

GCF::ObjectListWatcher::~ObjectListWatcher ( )

Destructor.

Member Function Documentation

void GCF::ObjectListWatcher::watch ( ObjectList list)

Sets the GCF::ObjectList to watch. If there is already a watcher watching that GCF::ObjectList then it will be replaced with this.

QString GCF::ObjectListWatcher::listenerType ( ) const
virtual
Returns
the listener type. By default listener type is "GCF::ObjectListEventListener".

Reimplemented from GCF::ObjectListEventListener.

GCF::ObjectListWatcher::objectAdded ( int  index,
QObject *  obj 
)
signal

This signal will be emitted when a QObject is added to the GCF::ObjectList.

Parameters
indexindex at which the object was inserted.
objQObject added.
GCF::ObjectListWatcher::objectRemoved ( int  index,
QObject *  obj 
)
signal

This signal will be emitted when a QObject is removed from the GCF::ObjectList.

Parameters
indexindex from which the QObject was removed.
objQObject removed.
GCF::ObjectListWatcher::objectDeleted ( int  index,
QObject *  obj 
)
signal

This signal will be emitted when a QObject is deleted from the GCF::ObjectList.

Parameters
indexindex of QObject in GCF::ObjectList which got deleted.
objQObject deleted.