GCF LOGO VCL LOGO
GCF::ObjectListEventListener Class Reference

ObjectListEventListener listens to GCF::ObjectList's events.When set as event listener of GCF::ObjectList, the corresponding virtual functions of this class will be called when a QObject pointer is added, removed or deleted from the GCF::ObjectList. More...

#include <GCF3/ObjectList>

Public Member Functions

 ObjectListEventListener ()
 
virtual ~ObjectListEventListener ()
 
virtual QString listenerType () const
 
virtual void objectAdded (int index, QObject *obj)
 
virtual void objectRemoved (int index, QObject *obj)
 
virtual void objectDeleted (int index, QObject *obj)
 

Detailed Description

To set this as event listener of GCF::ObjectList you need to use the method GCF::ObjectList::setEventListener(GCF::ObjectListEventListener* listener). Only one event listener can listen to GCF::ObjectList at a time.

If you want to have several listeners receive event notifications on a GCF::ObjectList list, then you can install a GCF::ObjectListEventBroadcaster on the GCF::ObjectList and register all event listeners with the broadcaster.

Constructor & Destructor Documentation

GCF::ObjectListEventListener::ObjectListEventListener ( )

Default constructor.

GCF::ObjectListEventListener::~ObjectListEventListener ( )
virtual

Destructor.

Member Function Documentation

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

Reimplemented in GCF::ObjectListWatcher, and GCF::ObjectListEventBroadcaster.

GCF::ObjectListEventListener::objectAdded ( int  index,
QObject *  obj 
)
virtual

By default there is no implementation. This function will be called when an object is added to the GCF::ObjectList.

Parameters
indexindex at which the object had been added to the GCF::ObjectList.
objQObject pointer which was added to the GCF::ObjectList.

Reimplemented in GCF::ObjectListEventBroadcaster.

GCF::ObjectListEventListener::objectRemoved ( int  index,
QObject *  obj 
)
virtual

By default there is no implementation. This function will be called when an object is removed from the GCF::ObjectList.

Parameters
indexindex from which the object had been removed from GCF::ObjectList.
objQObject pointer which was removed from the GCF::ObjectList.

Reimplemented in GCF::ObjectListEventBroadcaster.

GCF::ObjectListEventListener::objectDeleted ( int  index,
QObject *  obj 
)
virtual

By default there is no implementation. This function will be called when an object is deleted, which was there in the GCF::ObjectList.

Parameters
indexindex at which the object pointer the existed in GCF::ObjectList.
objQObject pointer which was deleted.

Reimplemented in GCF::ObjectListEventBroadcaster.