QSignalMapper(3qt)

NAME
QSignalMapper - Bundles signals from identifiable senders

#include <qsignalmapper.h>

Inherits QObject.

  Public Members
QSignalMapper ( QObject * parent, const char * name=0 )
~QSignalMapper ()
virtual void setMapping ( const QObject * sender, int identifier )
virtual void setMapping ( const QObject * sender, const QString & identifier )
void removeMappings ( const QObject * sender )

  Public Slots
void map ()

  Signals
void mapped ( int )
void mapped ( const QString & )

DESCRIPTION
The QSignalMapper class bundles signals from identifiable senders.

Collects a set of parameterless signals, re-emitting them with an integer or string parameters corresponding to the object which sent the signal.

Examples: i18n/main.cpp

MEMBER FUNCTION DOCUMENTATION

QSignalMapper::QSignalMapper ( QObject * parent, const char * name=0 )
Constructs a QSignalMapper. Like all QObjects, it will be deleted when the parent is deleted.

QSignalMapper::~QSignalMapper ()
Destructs the QSignalMapper.

void QSignalMapper::map () [slot]
This slot emits signals based on which object sends signals to it.

void QSignalMapper::mapped ( const QString & ) [signal]
This signal is emitted when map() is signalled from an object which has a string mapping set.

See also setMapping(QString).

void QSignalMapper::mapped ( int ) [signal]
This signal is emitted when map() is signalled from an object which has an integer mapping set.

See also setMapping(int).

void QSignalMapper::removeMappings ( const QObject * sender )
Removes all mappings for sender. This is done automatically when mapped objects are destroyed.

void QSignalMapper::setMapping ( const QObject * sender, const QString & identifier ) [virtual]
Adds a mapping such that when map() is signalled from the given sender, the signal mapper(identifier) is emitted.

There may be at most one string identifier for each object, and it may not be null.

void QSignalMapper::setMapping ( const QObject * sender, int identifier ) [virtual]
Adds a mapping such that when map() is signalled from the given sender, the signal mapped(identifier) is emitted.

There may be at most one integer identifier for each object.

Examples: i18n/main.cpp

SEE ALSO
http://doc.trolltech.com/qsignalmapper.html http://www.trolltech.com/faq/tech.html

COPYRIGHT
Copyright 1992-2001 Trolltech AS, http://www.trolltech.com. See the license file included in the distribution for a complete license statement.

AUTHOR
Generated automatically from the source code.

BUGS
If you find a bug in Qt, please report it as described in http://doc.trolltech.com/bughowto.html. Good bug reports make our job much simpler. Thank you.

In case of content or formattting problems with this manual page, please report them to qt-bugs@trolltech.com. Please include the name of the manual page (qsignalmapper.3qt) and the Qt version (2.3.5).