From a6ef003dd4c1b6ad08eca4f5adaa4679bbc20bce Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Sat, 20 Mar 2010 22:54:21 +0100 Subject: Downloads Page This commit implements the downloads history page. While it is in an horrible shape, its slots seem working well It needs just some love.. --- src/history/historymanager.h | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) (limited to 'src/history/historymanager.h') diff --git a/src/history/historymanager.h b/src/history/historymanager.h index e744ca4b..8fc5c30e 100644 --- a/src/history/historymanager.h +++ b/src/history/historymanager.h @@ -57,7 +57,10 @@ public: const QDateTime &d = QDateTime(), const QString &t = QString() ) - : title(t), url(u), dateTime(d) {} + : title(t) + , url(u), + dateTime(d) + {} inline bool operator==(const HistoryItem &other) const { @@ -77,6 +80,29 @@ public: }; +// --------------------------------------------------------------------------------------------------------------- + + +class DownloadItem +{ +public: + DownloadItem() {} + explicit DownloadItem(const QString &srcUrl, + const QString &destUrl, + const QDateTime &d + ) + : srcUrlString(srcUrl) + , destUrlString(destUrl) + , dateTime(d) + {} + + QString srcUrlString; + QString destUrlString; + QDateTime dateTime; +}; + + +typedef QList DownloadList; // --------------------------------------------------------------------------------------------------------------- @@ -131,6 +157,10 @@ public: */ KCompletion *completionObject() const; + void addDownload(const QString &srcUrl, const QString &destUrl); + DownloadList downloads(); + bool clearDownloadsHistory(); + public slots: void clear(); void loadSettings(); -- cgit v1.2.1