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 QINPUTDEVICEMANAGER_P_H |
5 | #define QINPUTDEVICEMANAGER_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 <QtGui/private/qtguiglobal_p.h> |
19 | #include <QtCore/qobject.h> |
20 | |
21 | QT_BEGIN_NAMESPACE |
22 | |
23 | class QInputDeviceManagerPrivate; |
24 | |
25 | class Q_GUI_EXPORT QInputDeviceManager : public QObject |
26 | { |
27 | Q_OBJECT |
28 | Q_DECLARE_PRIVATE(QInputDeviceManager) |
29 | |
30 | public: |
31 | enum DeviceType { |
32 | DeviceTypeUnknown, |
33 | DeviceTypePointer, |
34 | DeviceTypeKeyboard, |
35 | DeviceTypeTouch, |
36 | DeviceTypeTablet, |
37 | |
38 | NumDeviceTypes |
39 | }; |
40 | |
41 | explicit QInputDeviceManager(QObject *parent = nullptr); |
42 | ~QInputDeviceManager() override; |
43 | |
44 | int deviceCount(DeviceType type) const; |
45 | |
46 | void setCursorPos(const QPoint &pos); |
47 | |
48 | Qt::KeyboardModifiers keyboardModifiers() const; |
49 | void setKeyboardModifiers(Qt::KeyboardModifiers mods); |
50 | |
51 | Q_SIGNALS: |
52 | void deviceListChanged(QInputDeviceManager::DeviceType type); |
53 | void cursorPositionChangeRequested(const QPoint &pos); |
54 | }; |
55 | |
56 | QT_END_NAMESPACE |
57 | |
58 | QT_DECL_METATYPE_EXTERN_TAGGED(QInputDeviceManager::DeviceType, |
59 | QInputDeviceManager__DeviceType, Q_GUI_EXPORT) |
60 | |
61 | #endif // QINPUTDEVICEMANAGER_P_H |
62 |