1// Copyright (C) 2020 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 QT3DCORE_RENDERSETTINGS_H
5#define QT3DCORE_RENDERSETTINGS_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/qbackendnode.h>
19#include <Qt3DCore/qcoresettings.h>
20#include <Qt3DCore/private/qt3dcore_global_p.h>
21
22QT_BEGIN_NAMESPACE
23
24namespace Qt3DCore {
25
26class QCoreAspect;
27
28class Q_3DCORE_PRIVATE_EXPORT CoreSettings : public QBackendNode
29{
30public:
31 CoreSettings();
32
33 void setAspect(QCoreAspect *aspect) { m_aspect = aspect; }
34 void syncFromFrontEnd(const Qt3DCore::QNode *frontEnd, bool firstTime) override;
35
36private:
37 QCoreAspect *m_aspect;
38};
39
40class CoreSettingsFunctor : public Qt3DCore::QBackendNodeMapper
41{
42public:
43 explicit CoreSettingsFunctor(QCoreAspect *aspect);
44 Qt3DCore::QBackendNode *create(Qt3DCore::QNodeId id) const override;
45 Qt3DCore::QBackendNode *get(Qt3DCore::QNodeId id) const override;
46 void destroy(Qt3DCore::QNodeId id) const override;
47
48private:
49 QCoreAspect *m_aspect;
50 mutable CoreSettings *m_settings;
51};
52
53} // namespace Qt3DCore
54
55QT_END_NAMESPACE
56
57#endif // QT3DCORE_RENDERSETTINGS_H
58

source code of qt3d/src/core/aspect/coresettings_p.h