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
22QT_BEGIN_NAMESPACE
23
24namespace Qt3DInput {
25
26namespace Input {
27
28class Q_AUTOTEST_EXPORT ActionInput : public AbstractActionInput
29{
30public:
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
40private:
41 QList<int> m_buttons;
42 Qt3DCore::QNodeId m_sourceDevice;
43};
44
45} // namespace Input
46
47} // namespace Qt3DInput
48
49QT_END_NAMESPACE
50
51#endif // QT3DINPUT_INPUT_ACTIONINPUT_H
52

source code of qt3d/src/input/backend/actioninput_p.h