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 QEVDEVKEYBOARDMANAGER_P_H |
5 | #define QEVDEVKEYBOARDMANAGER_P_H |
6 | |
7 | // |
8 | // W A R N I N G |
9 | // ------------- |
10 | // |
11 | // This file is not part of the Qt API. It exists purely as an |
12 | // implementation detail. This header file may change from version to |
13 | // version without notice, or even be removed. |
14 | // |
15 | // We mean it. |
16 | // |
17 | |
18 | #include "qevdevkeyboardhandler_p.h" |
19 | |
20 | #include <QtInputSupport/private/devicehandlerlist_p.h> |
21 | #include <QtDeviceDiscoverySupport/private/qdevicediscovery_p.h> |
22 | |
23 | #include <QObject> |
24 | #include <QHash> |
25 | #include <QSocketNotifier> |
26 | |
27 | QT_BEGIN_NAMESPACE |
28 | |
29 | class QEvdevKeyboardManager : public QObject |
30 | { |
31 | public: |
32 | QEvdevKeyboardManager(const QString &key, const QString &specification, QObject *parent = nullptr); |
33 | ~QEvdevKeyboardManager(); |
34 | |
35 | void loadKeymap(const QString &file); |
36 | void switchLang(); |
37 | |
38 | void addKeyboard(const QString &deviceNode = QString()); |
39 | void removeKeyboard(const QString &deviceNode); |
40 | |
41 | private: |
42 | void updateDeviceCount(); |
43 | |
44 | QString m_spec; |
45 | QtInputSupport::DeviceHandlerList<QEvdevKeyboardHandler> m_keyboards; |
46 | QString m_defaultKeymapFile; |
47 | }; |
48 | |
49 | QT_END_NAMESPACE |
50 | |
51 | #endif // QEVDEVKEYBOARDMANAGER_P_H |
52 | |