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 | #include "backendnode_p.h" |
5 | #include <Qt3DCore/qnode.h> |
6 | #include <Qt3DCore/private/qbackendnode_p.h> |
7 | |
8 | QT_BEGIN_NAMESPACE |
9 | |
10 | namespace Qt3DAnimation { |
11 | namespace Animation { |
12 | |
13 | BackendNode::BackendNode(Mode mode) |
14 | : Qt3DCore::QBackendNode(mode) |
15 | , m_handler(nullptr) |
16 | { |
17 | } |
18 | |
19 | BackendNode::~BackendNode() |
20 | { |
21 | } |
22 | |
23 | void BackendNode::setHandler(Handler *handler) |
24 | { |
25 | m_handler = handler; |
26 | } |
27 | |
28 | void BackendNode::setDirty(Handler::DirtyFlag flag) |
29 | { |
30 | Q_ASSERT(m_handler); |
31 | m_handler->setDirty(flag, nodeId: peerId()); |
32 | } |
33 | |
34 | void BackendNode::syncFromFrontEnd(const Qt3DCore::QNode *frontEnd, bool firstTime) |
35 | { |
36 | Q_UNUSED(firstTime); |
37 | |
38 | d_ptr->setEnabled(frontEnd->isEnabled()); |
39 | } |
40 | |
41 | } // namespace Animation |
42 | } // namespace Qt3DAnimation |
43 | |
44 | QT_END_NAMESPACE |
45 |