Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef IMAGEDOWNLOADER_H
- #define IMAGEDOWNLOADER_H
- #include <QObject>
- #include <QImage>
- #include <QtNetwork>
- #include <QMap>
- #include <QDebug>
- class ImageDownloader : public QObject {
- Q_OBJECT
- public:
- ImageDownloader(QMap<QString, QImage> &cache);
- void downloadImage(const QString &url);
- public slots:
- void downloadImage_finished(QNetworkReply *reply);
- private:
- QMap<QString, QImage> *m_cache;
- QImage img;
- signals:
- void downloadImage_success();
- };
- #endif // IMAGEDOWNLOADER_H
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement