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
24QT_BEGIN_NAMESPACE
25
26namespace Qt3DInput {
27
28class QAbstractPhysicalDeviceProxyPrivate;
29
30class 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
36public:
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
53Q_SIGNALS:
54 void statusChanged(QAbstractPhysicalDeviceProxy::DeviceStatus status);
55
56protected:
57 QAbstractPhysicalDeviceProxy(QAbstractPhysicalDeviceProxyPrivate &dd, Qt3DCore::QNode *parent = nullptr);
58
59private:
60 Q_DECLARE_PRIVATE(QAbstractPhysicalDeviceProxy)
61
62};
63
64} // Qt3DInput
65
66QT_END_NAMESPACE
67
68#endif // QT3DINPUT_QABSTRACTPHYSICALDEVICEPROXY_P_H
69

source code of qt3d/src/input/frontend/qabstractphysicaldeviceproxy_p.h