diff options
Diffstat (limited to 'subsurface-core/imagedownloader.h')
-rw-r--r-- | subsurface-core/imagedownloader.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/subsurface-core/imagedownloader.h b/subsurface-core/imagedownloader.h new file mode 100644 index 000000000..fd6a91158 --- /dev/null +++ b/subsurface-core/imagedownloader.h @@ -0,0 +1,29 @@ +#ifndef IMAGEDOWNLOADER_H +#define IMAGEDOWNLOADER_H + +#include <QImage> +#include <QFuture> +#include <QNetworkReply> + +typedef QPair<QString, QByteArray> SHashedFilename; + +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 SHashedImage : public QImage { +public: + SHashedImage(struct picture *picture); +}; + +#endif // IMAGEDOWNLOADER_H |