| 1 | // Copyright (C) 2014 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_QINPUTASPECT_H |
| 5 | #define QT3DINPUT_QINPUTASPECT_H |
| 6 | |
| 7 | #include <Qt3DInput/qt3dinput_global.h> |
| 8 | #include <Qt3DCore/qabstractaspect.h> |
| 9 | |
| 10 | QT_BEGIN_NAMESPACE |
| 11 | |
| 12 | namespace Qt3DInput { |
| 13 | |
| 14 | class QAbstractPhysicalDevice; |
| 15 | class QInputAspectPrivate; |
| 16 | class QInputDeviceIntegration; |
| 17 | |
| 18 | class Q_3DINPUTSHARED_EXPORT QInputAspect : public Qt3DCore::QAbstractAspect |
| 19 | { |
| 20 | Q_OBJECT |
| 21 | public: |
| 22 | explicit QInputAspect(QObject *parent = nullptr); |
| 23 | ~QInputAspect(); |
| 24 | |
| 25 | QAbstractPhysicalDevice *createPhysicalDevice(const QString &name); |
| 26 | QStringList availablePhysicalDevices() const; |
| 27 | |
| 28 | private: |
| 29 | std::vector<Qt3DCore::QAspectJobPtr> jobsToExecute(qint64 time) override; |
| 30 | |
| 31 | void onRegistered() override; |
| 32 | void onUnregistered() override; |
| 33 | void onEngineStartup() override; |
| 34 | void jobsDone() override; |
| 35 | |
| 36 | Q_DECLARE_PRIVATE(QInputAspect) |
| 37 | explicit QInputAspect(QInputAspectPrivate &dd, QObject *parent); |
| 38 | friend class QInputDeviceIntegration; |
| 39 | }; |
| 40 | |
| 41 | } // namespace Qt3DInput |
| 42 | |
| 43 | QT_END_NAMESPACE |
| 44 | |
| 45 | #endif // QT3DINPUT_QINPUTASPECT_H |
| 46 |
