summaryrefslogtreecommitdiffstats
path: root/qt-models/divepicturemodel.h
diff options
context:
space:
mode:
Diffstat (limited to 'qt-models/divepicturemodel.h')
-rw-r--r--qt-models/divepicturemodel.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/qt-models/divepicturemodel.h b/qt-models/divepicturemodel.h
index edcddd7a2..d6393e45f 100644
--- a/qt-models/divepicturemodel.h
+++ b/qt-models/divepicturemodel.h
@@ -12,12 +12,18 @@ public:
SHashedImage(struct picture *picture);
};
-
struct PhotoHelper {
QImage image;
int offsetSeconds;
};
+typedef QList<struct picture *> SPictureList;
+typedef struct picture *picturepointer;
+typedef QPair<picturepointer, QImage> SPixmap;
+
+// function that will scale the pixmap, used inside the QtConcurrent thread.
+SPixmap scaleImages(picturepointer picture);
+
class DivePictureModel : public QAbstractTableModel {
Q_OBJECT
public:
@@ -25,11 +31,11 @@ public:
virtual int columnCount(const QModelIndex &parent = QModelIndex()) const;
virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
virtual int rowCount(const QModelIndex &parent = QModelIndex()) const;
- void updateDivePictures();
+ virtual void updateDivePictures();
void updateDivePicturesWhenDone(QList<QFuture<void> >);
void removePicture(const QString& fileUrl);
-private:
+protected:
DivePictureModel();
int numberOfPictures;
// Currently, load the images on the fly
@@ -38,4 +44,4 @@ private:
QHash<QString, PhotoHelper> stringPixmapCache;
};
-#endif \ No newline at end of file
+#endif