From 280c0256db2378c9f33775b270f211660e5bf868 Mon Sep 17 00:00:00 2001 From: Nils Schwabe Date: Fri, 14 Mar 2014 14:50:24 +0100 Subject: - Added IconHolder to cache items - Added FileDownloader for icon downloads --- src/FileDownloader.h | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 src/FileDownloader.h (limited to 'src/FileDownloader.h') diff --git a/src/FileDownloader.h b/src/FileDownloader.h new file mode 100644 index 0000000..fccfa7a --- /dev/null +++ b/src/FileDownloader.h @@ -0,0 +1,45 @@ +/* + * FileDownloader.h + * + * Created on: Mar 7, 2014 + * Author: nils + */ + +#ifndef FILEDOWNLOADER_H_ +#define FILEDOWNLOADER_H_ + +#include +#include +#include +#include +#include + +class FileDownloader : public QObject +{ + Q_OBJECT +public: + explicit FileDownloader(QObject *parent = 0); + + virtual ~FileDownloader(); + + void downloadFile(const QUrl& fileUrl); + + void connectSlot(QObject* obj, const char* slot); + + QByteArray downloadedData() const; + +signals: + void downloaded(QString& fileName, QByteArray downloadedData); + +private slots: + + void fileDownloaded(QNetworkReply* pReply); + +private: + + QNetworkAccessManager m_WebCtrl; + QString fileName; + +}; + +#endif /* FILEDOWNLOADER_H_ */ -- cgit v1.2.3-55-g7522