summaryrefslogtreecommitdiff
path: root/src/rekonqpage/newtabpage.h
diff options
context:
space:
mode:
authormatgic78 <matgic78@gmail.com>2009-12-17 18:22:23 +0100
committermatgic78 <matgic78@gmail.com>2010-02-06 11:22:46 +0100
commit8343d45f3dfd631a3f5ac4213918f285930eb446 (patch)
tree8ec95f3f7b2c97ca6bf02ae70d8654011b72a99a /src/rekonqpage/newtabpage.h
parentQPointers --> QWeakPointers (diff)
downloadrekonq-8343d45f3dfd631a3f5ac4213918f285930eb446.tar.xz
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
Diffstat (limited to 'src/rekonqpage/newtabpage.h')
-rw-r--r--src/rekonqpage/newtabpage.h19
1 files changed, 13 insertions, 6 deletions
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 <webpage.h>
-
// KDE Includes
#include <KUrl>
@@ -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 &currentUrl);
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;