35 QML_NAMED_ELEMENT(RuntimeLoader)
36 QML_ADDED_IN_VERSION(6, 2)
38 Q_PROPERTY(QUrl source READ source WRITE setSource NOTIFY sourceChanged)
39 Q_PROPERTY(Status status READ status NOTIFY statusChanged)
40 Q_PROPERTY(QString errorString READ errorString NOTIFY errorStringChanged)
41 Q_PROPERTY(QQuick3DBounds3 bounds READ bounds NOTIFY boundsChanged)
42 Q_PROPERTY(QQuick3DInstancing *instancing READ instancing WRITE setInstancing NOTIFY instancingChanged)
43 Q_PROPERTY(QStringList supportedExtensions READ supportedExtensions CONSTANT REVISION(6, 7))
44#if QT_CONFIG(mimetype)
45 Q_PROPERTY(QList<QMimeType> supportedMimeTypes READ supportedMimeTypes CONSTANT REVISION(6, 7))
49 explicit QQuick3DRuntimeLoader(QQuick3DNode *parent =
nullptr);
52 void setSource(
const QUrl &newSource);
53 void componentComplete() override;
54 Q_REVISION(6, 7)
static QStringList supportedExtensions();
55#if QT_CONFIG(mimetype)
56 Q_REVISION(6, 7)
static QList<QMimeType> supportedMimeTypes();
59 enum class Status { Empty, Success, Error };
61 Status status()
const;
62 QString errorString()
const;
63 const QQuick3DBounds3 &bounds()
const;
65 QQuick3DInstancing *instancing()
const;
66 void setInstancing(QQuick3DInstancing *newInstancing);
71 void errorStringChanged();
73 void instancingChanged();
76 QSSGRenderGraphObject *updateSpatialNode(QSSGRenderGraphObject *node) override;
79 void calculateBounds();
83 QPointer<QQuick3DNode> m_root;
84 QPointer<QQuick3DNode> m_imported;
87 Status m_status = Status::Empty;
88 QString m_errorString;
89 bool m_boundsDirty =
false;
90 QQuick3DBounds3 m_bounds;
91 QQuick3DInstancing *m_instancing =
nullptr;
92 bool m_instancingChanged =
false;