summaryrefslogtreecommitdiffstats
path: root/qt-ui/divepicturewidget.h
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui/divepicturewidget.h')
-rw-r--r--qt-ui/divepicturewidget.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/qt-ui/divepicturewidget.h b/qt-ui/divepicturewidget.h
index aa524e1a6..2ce228daf 100644
--- a/qt-ui/divepicturewidget.h
+++ b/qt-ui/divepicturewidget.h
@@ -4,12 +4,33 @@
#include <QAbstractTableModel>
#include <QListView>
#include <QThread>
+#include <QFuture>
+#include <QNetworkReply>
+
+typedef QPair<QString, QByteArray> SHashedFilename;
struct PhotoHelper {
QImage image;
int offsetSeconds;
};
+class SHashedImage : public QImage {
+public:
+ SHashedImage(struct picture *picture);
+};
+
+class ImageDownloader : public QObject {
+ Q_OBJECT;
+public:
+ ImageDownloader(struct picture *picture);
+ void load();
+private:
+ struct picture *picture;
+ QNetworkAccessManager manager;
+private slots:
+ void saveImage(QNetworkReply *reply);
+};
+
class DivePictureModel : public QAbstractTableModel {
Q_OBJECT
public:
@@ -18,6 +39,7 @@ public:
virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
virtual int rowCount(const QModelIndex &parent = QModelIndex()) const;
void updateDivePictures();
+ void updateDivePicturesWhenDone(QList<QFuture<void> >);
void removePicture(const QString& fileUrl);
private: