GCF LOGO VCL LOGO
GCF::ObjectListEventBroadcaster Class Reference

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 ()
 
ObjectListEventListenerlistenerAt (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
listenerGCF::ObjectListEventListener that needs to be added to the broadcast list.
GCF::ObjectListEventBroadcaster::removeListener ( ObjectListEventListener listener)

Removes the GCF::ObjectListEventListener from the broadcast list.

Parameters
listenerGCF::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
indexindex for which the GCF::ObjectListEventListener needs to be returned.
Returns
ObjectListEventListener at the specified index.
GCF::ObjectListEventBroadcaster::listenerType ( ) const
virtual

Returns the listener type of this class. Default listener type is "GCF::ObjectListEventBroadcaster".

Returns
listener type string.

Reimplemented from GCF::ObjectListEventListener.

void GCF::ObjectListEventBroadcaster::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 from GCF::ObjectListEventListener.

void GCF::ObjectListEventBroadcaster::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 from GCF::ObjectListEventListener.

void GCF::ObjectListEventBroadcaster::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 from GCF::ObjectListEventListener.