GCF LOGO VCL LOGO
GCF::ObjectMapWatcher Class Reference

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

Signals

void objectInserted (QObject *obj)
 
void objectRemoved (QObject *obj)
 
void objectDeleted (QObject *obj)
 

Public Member Functions

 ObjectMapWatcher (QObject *parent=0)
 
 ~ObjectMapWatcher ()
 
template<class T >
void watch (ObjectMap< T > &map)
 
QString listenerType () const
 
- Public Member Functions inherited from GCF::ObjectMapEventListener
 ObjectMapEventListener ()
 
virtual ~ObjectMapEventListener ()
 
virtual void objectInserted (QObject *object)
 
virtual void objectRemoved (QObject *object)
 
virtual void objectDeleted (QObject *object)
 

Detailed Description

#include <GCF3/ObjectMap>

You can set this to watch over a GCF::ObjectMap by using GCF::ObjectMapWatcher::watch(ObjectMap &list) method.

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

Constructor & Destructor Documentation

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

Default constructor.

GCF::ObjectMapWatcher::~ObjectMapWatcher ( )

Destructor.

Member Function Documentation

template<class T >
GCF::ObjectMapWatcher::watch ( ObjectMap< T > &  map)

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

QString GCF::ObjectMapWatcher::listenerType ( ) const
virtual

Returns the listener type. By default listener type is "GCF::ObjectMapEventListener".

Returns
the current listener type

Reimplemented from GCF::ObjectMapEventListener.

GCF::ObjectMapWatcher::objectInserted ( QObject *  obj)
signal

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

Parameters
objQObject pointer added.
GCF::ObjectMapWatcher::objectRemoved ( QObject *  obj)
signal

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

Parameters
objQObject pointer removed.
GCF::ObjectMapWatcher::objectDeleted ( QObject *  obj)
signal

This signal will be emitted when QObject inside watching ObjectMap is deleted from anywhere inside application.

Parameters
objQObject pointer deleted.