19 q->removeMappings(
q->sender());
22 template <
class Signal,
class Container>
27 auto it = mappedValues.
find(sender);
28 if (
it != mappedValues.
end())
157 d->objectHash.insert(
sender,
object);
169 return d->intHash.key(
id);
178 return d->stringHash.key(
id);
189 return d->objectHash.key(
object);
219 d_func()->emitMappedValues(
sender);
257#include "moc_qsignalmapper.cpp"
static QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
\threadsafe
QObject * sender() const
Returns a pointer to the object that sent the signal, if called in a slot activated by a signal; othe...
void destroyed(QObject *=nullptr)
This signal is emitted immediately before the object obj is destroyed, after any instances of QPointe...
iterator find(const T &value)
QHash< QObject *, QObject * > objectHash
QHash< QObject *, int > intHash
void emitMappedValue(QObject *sender, Signal signal, const Container &mappedValues)
QHash< QObject *, QString > stringHash
void emitMappedValues(QObject *sender)
void _q_senderDestroyed()
void mappedString(const QString &)
void map()
This slot emits signals based on which object sends signals to it.
void mappedObject(QObject *)
QSignalMapper(QObject *parent=nullptr)
Constructs a QSignalMapper with parent parent.
QObject * mapping(int id) const
Returns the sender QObject that is associated with the id.
void removeMappings(QObject *sender)
Removes all mappings for sender.
void setMapping(QObject *sender, int id)
Adds a mapping so that when map() is signalled from the given sender, the signal mappedInt(id) is emi...
~QSignalMapper()
Destroys the QSignalMapper.
\macro QT_RESTRICTED_CAST_FROM_ASCII
QSet< QString >::iterator it
Combined button and popup list for selecting options.
GLdouble GLdouble GLdouble GLdouble q
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent