| 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_INPUT_ACTIONINPUT_H |
| 5 | #define QT3DINPUT_INPUT_ACTIONINPUT_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 <Qt3DCore/qnodeid.h> |
| 19 | |
| 20 | #include <Qt3DInput/private/abstractactioninput_p.h> |
| 21 | |
| 22 | QT_BEGIN_NAMESPACE |
| 23 | |
| 24 | namespace Qt3DInput { |
| 25 | |
| 26 | namespace Input { |
| 27 | |
| 28 | class Q_AUTOTEST_EXPORT ActionInput : public AbstractActionInput |
| 29 | { |
| 30 | public: |
| 31 | ActionInput(); |
| 32 | void cleanup(); |
| 33 | |
| 34 | inline QList<int> buttons() const { return m_buttons; } |
| 35 | inline Qt3DCore::QNodeId sourceDevice() const { return m_sourceDevice; } |
| 36 | void syncFromFrontEnd(const Qt3DCore::QNode *frontEnd, bool firstTime) override; |
| 37 | |
| 38 | bool process(InputHandler *inputHandler, qint64 currentTime) override; |
| 39 | |
| 40 | private: |
| 41 | QList<int> m_buttons; |
| 42 | Qt3DCore::QNodeId m_sourceDevice; |
| 43 | }; |
| 44 | |
| 45 | } // namespace Input |
| 46 | |
| 47 | } // namespace Qt3DInput |
| 48 | |
| 49 | QT_END_NAMESPACE |
| 50 | |
| 51 | #endif // QT3DINPUT_INPUT_ACTIONINPUT_H |
| 52 | |