summaryrefslogtreecommitdiffstats
path: root/core/imagedownloader.h
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2019-02-02 21:23:52 +0100
committerGravatar Robert C. Helling <helling@atdotde.de>2019-02-07 16:06:43 +0100
commit8a8063c1cd7b8e5eae861a8d7eeb89e7e3251e03 (patch)
tree261d1a78d4c21378e08380def3775823b82fe079 /core/imagedownloader.h
parent07b0df215f5562657a3a2c9dd20a95d489e8dcd3 (diff)
downloadsubsurface-8a8063c1cd7b8e5eae861a8d7eeb89e7e3251e03.tar.gz
Profile: add "synchronous" mode for picture plotting
The thumbnails were fetched in the background to achieve a snappier UI. The problem with that is that on LaTeX etc. export only placeholder thumbnails were shown. Therefore, implement a synchronous mode. This only tries to fetch cached thumbnails or calculate thumbnails for images. Videos and remote files are not supported. Fixes #1963 Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/imagedownloader.h')
-rw-r--r--core/imagedownloader.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/core/imagedownloader.h b/core/imagedownloader.h
index e0d70f59f..280383250 100644
--- a/core/imagedownloader.h
+++ b/core/imagedownloader.h
@@ -31,9 +31,13 @@ public:
static Thumbnailer *instance();
// Schedule a thumbnail for fetching or calculation.
- // Returns a placeholder thumbnail. The actual thumbnail will be sent
- // via a signal later.
- QImage fetchThumbnail(const QString &filename);
+ // If synchronous is false, returns a placeholder thumbnail.
+ // The actual thumbnail will be sent via a signal later.
+ // If synchronous is true, try to fetch the actual thumbnail.
+ // In this mode only precalculated thumbnails or thumbnails
+ // from pictures are returned. Video extraction and remote
+ // images are not supported.
+ QImage fetchThumbnail(const QString &filename, bool synchronous);
// Schedule multiple thumbnails for forced recalculation
void calculateThumbnails(const QVector<QString> &filenames);