ObjectListEventBroadcaster broadcasts added, removed and deleted events of ObjectList. More...
#include <GCF3/ObjectList>
Public Member Functions | |
void | addListener (ObjectListEventListener *listener) |
void | removeListener (ObjectListEventListener *listener) |
void | removeAllListeners () |
ObjectListEventListener * | listenerAt (int index) const |
QString | listenerType () const |
void | objectAdded (int index, QObject *obj) |
void | objectRemoved (int index, QObject *obj) |
void | objectDeleted (int index, QObject *obj) |
Public Member Functions inherited from GCF::ObjectListEventListener | |
ObjectListEventListener () | |
virtual | ~ObjectListEventListener () |
Detailed Description
ObjectListEventBroadcaster broadcasts added, removed and deleted events of GCF::ObjectList to all the GCF::ObjectListEventListener's added to it. You can add or remove a GCF::ObjectListEventListener to this using addListener(ObjectListEventListener *listener), removeListener(ObjectListEventListener *listener) functions.
This class inherits from GCF::ObjectListEventListener. To sends notifications to all CF::ObjectListEventListener added to this; you first need to set this event broadcaster as GCF::ObjectListEventListener of the GCF::ObjectList.
Member Function Documentation
GCF::ObjectListEventBroadcaster::addListener | ( | ObjectListEventListener * | listener | ) |
Adds the GCF::ObjectListEventListener to the broadcast list. From this onwards the added event listener will also get notifications for events on GCF::ObjectList.
- Parameters
-
listener GCF::ObjectListEventListener that needs to be added to the broadcast list.
GCF::ObjectListEventBroadcaster::removeListener | ( | ObjectListEventListener * | listener | ) |
Removes the GCF::ObjectListEventListener from the broadcast list.
- Parameters
-
listener GCF::ObjectListEventListener that needs to be removed to the broadcast list.
GCF::ObjectListEventBroadcaster::removeAllListeners | ( | ) |
Removes all GCF::ObjectListEventListener from the broadcast list.
GCF::ObjectListEventBroadcaster::listenerAt | ( | int | index | ) | const |
Returns the GCF::ObjectListEventListener at the specified index.
- Parameters
-
index index for which the GCF::ObjectListEventListener needs to be returned.
- Returns
- ObjectListEventListener at the specified index.
|
virtual |
Returns the listener type of this class. Default listener type is "GCF::ObjectListEventBroadcaster".
- Returns
- listener type string.
Reimplemented from GCF::ObjectListEventListener.
|
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 from GCF::ObjectListEventListener.
|
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 from GCF::ObjectListEventListener.
|
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 from GCF::ObjectListEventListener.