Qt Toolkit - QSignalMapper Class

# QSignalMapper Class Reference

A QSignalMapper object bundles signals from identifiable senders. More...

`#include <qsignalmapper.h>`

Inherits QObject.

List of all member functions.

## Public Members

- QSignalMapper ( QObject * parent, const char * name=0 )
- ~QSignalMapper ()
- void setMapping ( const QObject * sender, int identifier )
- void setMapping ( const QObject * sender, const char * identifier )
- void removeMappings ( const QObject * sender )

## Public Slots

- void map ()

## Signals

- void mapped ( int )
- void mapped ( const char * )

## Detailed Description

A QSignalMapper object 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.

## 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 char * ) `[signal]`

This signal is emitted when map() is signalled from an object which has a string mapping set.

See also: setMapping(const and char*).

### 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 char * identifier )

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 string identifier for each object, and it may not be null.

### void QSignalMapper::setMapping ( const QObject * sender, int identifier )

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 integer identifier for each object.

Search the documentation, FAQ, qt-interest archive and more (uses www.troll.no):

This file is part of the Qt toolkit, copyright © 1995-99 Troll Tech, all rights reserved.

It was generated from the following files:

- qsignalmapper.h: 1998/08/19
- qsignalmapper.cpp: 1999/01/13