1// Copyright (C) 2016 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_QBUTTONAXISINPUT_H
5#define QT3DINPUT_QBUTTONAXISINPUT_H
6
7#include <Qt3DInput/qt3dinput_global.h>
8#include <Qt3DInput/QAbstractAxisInput>
9
10QT_BEGIN_NAMESPACE
11
12namespace Qt3DInput {
13
14class QButtonAxisInputPrivate;
15
16class Q_3DINPUTSHARED_EXPORT QButtonAxisInput : public QAbstractAxisInput
17{
18 Q_OBJECT
19 Q_PROPERTY(float scale READ scale WRITE setScale NOTIFY scaleChanged)
20 Q_PROPERTY(QList<int> buttons READ buttons WRITE setButtons NOTIFY buttonsChanged)
21 Q_PROPERTY(float acceleration READ acceleration WRITE setAcceleration NOTIFY accelerationChanged)
22 Q_PROPERTY(float deceleration READ deceleration WRITE setDeceleration NOTIFY decelerationChanged)
23
24public:
25 explicit QButtonAxisInput(Qt3DCore::QNode *parent = nullptr);
26 ~QButtonAxisInput();
27
28 float scale() const;
29 QList<int> buttons() const;
30
31 float acceleration() const;
32 float deceleration() const;
33
34public Q_SLOTS:
35 void setScale(float scale);
36 void setButtons(const QList<int> &buttons);
37
38 void setAcceleration(float acceleration);
39 void setDeceleration(float deceleration);
40
41Q_SIGNALS:
42 void scaleChanged(float scale);
43 void buttonsChanged(const QList<int> &buttons);
44
45 void accelerationChanged(float acceleration);
46 void decelerationChanged(float deceleration);
47
48private:
49 Q_DECLARE_PRIVATE(QButtonAxisInput)
50};
51
52} // Qt3DInput
53
54QT_END_NAMESPACE
55
56#endif // QT3DINPUT_QBUTTONAXISINPUT_H
57

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