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#ifndef QKEYMAPPER_P_H
4#define QKEYMAPPER_P_H
5
6//
7// W A R N I N G
8// -------------
9//
10// This file is not part of the Qt API. It exists purely as an
11// implementation detail. This header file may change from version to
12// version without notice, or even be removed.
13//
14// We mean it.
15//
16
17#include <QtGui/private/qtguiglobal_p.h>
18#include <qobject.h>
19#include <private/qobject_p.h>
20#include <qlist.h>
21#include <qlocale.h>
22#include <qevent.h>
23
24#include <QtCore/qnativeinterface.h>
25
26QT_BEGIN_NAMESPACE
27
28class Q_GUI_EXPORT QKeyMapper : public QObject
29{
30 Q_OBJECT
31public:
32 explicit QKeyMapper();
33 ~QKeyMapper();
34
35 static QKeyMapper *instance();
36 static QList<QKeyCombination> possibleKeys(const QKeyEvent *e);
37
38 QT_DECLARE_NATIVE_INTERFACE_ACCESSOR(QKeyMapper)
39
40private:
41 Q_DISABLE_COPY_MOVE(QKeyMapper)
42};
43
44// ----------------- QNativeInterface -----------------
45
46namespace QNativeInterface::Private {
47
48#if QT_CONFIG(evdev) || defined(Q_QDOC)
49struct Q_GUI_EXPORT QEvdevKeyMapper
50{
51 QT_DECLARE_NATIVE_INTERFACE(QEvdevKeyMapper, 1, QKeyMapper)
52 virtual void loadKeymap(const QString &filename) = 0;
53 virtual void switchLang() = 0;
54};
55#endif
56
57} // QNativeInterface::Private
58
59
60QT_END_NAMESPACE
61
62#endif // QKEYMAPPER_P_H
63

Provided by KDAB

Privacy Policy
Learn Advanced QML with KDAB
Find out more

source code of qtbase/src/gui/kernel/qkeymapper_p.h