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#include "axissetting_p.h"
5
6#include <Qt3DInput/qaxissetting.h>
7
8#include <Qt3DInput/private/qaxissetting_p.h>
9
10QT_BEGIN_NAMESPACE
11
12namespace Qt3DInput {
13namespace Input {
14
15AxisSetting::AxisSetting()
16 : BackendNode()
17 , m_deadZoneRadius(0.0f)
18 , m_smooth(false)
19{
20}
21
22void AxisSetting::cleanup()
23{
24 QBackendNode::setEnabled(false);
25 m_deadZoneRadius = 0.0f;
26 m_axes.clear();
27 m_smooth = false;
28}
29
30void AxisSetting::syncFromFrontEnd(const Qt3DCore::QNode *frontEnd, bool firstTime)
31{
32 BackendNode::syncFromFrontEnd(frontEnd, firstTime);
33 const QAxisSetting *node = qobject_cast<const QAxisSetting *>(object: frontEnd);
34 if (!node)
35 return;
36
37 m_deadZoneRadius = node->deadZoneRadius();
38 m_axes = node->axes();
39 m_smooth = node->isSmoothEnabled();
40}
41
42} // namespace Input
43} // namespace Qt3DInput
44
45QT_END_NAMESPACE
46

source code of qt3d/src/input/backend/axissetting.cpp