38 QML_NAMED_ELEMENT(RuntimeLoader)
39 QML_ADDED_IN_VERSION(6, 2)
41 Q_PROPERTY(QUrl source READ source WRITE setSource NOTIFY sourceChanged)
42 Q_PROPERTY(Status status READ status NOTIFY statusChanged)
43 Q_PROPERTY(QString errorString READ errorString NOTIFY errorStringChanged)
44 Q_PROPERTY(QQuick3DBounds3 bounds READ bounds NOTIFY boundsChanged)
45 Q_PROPERTY(QQuick3DInstancing *instancing READ instancing WRITE setInstancing NOTIFY instancingChanged)
46 Q_PROPERTY(QStringList supportedExtensions READ supportedExtensions CONSTANT REVISION(6, 7))
47#if QT_CONFIG(mimetype)
48 Q_PROPERTY(QList<QMimeType> supportedMimeTypes READ supportedMimeTypes CONSTANT REVISION(6, 7))
52 explicit QQuick3DRuntimeLoader(QQuick3DNode *parent =
nullptr);
54 enum class QueryFilter
66 void setSource(
const QUrl &newSource);
67 void componentComplete() override;
68 Q_REVISION(6, 7)
static QStringList supportedExtensions();
69#if QT_CONFIG(mimetype)
70 Q_REVISION(6, 7)
static QList<QMimeType> supportedMimeTypes();
73 enum class Status { Empty, Success, Error };
75 Status status()
const;
76 QString errorString()
const;
77 const QQuick3DBounds3 &bounds()
const;
79 QQuick3DInstancing *instancing()
const;
80 void setInstancing(QQuick3DInstancing *newInstancing);
82 Q_REVISION(6, 12) Q_INVOKABLE QQuick3DObject *query(
const QString &name)
const;
83 Q_REVISION(6, 12) Q_INVOKABLE QList<QQuick3DObject *> queryAll(QueryFilter filter)
const;
88 void errorStringChanged();
90 void instancingChanged();
93 QSSGRenderGraphObject *updateSpatialNode(QSSGRenderGraphObject *node) override;
96 void calculateBounds();
100 QSSGRuntimeObjectNameMap m_objects;
101 QSSGRuntimeObjectTypeMap m_objectsByType;
103 QPointer<QQuick3DNode> m_root;
104 QPointer<QQuick3DNode> m_imported;
107 Status m_status = Status::Empty;
108 QString m_errorString;
109 bool m_boundsDirty =
false;
110 QQuick3DBounds3 m_bounds;
111 QQuick3DInstancing *m_instancing =
nullptr;
112 bool m_instancingChanged =
false;