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 "callbackjob_p.h"
5
6#include <Qt3DLogic/private/job_common_p.h>
7#include <Qt3DLogic/private/manager_p.h>
8
9QT_BEGIN_NAMESPACE
10
11namespace Qt3DLogic {
12namespace Logic {
13
14CallbackJob::CallbackJob()
15 : QAspectJob()
16 , m_logicManager(nullptr)
17{
18 SET_JOB_RUN_STAT_TYPE(this, JobTypes::Callback, 0)
19}
20
21void CallbackJob::setManager(Manager *manager)
22{
23 m_logicManager = manager;
24}
25
26void CallbackJob::run()
27{
28}
29
30bool CallbackJob::isRequired()
31{
32 return false;
33}
34
35void CallbackJob::postFrame(Qt3DCore::QAspectEngine *aspectEngine)
36{
37 Q_UNUSED(aspectEngine);
38 Q_ASSERT(m_logicManager);
39 m_logicManager->triggerLogicFrameUpdates();
40}
41
42} // namespace Logic
43} // namespace Qt3DLogic
44
45QT_END_NAMESPACE
46

source code of qt3d/src/logic/callbackjob.cpp