summaryrefslogtreecommitdiff
path: root/src/rekonqpage/newtabpage.h
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2010-03-16 01:45:50 +0100
committerAndrea Diamantini <adjam7@gmail.com>2010-03-16 01:45:50 +0100
commitc4a3ac8eb53f109a3da1f53f279fc86edcb92597 (patch)
tree8ef689aac509629d33fce88c6b2ad31e8837285f /src/rekonqpage/newtabpage.h
parentMerge commit 'refs/merge-requests/104' of git://gitorious.org/rekonq/mainline... (diff)
downloadrekonq-c4a3ac8eb53f109a3da1f53f279fc86edcb92597.tar.xz
First bunch of fixes for the NewTabPage + WebSnap chain.
It seems clear (to me) that they leaks memory, so they urgently need fixes. And a complete redesign. This is just a first (the easiest) part of it: - Removed some unuseful methods, - Added some documentation for the WebSnap class - Cleaned code, in general
Diffstat (limited to 'src/rekonqpage/newtabpage.h')
-rw-r--r--src/rekonqpage/newtabpage.h24
1 files changed, 14 insertions, 10 deletions
diff --git a/src/rekonqpage/newtabpage.h b/src/rekonqpage/newtabpage.h
index d4c57299..fd04e60a 100644
--- a/src/rekonqpage/newtabpage.h
+++ b/src/rekonqpage/newtabpage.h
@@ -62,7 +62,8 @@ public:
void snapFinished(int index, KUrl url, QString title);
void removePreview(int index);
-protected: // these are the function to build the new tab page
+protected:
+ // these are the functions to build the new tab page
void browsingMenu(const KUrl &currentUrl);
void favoritesPage();
@@ -70,13 +71,15 @@ protected: // these are the function to build the new tab page
void bookmarksPage();
void closedTabsPage();
+ // Previews handling
QWebElement emptyPreview(int index);
QWebElement loadingPreview(int index, KUrl url);
QWebElement validPreview(int index, KUrl url, QString title);
- /** This function takes a QwebElement with the .thumbnail structure.
- It hides the "remove" and "modify" buttons->
- */
+ /** This function takes a QwebElement with the .thumbnail structure,
+ * hiding the "remove" and "modify" buttons
+ *
+ */
void hideControls(QWebElement e);
void showControls(QWebElement e);
void setupPreview(QWebElement e, int index);
@@ -84,10 +87,13 @@ protected: // these are the function to build the new tab page
private:
void createBookItem(const KBookmark &bookmark, QWebElement parent);
- /** This function helps to get faster a new markup of one type,it isn't easy to create one with QWebElement.
- It gets it in the #models div of home.html.
- It works for all elements defined here.
- */
+ /** This function helps to get faster a new markup of one type,
+ * it isn't easy to create one with QWebElement.
+ *
+ * It gets it in the #models div of home.html.
+ * It works for all elements defined here.
+ *
+ */
inline QWebElement markup(QString selector)
{
return m_root.document().findFirst("#models > " + selector).clone();
@@ -98,8 +104,6 @@ private:
QString m_html;
QWebElement m_root;
-
- KUrl m_url;
};
#endif // REKONQ_NEW_TAB_PAGE