From 8343d45f3dfd631a3f5ac4213918f285930eb446 Mon Sep 17 00:00:00 2001 From: matgic78 Date: Thu, 17 Dec 2009 18:22:23 +0100 Subject: Re-implemented previews in homepage without using plugins. Not finished yet : Little things that change: -nice buttons appearing on hover -transitions on hover TODO: -when a preview is empty or when loading, it is very ugly -for now there's no way to choose the page you want to preview -port "closed Tabs" to this new architecture -totally remove PreviewImage classes -eventually, specific contextmenu for previews --- src/rekonqpage/newtabpage.h | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'src/rekonqpage/newtabpage.h') diff --git a/src/rekonqpage/newtabpage.h b/src/rekonqpage/newtabpage.h index 003aa84e..84880a10 100644 --- a/src/rekonqpage/newtabpage.h +++ b/src/rekonqpage/newtabpage.h @@ -28,9 +28,6 @@ #define REKONQ_NEW_TAB_PAGE -// rekonq Includes -#include - // KDE Includes #include @@ -41,11 +38,12 @@ // Forward Includes class KBookmark; +class WebPage; -class NewTabPage +class NewTabPage : public QObject { - +Q_OBJECT public: NewTabPage(QWebFrame *frame); ~NewTabPage(); @@ -56,12 +54,19 @@ public: * new tab page */ void generate(const KUrl &url = KUrl("about:home")); + +protected slots: + void snapFinished(); + void removePreview(int index); protected: // these are the function to build the new tab page void browsingMenu(const KUrl ¤tUrl); void favoritesPage(); - //QString lastVisitedPage(); + QWebElement emptyPreview(); + QWebElement loadingPreview(int index, KUrl url); + QWebElement validPreview(int index, KUrl url, QString title); + void historyPage(); void bookmarksPage(); void closedTabsPage(); @@ -77,6 +82,8 @@ private: { return m_root.document().findFirst("#models > " + selector).clone(); } + + QString checkTitle(QString title); QString m_html; -- cgit v1.2.1