summaryrefslogtreecommitdiffstats
path: root/src/Viewer/studio3d/q3dspresentation.h
diff options
context:
space:
mode:
authorAntti Määttä <antti.maatta@qt.io>2019-04-12 13:54:35 +0300
committerAntti Määttä <antti.maatta@qt.io>2019-05-03 09:34:00 +0000
commit73ebd0f9cf6376a762c96d37ab6046fefd8d4789 (patch)
treee415e2af7e30002563422ba9cbec02f3276b013e /src/Viewer/studio3d/q3dspresentation.h
parentccc70e48e576c0dffc289df4850a909fb6fef83d (diff)
Implement dynamic loading of slide resources
Implements loading of textures and images during runtime instead of load time. - Images which are not part of any slide are loaded at load time - Master slide images are always loaded at load time - Images used in a slide are loaded when the slide is entered - Images are unloaded when slide is exited and any other slide does not use them Task-number: QT3DS-3208 Change-Id: I7a827a5e828908efd2b104fe25374c66958319d2 Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Diffstat (limited to 'src/Viewer/studio3d/q3dspresentation.h')
-rw-r--r--src/Viewer/studio3d/q3dspresentation.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/Viewer/studio3d/q3dspresentation.h b/src/Viewer/studio3d/q3dspresentation.h
index 38625583..34809613 100644
--- a/src/Viewer/studio3d/q3dspresentation.h
+++ b/src/Viewer/studio3d/q3dspresentation.h
@@ -49,6 +49,7 @@ class Q_STUDIO3D_EXPORT Q3DSPresentation : public QObject
Q_DECLARE_PRIVATE(Q3DSPresentation)
Q_PROPERTY(QUrl source READ source WRITE setSource NOTIFY sourceChanged)
Q_PROPERTY(QStringList variantList READ variantList WRITE setVariantList NOTIFY variantListChanged)
+ Q_PROPERTY(bool delayedLoading READ delayedLoading WRITE setDelayedLoading NOTIFY delayedLoadingChanged)
public:
explicit Q3DSPresentation(QObject *parent = nullptr);
@@ -68,6 +69,12 @@ public:
Q_INVOKABLE QVariantList getDataInputs() const;
QVector<Q3DSDataInput *> dataInputs() const;
+ bool delayedLoading() const;
+ void setDelayedLoading(bool enable);
+
+ Q_INVOKABLE void preloadSlide(const QString &elementPath);
+ Q_INVOKABLE void unloadSlide(const QString &elementPath);
+
// Input event handlers
void mousePressEvent(QMouseEvent *e);
void mouseReleaseEvent(QMouseEvent *e);
@@ -100,6 +107,7 @@ Q_SIGNALS:
// and datainputs are available through dataInputs() / getDataInputs().
void dataInputsReady();
void customSignalEmitted(const QString &elementPath, const QString &name);
+ void delayedLoadingChanged(bool enable);
private:
Q_DISABLE_COPY(Q3DSPresentation)