37 QML_NAMED_ELEMENT(RuntimeLoader)
38 QML_ADDED_IN_VERSION(6, 2)
40 Q_PROPERTY(QUrl source READ source WRITE setSource NOTIFY sourceChanged)
41 Q_PROPERTY(Status status READ status NOTIFY statusChanged)
42 Q_PROPERTY(QString errorString READ errorString NOTIFY errorStringChanged)
43 Q_PROPERTY(QQuick3DBounds3 bounds READ bounds NOTIFY boundsChanged)
44 Q_PROPERTY(QQuick3DInstancing *instancing READ instancing WRITE setInstancing NOTIFY instancingChanged)
45 Q_PROPERTY(QStringList supportedExtensions READ supportedExtensions CONSTANT REVISION(6, 7))
46#if QT_CONFIG(mimetype)
47 Q_PROPERTY(QList<QMimeType> supportedMimeTypes READ supportedMimeTypes CONSTANT REVISION(6, 7))
51 explicit QQuick3DRuntimeLoader(QQuick3DNode *parent =
nullptr);
54 void setSource(
const QUrl &newSource);
55 void componentComplete() override;
56 Q_REVISION(6, 7)
static QStringList supportedExtensions();
57#if QT_CONFIG(mimetype)
58 Q_REVISION(6, 7)
static QList<QMimeType> supportedMimeTypes();
61 enum class Status { Empty, Success, Error };
63 Status status()
const;
64 QString errorString()
const;
65 const QQuick3DBounds3 &bounds()
const;
67 QQuick3DInstancing *instancing()
const;
68 void setInstancing(QQuick3DInstancing *newInstancing);
73 void errorStringChanged();
75 void instancingChanged();
78 QSSGRenderGraphObject *updateSpatialNode(QSSGRenderGraphObject *node) override;
81 void calculateBounds();
85 QPointer<QQuick3DNode> m_root;
86 QPointer<QQuick3DNode> m_imported;
89 Status m_status = Status::Empty;
90 QString m_errorString;
91 bool m_boundsDirty =
false;
92 QQuick3DBounds3 m_bounds;
93 QQuick3DInstancing *m_instancing =
nullptr;
94 bool m_instancingChanged =
false;