summaryrefslogtreecommitdiff
path: root/src/downloadmanager.h
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2011-11-27 12:00:28 +0100
committerAndrea Diamantini <adjam7@gmail.com>2011-11-29 00:09:12 +0100
commitd76f6bdb544f6ba4fb6b92fbeb36bfe25450eb1f (patch)
treeb6e9b858d5f012599bd5348d69c21ee88b756131 /src/downloadmanager.h
parentAdd settings for fixed download path (diff)
downloadrekonq-d76f6bdb544f6ba4fb6b92fbeb36bfe25450eb1f.tar.xz
Download Management ++
- let users choose a "default" download dir - Moved download code to download manager - follow dfaure's suggestions about overwrite handling (kdelibs commit 88e3b372fb9c539) - download label notification (for 3 seconds): this can be further improved with an icon... BUG: 271683 BUG: 283177
Diffstat (limited to 'src/downloadmanager.h')
-rw-r--r--src/downloadmanager.h24
1 files changed, 18 insertions, 6 deletions
diff --git a/src/downloadmanager.h b/src/downloadmanager.h
index 2955904c..e450d261 100644
--- a/src/downloadmanager.h
+++ b/src/downloadmanager.h
@@ -34,12 +34,16 @@
// Local Includes
#include "downloaditem.h"
+// KDE Includes
+#include <kio/accessmanager.h>
+
// Qt Includes
#include <QObject>
+#include <QWidget>
-
-
-// ---------------------------------------------------------------------------------
+// Forward Includes
+class KUrl;
+class QNetworkReply;
class REKONQ_TESTS_EXPORT DownloadManager : public QObject
@@ -53,16 +57,24 @@ public:
{
return m_downloadList;
}
- DownloadItem* addDownload(const QString &srcUrl, const QString &destUrl);
bool clearDownloadsHistory();
+ bool downloadResource(const KUrl &url, const KIO::MetaData &metaData = KIO::MetaData(),
+ QWidget *parent = 0, const QString &suggestedName = QString());
+
+ void downloadLinksWithKGet(const QVariant &contentList);
+
+ static void extractSuggestedFileName(const QNetworkReply* reply, QString& fileName);
+
Q_SIGNALS:
void newDownloadAdded(QObject *item);
+ void notifyDownload(const QString&, Rekonq::Notify = Rekonq::Download);
private:
- DownloadList m_downloadList;
-
void init();
+ DownloadItem* addDownload(const QString &srcUrl, const QString &destUrl);
+
+ DownloadList m_downloadList;
};
#endif // DOWNLOADMANAGER_H