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_QACTIONINPUT_H
5#define QT3DINPUT_QACTIONINPUT_H
6
7#include <Qt3DInput/qabstractactioninput.h>
8#include <Qt3DInput/qabstractphysicaldevice.h>
9#include <Qt3DInput/qt3dinput_global.h>
10#include <Qt3DCore/qnode.h>
11
12QT_BEGIN_NAMESPACE
13
14namespace Qt3DInput {
15
16class QActionInputPrivate;
17
18class Q_3DINPUTSHARED_EXPORT QActionInput : public Qt3DInput::QAbstractActionInput
19{
20 Q_OBJECT
21 Q_PROPERTY(Qt3DInput::QAbstractPhysicalDevice *sourceDevice READ sourceDevice WRITE setSourceDevice NOTIFY sourceDeviceChanged)
22 Q_PROPERTY(QList<int> buttons READ buttons WRITE setButtons NOTIFY buttonsChanged)
23
24public:
25 explicit QActionInput(Qt3DCore::QNode *parent = nullptr);
26 ~QActionInput();
27
28 QAbstractPhysicalDevice *sourceDevice() const;
29 QList<int> buttons() const;
30
31public Q_SLOTS:
32 void setSourceDevice(QAbstractPhysicalDevice *sourceDevice);
33 void setButtons(const QList<int> &buttons);
34
35Q_SIGNALS:
36 void sourceDeviceChanged(QAbstractPhysicalDevice *sourceDevice);
37 void buttonsChanged(const QList<int> &buttons);
38
39private:
40 Q_DECLARE_PRIVATE(QActionInput)
41};
42
43} // Qt3DInput
44
45QT_END_NAMESPACE
46
47#endif // QT3DINPUT_QACTIONINPUT_H
48

source code of qt3d/src/input/frontend/qactioninput.h