mirror of
https://github.com/subsurface/subsurface.git
synced 2024-12-01 06:30:26 +00:00
9edb4f3fa9
This required a bit more untangling, but with this it seems we can build subsurface-mobile again (at least on the desktop). Interesting is the removal from inside the ImageDownloader of the call to DivePictureModel::instance()->updateDivePictures() - which actually could cause some interesting recursion issues. If it turns out we did indeed need this, it needs to be re-architected. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
29 lines
530 B
C++
29 lines
530 B
C++
#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
|