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.
|
virtual |
Destructor.
Member Function Documentation
|
virtual |
- Returns
- the listener type. By default listener type is "GCF::ObjectListEventListener".
Reimplemented in GCF::ObjectListWatcher, and GCF::ObjectListEventBroadcaster.
|
virtual |
By default there is no implementation. This function will be called when an object is added to the GCF::ObjectList.
- Parameters
-
index index at which the object had been added to the GCF::ObjectList. obj QObject
pointer which was added to the GCF::ObjectList.
Reimplemented in GCF::ObjectListEventBroadcaster.
|
virtual |
By default there is no implementation. This function will be called when an object is removed from the GCF::ObjectList.
- Parameters
-
index index from which the object had been removed from GCF::ObjectList. obj QObject pointer which was removed from the GCF::ObjectList.
Reimplemented in GCF::ObjectListEventBroadcaster.
|
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
-
index index at which the object pointer the existed in GCF::ObjectList. obj QObject
pointer which was deleted.
Reimplemented in GCF::ObjectListEventBroadcaster.