mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 21:20:19 +00:00
30 lines
530 B
C
30 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
|