Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:07:36

0001 // Copyright (C) 2016 The Qt Company Ltd.
0002 // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
0003 
0004 #ifndef QSIGNALMAPPER_H
0005 #define QSIGNALMAPPER_H
0006 
0007 #include <QtCore/qobject.h>
0008 
0009 QT_BEGIN_NAMESPACE
0010 
0011 class QSignalMapperPrivate;
0012 
0013 class Q_CORE_EXPORT QSignalMapper : public QObject
0014 {
0015     Q_OBJECT
0016     Q_DECLARE_PRIVATE(QSignalMapper)
0017 public:
0018     explicit QSignalMapper(QObject *parent = nullptr);
0019     ~QSignalMapper();
0020 
0021     void setMapping(QObject *sender, int id);
0022     void setMapping(QObject *sender, const QString &text);
0023     void setMapping(QObject *sender, QObject *object);
0024     void removeMappings(QObject *sender);
0025 
0026     QObject *mapping(int id) const;
0027     QObject *mapping(const QString &text) const;
0028     QObject *mapping(QObject *object) const;
0029 
0030 Q_SIGNALS:
0031     void mappedInt(int);
0032     void mappedString(const QString &);
0033     void mappedObject(QObject *);
0034 
0035 public Q_SLOTS:
0036     void map();
0037     void map(QObject *sender);
0038 
0039 private:
0040     Q_DISABLE_COPY(QSignalMapper)
0041     Q_PRIVATE_SLOT(d_func(), void _q_senderDestroyed())
0042 };
0043 
0044 QT_END_NAMESPACE
0045 
0046 #endif // QSIGNALMAPPER_H