diff options
Diffstat (limited to 'src/runtime/q3dsuippresentation_p.h')
-rw-r--r-- | src/runtime/q3dsuippresentation_p.h | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/src/runtime/q3dsuippresentation_p.h b/src/runtime/q3dsuippresentation_p.h index de1be1e..fde8233 100644 --- a/src/runtime/q3dsuippresentation_p.h +++ b/src/runtime/q3dsuippresentation_p.h @@ -406,8 +406,14 @@ public: State state() const { return m_state; } + virtual void listResources(QSet<QString> &resources) const + { + Q_UNUSED(resources); + } protected: void destroyGraph(); + void listCustomPropertyResources(QSet<QString> &resources, const QMap<QString, + Q3DSMaterial::PropertyElement> &meta) const; QByteArray m_id; QString m_name; @@ -739,6 +745,23 @@ public: Q3DSPropertyChange setPlayThrough(PlayThrough v); Q3DSPropertyChange setPlayThroughValue(const QVariant &v); + void generateResourceSet(Q3DSUipPresentation *presentation); + QSet<QUrl> resourceSet() const { return m_resources; } + + void setUnloadSlide(bool unload) + { + m_unload = unload; + } + void setActive(bool active) + { + m_active = active; + // The slide must be explicitly unloaded by the user every time + if (active) + m_unload = false; + } + bool unloadSlide() const { return m_unload; } + bool active() const { return m_active; } + private: Q_DISABLE_COPY(Q3DSSlide) template<typename V> void setProps(const V &attrs, PropSetFlags flags); @@ -756,6 +779,9 @@ private: QVector<Q3DSAction> m_actions; QVector<SlideGraphChangeCallback> m_slideGraphChangeCallbacks; // master only QVector<SlideObjectChangeCallback> m_slideObjectChangeCallbacks; + QSet<QUrl> m_resources; + bool m_unload = false; + bool m_active = false; friend class Q3DSUipParser; friend class Q3DSGraphObject; @@ -842,6 +868,8 @@ public: Q3DSPropertyChange setCustomImage(const QImage &v); // alternative setter QImage customImage() const { return m_customImage; } + void listResources(QSet<QString> &resources) const override; + private: Q_DISABLE_COPY(Q3DSImage) template<typename V> void setProps(const V &attrs, PropSetFlags flags); @@ -1956,6 +1984,10 @@ public: const Q3DSCustomMaterial *material() const { return &m_material; } + void listResources(QSet<QString> &resources) const override + { + listCustomPropertyResources(resources, m_material.properties()); + } private: Q_DISABLE_COPY(Q3DSCustomMaterialInstance) template<typename V> void setProps(const V &attrs, PropSetFlags flags); @@ -2005,6 +2037,11 @@ public: const Q3DSEffect *effect() const { return &m_effect; } + void listResources(QSet<QString> &resources) const override + { + listCustomPropertyResources(resources, m_effect.properties()); + } + private: Q_DISABLE_COPY(Q3DSEffectInstance) template<typename V> void setProps(const V &attrs, PropSetFlags flags); @@ -2200,6 +2237,8 @@ public: void addImplicitPropertyChanges(); QHash<QString, bool> &imageTransparencyHash(); + QUrl imageUrl(const QString &sourcePath); + private: Q_DISABLE_COPY(Q3DSUipPresentation) |