subsurface/core/imagedownloader.h
Berthold Stoeger 9986ce25d7 Cleanup: Make local helpers and variables of static linkage
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>
2018-02-07 09:44:43 +01:00

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