Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qsignalmapper.h
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QSIGNALMAPPER_H
5#define QSIGNALMAPPER_H
6
7#include <QtCore/qobject.h>
8
10
12
13class Q_CORE_EXPORT QSignalMapper : public QObject
14{
16 Q_DECLARE_PRIVATE(QSignalMapper)
17public:
18 explicit QSignalMapper(QObject *parent = nullptr);
20
21 void setMapping(QObject *sender, int id);
22 void setMapping(QObject *sender, const QString &text);
23 void setMapping(QObject *sender, QObject *object);
24 void removeMappings(QObject *sender);
25
26 QObject *mapping(int id) const;
27 QObject *mapping(const QString &text) const;
28 QObject *mapping(QObject *object) const;
29
31 void mappedInt(int);
32 void mappedString(const QString &);
34
35public Q_SLOTS:
36 void map();
37 void map(QObject *sender);
38
39private:
40 Q_DISABLE_COPY(QSignalMapper)
41};
42
44
45#endif // QSIGNALMAPPER_H
\inmodule QtCore
Definition qobject.h:103
\inmodule QtCore
void mappedString(const QString &)
void mappedObject(QObject *)
void mappedInt(int)
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
QMap< QString, QString > map
[6]
QString text
Combined button and popup list for selecting options.
GLenum GLenum GLenum GLenum mapping
#define Q_OBJECT
#define Q_SLOTS
#define Q_SIGNALS