1 | // Copyright (C) 2016 Klaralvdalens Datakonsult AB (KDAB). |
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 QT3DINPUT_QABSTRACTPHYSICALDEVICEPROXY_P_H |
5 | #define QT3DINPUT_QABSTRACTPHYSICALDEVICEPROXY_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 for the convenience |
12 | // of other Qt classes. 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 <Qt3DInput/qabstractphysicaldevice.h> |
19 | |
20 | #ifndef Q_QDOC |
21 | #include <Qt3DInput/private/qt3dinput_global_p.h> |
22 | #endif |
23 | |
24 | QT_BEGIN_NAMESPACE |
25 | |
26 | namespace Qt3DInput { |
27 | |
28 | class QAbstractPhysicalDeviceProxyPrivate; |
29 | |
30 | class Q_3DINPUTSHARED_PRIVATE_EXPORT QAbstractPhysicalDeviceProxy : public QAbstractPhysicalDevice |
31 | { |
32 | Q_OBJECT |
33 | Q_PROPERTY(QString deviceName READ deviceName CONSTANT) |
34 | Q_PROPERTY(QAbstractPhysicalDeviceProxy::DeviceStatus status READ status NOTIFY statusChanged) |
35 | |
36 | public: |
37 | enum DeviceStatus { |
38 | Ready = 0, |
39 | NotFound |
40 | }; |
41 | Q_ENUM(DeviceStatus) // LCOV_EXCL_LINE |
42 | |
43 | QString deviceName() const; |
44 | DeviceStatus status() const; |
45 | |
46 | int axisCount() const override; |
47 | int buttonCount() const override; |
48 | QStringList axisNames() const override; |
49 | QStringList buttonNames() const override; |
50 | int axisIdentifier(const QString &name) const override; |
51 | int buttonIdentifier(const QString &name) const override; |
52 | |
53 | Q_SIGNALS: |
54 | void statusChanged(QAbstractPhysicalDeviceProxy::DeviceStatus status); |
55 | |
56 | protected: |
57 | QAbstractPhysicalDeviceProxy(QAbstractPhysicalDeviceProxyPrivate &dd, Qt3DCore::QNode *parent = nullptr); |
58 | |
59 | private: |
60 | Q_DECLARE_PRIVATE(QAbstractPhysicalDeviceProxy) |
61 | |
62 | }; |
63 | |
64 | } // Qt3DInput |
65 | |
66 | QT_END_NAMESPACE |
67 | |
68 | #endif // QT3DINPUT_QABSTRACTPHYSICALDEVICEPROXY_P_H |
69 | |