mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
9986ce25d7
In core/imagedownloader.cpp the helpers cloudImageUrl() and loadPicture() are made of static linkage. The global variables queuedPictures and pictureQueueMutex were moved into the loadPicture() function, because they are used only there. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
32 lines
620 B
C++
32 lines
620 B
C++
// SPDX-License-Identifier: GPL-2.0
|
|
#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);
|
|
~ImageDownloader();
|
|
void load(bool fromHash);
|
|
|
|
private:
|
|
struct picture *picture;
|
|
QNetworkAccessManager manager;
|
|
bool loadFromHash;
|
|
|
|
private slots:
|
|
void saveImage(QNetworkReply *reply);
|
|
};
|
|
|
|
class SHashedImage : public QImage {
|
|
public:
|
|
SHashedImage(struct picture *picture);
|
|
};
|
|
|
|
#endif // IMAGEDOWNLOADER_H
|