aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui/divepicturewidget.h
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tomaz.canabrava@intel.com>2014-06-03 19:34:36 -0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-06-03 16:46:03 -0700
commitb1847f9ebb45fcdeb4488f8acd7df2b9ee75906a (patch)
tree8073b53c87220315d1f603791367efa654417c63 /qt-ui/divepicturewidget.h
parent43cf9fdb7a5cc27357c9c111baa6a11b57366a7a (diff)
downloadsubsurface-b1847f9ebb45fcdeb4488f8acd7df2b9ee75906a.tar.gz
Also hold a pointer to the struct picture on the model.
Changes to hold a pointer to the struct picture on the model, so we can use it to determine the correct positioning of the image on the profile. 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.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/qt-ui/divepicturewidget.h b/qt-ui/divepicturewidget.h
index 351ae445c..d66b3053f 100644
--- a/qt-ui/divepicturewidget.h
+++ b/qt-ui/divepicturewidget.h
@@ -6,6 +6,12 @@
#include <QListView>
#include <QThread>
+struct picture;
+struct PhotoHelper{
+ QImage image;
+ struct picture *picture;
+};
+
class DivePictureModel : public QAbstractTableModel {
Q_OBJECT
public:
@@ -20,7 +26,7 @@ private:
// 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, QImage> stringPixmapCache;
+ QHash<QString, PhotoHelper> stringPixmapCache;
};
class DivePictureDelegate : QStyledItemDelegate {