summaryrefslogtreecommitdiffstats
path: root/qt-ui/divepicturewidget.h
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tomaz.canabrava@intel.com>2014-05-31 00:42:54 -0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-06-01 15:54:29 -0700
commitf1d67cfbacd1e879725e5ebeb2774439246764a4 (patch)
tree20a2862c95767c7646ee361dcef654330ec62640 /qt-ui/divepicturewidget.h
parente140703d34325344f503fc328c20643a8ea9249a (diff)
downloadsubsurface-f1d67cfbacd1e879725e5ebeb2774439246764a4.tar.gz
Add threaded processing of image pixmaps
This code adds threaded processing of a batch of images. It uses the QtConcurrent implementations to call a function repeteadly using MAX_THREADS (Qt gets that for us) and returns a list of it. This call is blocking, so while the pixmaps are being scaled in threads, it will wait for all scalling to be done. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/divepicturewidget.h')
-rw-r--r--qt-ui/divepicturewidget.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/qt-ui/divepicturewidget.h b/qt-ui/divepicturewidget.h
index 062e225d7..ff8d1aa8f 100644
--- a/qt-ui/divepicturewidget.h
+++ b/qt-ui/divepicturewidget.h
@@ -16,6 +16,10 @@ public:
void updateDivePictures(int divenr);
private:
int numberOfPictures;
+ // Currently, load the images on the fly
+ // Later, use a thread to load the images
+ // Later, save the thumbnails so we don't need to reopen every time.
+ QHash<QString, QPixmap> stringPixmapCache;
};
class DivePictureDelegate : QStyledItemDelegate {