GCF LOGO VCL LOGO
GCF::MapToObjectWatcher Class Reference

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

#include <GCF3/MapToObject>

Signals

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

Public Member Functions

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

Detailed Description

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

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

Constructor & Destructor Documentation

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

Default constructor.

GCF::MapToObjectWatcher::~MapToObjectWatcher ( )

Destructor.

Member Function Documentation

template<class T >
GCF::MapToObjectWatcher::watch ( MapToObject< T > &  map)

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

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

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

Returns
the current listener type

Reimplemented from GCF::MapToObjectEventListener.

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

This signal will be emitted when a Value - QObject pointer pair is inserted as value to the GCF::MapToObject.

Parameters
objQObject pointer inserted.
GCF::MapToObjectWatcher::objectRemoved ( QObject *  obj)
signal

This signal will be emitted when a Value - QObject pointer pair is removed from the values of GCF::MapToObject.

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

This signal will be emitted when QObject inside MapToObject is deleted inside application.

Parameters
objQObject pointer deleted.