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 | |
10 | QT_BEGIN_NAMESPACE |
11 | |
12 | namespace Qt3DInput { |
13 | |
14 | class QButtonAxisInputPrivate; |
15 | |
16 | class 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 | |
24 | public: |
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 | |
34 | public 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 | |
41 | Q_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 | |
48 | private: |
49 | Q_DECLARE_PRIVATE(QButtonAxisInput) |
50 | }; |
51 | |
52 | } // Qt3DInput |
53 | |
54 | QT_END_NAMESPACE |
55 | |
56 | #endif // QT3DINPUT_QBUTTONAXISINPUT_H |
57 | |