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_QAXIS_P_H
5#define QT3DINPUT_QAXIS_P_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/private/qnode_p.h>
19
20QT_BEGIN_NAMESPACE
21
22namespace Qt3DInput {
23
24class QAbstractAxisInput;
25
26class QAxisPrivate : public Qt3DCore::QNodePrivate
27{
28public:
29 QAxisPrivate()
30 : Qt3DCore::QNodePrivate()
31 , m_value(0.0f)
32 {}
33
34 Q_DECLARE_PUBLIC(QAxis)
35
36 QList<QAbstractAxisInput *> m_inputs;
37 float m_value;
38
39 void setValue(float value)
40 {
41 if (value != m_value) {
42 m_value = value;
43 Q_EMIT q_func()->valueChanged(value: m_value);
44 }
45 }
46};
47
48struct QAxisData
49{
50 QList<Qt3DCore::QNodeId> inputIds;
51};
52
53} // Qt3DInput
54
55QT_END_NAMESPACE
56
57#endif // QT3DINPUT_QAXIS_P_H
58
59

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