12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- #ifndef QT3DINPUT_INPUT_QKEYBOARDDEVICE_H
- #define QT3DINPUT_INPUT_QKEYBOARDDEVICE_H
- #include <Qt3DInput/qt3dinput_global.h>
- #include <Qt3DInput/qabstractphysicaldevice.h>
- #include <Qt3DInput/QKeyboardHandler>
- QT_BEGIN_NAMESPACE
- namespace Qt3DInput {
- class QKeyboardDevicePrivate;
- class QKeyboardHandler;
- class QT3DINPUTSHARED_EXPORT QKeyboardDevice : public Qt3DInput::QAbstractPhysicalDevice
- {
- Q_OBJECT
- Q_PROPERTY(Qt3DInput::QKeyboardHandler *activeInput READ activeInput NOTIFY activeInputChanged)
- public:
- explicit QKeyboardDevice(QNode *parent = nullptr);
- ~QKeyboardDevice();
- QKeyboardHandler *activeInput() const;
- int axisCount() const Q_DECL_FINAL;
- int buttonCount() const Q_DECL_FINAL;
- QStringList axisNames() const Q_DECL_FINAL;
- QStringList buttonNames() const Q_DECL_FINAL;
- int axisIdentifier(const QString &name) const Q_DECL_FINAL;
- int buttonIdentifier(const QString &name) const Q_DECL_FINAL;
- protected:
- explicit QKeyboardDevice(QKeyboardDevicePrivate &dd, QNode *parent = nullptr);
- void sceneChangeEvent(const Qt3DCore::QSceneChangePtr &change) Q_DECL_OVERRIDE;
- Q_SIGNALS:
- void activeInputChanged(QKeyboardHandler *activeInput);
- private:
- Q_DECLARE_PRIVATE(QKeyboardDevice)
- void setActiveInput(QKeyboardHandler *activeInput);
- };
- }
- QT_END_NAMESPACE
- #endif
|