summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2010-02-09 11:15:10 +0100
committerAndrea Diamantini <adjam7@gmail.com>2010-02-09 11:15:10 +0100
commit57bc503662183f0d2b89ddc419548e0938c17e8f (patch)
tree24917351016a6b90e5d48028aae16a03c8ad28d3
parentFIX (diff)
downloadrekonq-57bc503662183f0d2b89ddc419548e0938c17e8f.tar.xz
Fix NewTabPage API && comments
-rw-r--r--src/rekonqpage/newtabpage.cpp4
-rw-r--r--src/rekonqpage/newtabpage.h18
2 files changed, 12 insertions, 10 deletions
diff --git a/src/rekonqpage/newtabpage.cpp b/src/rekonqpage/newtabpage.cpp
index 19f1686f..95b15ed9 100644
--- a/src/rekonqpage/newtabpage.cpp
+++ b/src/rekonqpage/newtabpage.cpp
@@ -197,6 +197,7 @@ QWebElement NewTabPage::loadingPreview(int index, KUrl url)
return prev;
}
+
QWebElement NewTabPage::validPreview(int index, KUrl url, QString title)
{
QWebElement prev = markup(".thumbnail");
@@ -220,12 +221,15 @@ void NewTabPage::hideControls(QWebElement e)
e.findFirst(".remove").setStyleProperty("visibility", "hidden");
e.findFirst(".modify").setStyleProperty("visibility", "hidden");
}
+
+
void NewTabPage::showControls(QWebElement e)
{
e.findFirst(".remove").setStyleProperty("visibility", "visible");
e.findFirst(".modify").setStyleProperty("visibility", "visible");
}
+
void NewTabPage::setupPreview(QWebElement e, int index)
{
e.findFirst(".remove img").setAttribute("src", QString("file:///") +
diff --git a/src/rekonqpage/newtabpage.h b/src/rekonqpage/newtabpage.h
index 9d41946e..38d82684 100644
--- a/src/rekonqpage/newtabpage.h
+++ b/src/rekonqpage/newtabpage.h
@@ -44,18 +44,17 @@ class WebPage;
class NewTabPage : public QObject
{
Q_OBJECT
+
public:
NewTabPage(QWebFrame *frame);
~NewTabPage();
/**
- * This is the unique NewTabPage public method. It takes an
- * about: url and loads the corresponding part of the
- * new tab page
+ * This method takes an about: url and loads
+ * the corresponding part of the new tab page
*/
void generate(KUrl url = KUrl("about:home"));
-public slots:
void snapFinished(int index, KUrl url, QString title);
void removePreview(int index);
@@ -63,6 +62,10 @@ protected: // these are the function to build the new tab page
void browsingMenu(const KUrl &currentUrl);
void favoritesPage();
+ void historyPage();
+ void bookmarksPage();
+ void closedTabsPage();
+
QWebElement emptyPreview(int index);
QWebElement loadingPreview(int index, KUrl url);
QWebElement validPreview(int index, KUrl url, QString title);
@@ -73,12 +76,7 @@ protected: // these are the function to build the new tab page
void hideControls(QWebElement e);
void showControls(QWebElement e);
void setupPreview(QWebElement e, int index);
-
-
- void historyPage();
- void bookmarksPage();
- void closedTabsPage();
-
+
private:
void createBookItem(const KBookmark &bookmark, QWebElement parent);