43 #ifndef QT_NO_SIGNALMAPPER 55 q->removeMappings(q->sender());
157 d->intHash.insert(sender,
id);
170 d->stringHash.insert(sender, text);
183 d->widgetHash.insert(sender, widget);
196 d->objectHash.insert(sender,
object);
208 return d->intHash.key(
id);
217 return d->stringHash.key(
id);
231 return d->widgetHash.key(widget);
245 return d->objectHash.key(
object);
257 d->intHash.remove(sender);
258 d->stringHash.remove(sender);
259 d->widgetHash.remove(sender);
260 d->objectHash.remove(sender);
274 if (
d->intHash.contains(sender))
276 if (
d->stringHash.contains(sender))
278 if (
d->widgetHash.contains(sender))
280 if (
d->objectHash.contains(sender))
333 #include "moc_qsignalmapper.cpp" 335 #endif // QT_NO_SIGNALMAPPER
void removeMappings(QObject *sender)
Removes all mappings for sender.
#define QT_END_NAMESPACE
This macro expands to.
QPointer< QWidget > widget
static QString fromAscii(const char *, int size=-1)
Returns a QString initialized with the first size characters from the string str. ...
QHash< QObject *, QObject * > objectHash
The QSignalMapper class bundles signals from identifiable senders.
The QString class provides a Unicode character string.
The QObject class is the base class of all Qt objects.
QObject * mapping(int id) const
Returns the sender QObject that is associated with the id.
QObject * sender() const
Returns a pointer to the object that sent the signal, if called in a slot activated by a signal; othe...
void setObjectName(const QString &name)
void setMapping(QObject *sender, int id)
Adds a mapping so that when map() is signalled from the given sender, the signal mapped(id) is emitte...
#define QT_BEGIN_NAMESPACE
This macro expands to.
void destroyed(QObject *=0)
This signal is emitted immediately before the object obj is destroyed, and can not be blocked...
static bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
Creates a connection of the given type from the signal in the sender object to the method in the rece...
~QSignalMapper()
Destroys the QSignalMapper.
void mapped(int)
This signal is emitted when map() is signalled from an object that has an integer mapping set...
QHash< QObject *, QWidget * > widgetHash
void _q_senderDestroyed()
#define Q_DECLARE_PUBLIC(Class)
void map()
This slot emits signals based on which object sends signals to it.
Q_INVOKABLE QObject(QObject *parent=0)
Constructs an object with parent object parent.
QObject * parent() const
Returns a pointer to the parent object.
QHash< QObject *, int > intHash
QSignalMapper(QObject *parent=0)
Constructs a QSignalMapper with parent parent.
QHash< QObject *, QString > stringHash