Qt
6.x
The Qt SDK
Loading...
Searching...
No Matches
qquick3druntimeloader_p.h
Go to the documentation of this file.
1
// Copyright (C) 2021 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4
#ifndef QQUICK3DRUNTIMELOADER_H
5
#define QQUICK3DRUNTIMELOADER_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 purely as an
12
// implementation detail. 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 <QtQuick3D/private/qquick3dmodel_p.h>
19
#include <QtQuick3D/private/qquick3dinstancing_p.h>
20
21
#include "
qtquick3dassetutilsglobal_p.h
"
22
23
QT_BEGIN_NAMESPACE
24
25
class
Q_QUICK3DASSETUTILS_EXPORT
QQuick3DRuntimeLoader
:
public
QQuick3DNode
26
{
27
Q_OBJECT
28
29
QML_NAMED_ELEMENT
(RuntimeLoader)
30
QML_ADDED_IN_VERSION
(6, 2)
31
32
Q_PROPERTY
(
QUrl
source
READ
source
WRITE setSource NOTIFY sourceChanged)
33
Q_PROPERTY
(
Status
status READ status NOTIFY
statusChanged
)
34
Q_PROPERTY
(
QString
errorString READ errorString NOTIFY errorStringChanged)
35
Q_PROPERTY
(
QQuick3DBounds3
bounds READ bounds NOTIFY boundsChanged)
36
Q_PROPERTY
(
QQuick3DInstancing
*instancing READ instancing WRITE
setInstancing
NOTIFY instancingChanged)
37
38
public
:
39
explicit
QQuick3DRuntimeLoader
(
QQuick3DNode
*
parent
=
nullptr
);
40
41
QUrl
source
()
const
;
42
void
setSource(
const
QUrl
&newSource);
43
void
componentComplete
()
override
;
44
45
enum class
Status
{
Empty
,
Success
,
Error
};
46
Q_ENUM
(Status)
47
Status status()
const
;
48
QString
errorString()
const
;
49
const
QQuick3DBounds3
&bounds()
const
;
50
51
QQuick3DInstancing
*instancing()
const
;
52
void
setInstancing
(
QQuick3DInstancing
*newInstancing);
53
54
Q_SIGNALS
:
55
void
sourceChanged
();
56
void
statusChanged
();
57
void
errorStringChanged
();
58
void
boundsChanged
();
59
void
instancingChanged
();
60
61
protected
:
62
QSSGRenderGraphObject
*
updateSpatialNode
(
QSSGRenderGraphObject
*node)
override
;
63
64
private
:
65
void
calculateBounds();
66
void
loadSource();
67
void
updateModels();
68
69
QPointer<QQuick3DNode>
m_root;
70
QPointer<QQuick3DNode>
m_imported;
71
QString
m_assetId;
// Used to release runtime assets in the buffer manager.
72
QUrl
m_source;
73
Status
m_status = Status::Empty;
74
QString
m_errorString;
75
bool
m_boundsDirty =
false
;
76
QQuick3DBounds3
m_bounds;
77
QQuick3DInstancing
*m_instancing =
nullptr
;
78
bool
m_instancingChanged =
false
;
79
};
80
81
QT_END_NAMESPACE
82
83
#endif
// QQUICK3DRUNTIMELOADER_H
QPointer
\inmodule QtCore
Definition
qpointer.h:18
QQuick3DBounds3
Definition
qquick3dmodel_p.h:39
QQuick3DInstancing
\inmodule QtQuick3D \inherits QQuick3DObject
Definition
qquick3dinstancing.h:17
QQuick3DNode
Definition
qquick3dnode_p.h:30
QQuick3DNode::componentComplete
void componentComplete() override
Invoked after the root component that caused this instantiation has completed construction.
Definition
qquick3dnode.cpp:522
QQuick3DNode::updateSpatialNode
QSSGRenderGraphObject * updateSpatialNode(QSSGRenderGraphObject *node) override
Definition
qquick3dnode.cpp:761
QQuick3DRuntimeLoader
Definition
qquick3druntimeloader_p.h:26
QQuick3DRuntimeLoader::Status
Status
Definition
qquick3druntimeloader_p.h:45
QQuick3DRuntimeLoader::statusChanged
void statusChanged()
QQuick3DRuntimeLoader::instancingChanged
void instancingChanged()
QQuick3DRuntimeLoader::sourceChanged
void sourceChanged()
QQuick3DRuntimeLoader::boundsChanged
void boundsChanged()
QQuick3DRuntimeLoader::errorStringChanged
void errorStringChanged()
QString
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition
qstring.h:127
QUrl
\inmodule QtCore
Definition
qurl.h:94
statusChanged
void statusChanged(QDeclarativeComponent::Status status)
[1]
Definition
qlogging.cpp:9
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qstandardpaths_haiku.cpp:21
QT_END_NAMESPACE
Definition
qsharedpointer.cpp:1545
source
GLsizei GLsizei GLchar * source
Definition
qopengles2ext.h:952
Error
@ Error
Definition
qqmlbuiltinfunctions.cpp:1746
QML_NAMED_ELEMENT
#define QML_NAMED_ELEMENT(NAME)
Definition
qqmlintegration.h:52
QML_ADDED_IN_VERSION
#define QML_ADDED_IN_VERSION(MAJOR, MINOR)
Definition
qqmlintegration.h:86
setInstancing
static void setInstancing(QQuick3DNode *node, QQuick3DInstancing *instanceTable, float bias)
Definition
qquick3dparticlemodelparticle.cpp:225
Success
@ Success
Definition
main.cpp:3197
Q_ENUM
#define Q_ENUM(x)
Definition
qtmetamacros.h:68
Q_PROPERTY
#define Q_PROPERTY(...)
Definition
qtmetamacros.h:56
Q_OBJECT
#define Q_OBJECT
Definition
qtmetamacros.h:117
Q_SIGNALS
#define Q_SIGNALS
Definition
qtmetamacros.h:45
qtquick3dassetutilsglobal_p.h
CompletionState::Empty
@ Empty
QSSGRenderGraphObject
Definition
qssgrendergraphobject_p.h:29
parent
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent
Definition
uiaclientinterfaces_p.h:209
qtquick3d
src
assetutils
qquick3druntimeloader_p.h
Generated by
1.9.7