| 1 | // Copyright (C) 2015 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_QABSTRACTPHYSICALDEVICE |
| 5 | #define QT3DINPUT_QABSTRACTPHYSICALDEVICE |
| 6 | |
| 7 | #include <Qt3DInput/qt3dinput_global.h> |
| 8 | #include <Qt3DCore/qnode.h> |
| 9 | #include <QtCore/qlist.h> |
| 10 | #include <QtCore/qobject.h> |
| 11 | |
| 12 | QT_BEGIN_NAMESPACE |
| 13 | |
| 14 | namespace Qt3DInput { |
| 15 | |
| 16 | class QAxisSetting; |
| 17 | class QInputAspect; |
| 18 | class QAbstractPhysicalDevicePrivate; |
| 19 | |
| 20 | class Q_3DINPUTSHARED_EXPORT QAbstractPhysicalDevice : public Qt3DCore::QNode |
| 21 | { |
| 22 | Q_OBJECT |
| 23 | public: |
| 24 | explicit QAbstractPhysicalDevice(Qt3DCore::QNode *parent = nullptr); |
| 25 | ~QAbstractPhysicalDevice(); |
| 26 | |
| 27 | virtual int axisCount() const; |
| 28 | virtual int buttonCount() const; |
| 29 | virtual QStringList axisNames() const; |
| 30 | virtual QStringList buttonNames() const; |
| 31 | |
| 32 | virtual int axisIdentifier(const QString &name) const; |
| 33 | virtual int buttonIdentifier(const QString &name) const; |
| 34 | |
| 35 | void addAxisSetting(QAxisSetting *axisSetting); |
| 36 | void removeAxisSetting(QAxisSetting *axisSetting); |
| 37 | QList<QAxisSetting *> axisSettings() const; |
| 38 | |
| 39 | protected: |
| 40 | QAbstractPhysicalDevice(QAbstractPhysicalDevicePrivate &dd, Qt3DCore::QNode *parent = nullptr); |
| 41 | Q_DECLARE_PRIVATE(QAbstractPhysicalDevice) |
| 42 | }; |
| 43 | |
| 44 | } // Qt3DInput |
| 45 | |
| 46 | QT_END_NAMESPACE |
| 47 | |
| 48 | |
| 49 | #endif // QT3DINPUT_QABSTRACTPHYSICALDEVICE |
| 50 | |
| 51 | |