#ifndef DOWNLOADMANAGER_H #define DOWNLOADMANAGER_H #include "fbbrowser.h" #include #include class DownloadManager : public QObject { Q_OBJECT public: DownloadManager(); ~DownloadManager(); void processDownloadRequest(QUrl& url); int downloaded; private: // Object required for downloading. QNetworkAccessManager* qnam; QQueue dlQ; QNetworkRequest request; QNetworkReply* currentDownload; QFile outfile; // Download-in-progress flag. bool dip; signals: void finished(); void updateProgress(int i); public slots: void downloadFile(QUrl& fileUrl); private slots: void startNextDownload(); void downloadReady(); void downloadProgress(qint64 bytesIn, qint64 bytesTotal); void downloadFinished(); }; #endif // DOWNLOADMANAGER_H