summaryrefslogtreecommitdiff
path: root/src/websnap.h
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2010-06-23 00:00:38 +0200
committerAndrea Diamantini <adjam7@gmail.com>2010-06-23 00:00:38 +0200
commitc1fd36de72375b36d486fa7afe5bbe58349b6d5e (patch)
treefc95b9221372a74225a4048526f64206b5ef1310 /src/websnap.h
parentCalling KTabBar::mouseMoveEvent() ASAP, to let tab switch occur... ASAP! (diff)
parentadd comments (diff)
downloadrekonq-c1fd36de72375b36d486fa7afe5bbe58349b6d5e.tar.xz
Merge commit 'refs/merge-requests/142' of git://gitorious.org/rekonq/mainline into m142
Diffstat (limited to 'src/websnap.h')
-rw-r--r--src/websnap.h22
1 files changed, 18 insertions, 4 deletions
diff --git a/src/websnap.h b/src/websnap.h
index cfc2c83e..d1006c18 100644
--- a/src/websnap.h
+++ b/src/websnap.h
@@ -80,17 +80,28 @@ public:
~WebSnap();
/**
- * Snaps a pixmap of size w * h from a page and save it to cache
+ * Snaps a pixmap of size w * h from a page
*
* @param page the page to snap
* @param w the image width
* @param h the image height
- * @param save decide to save or not the preview on cache
*
* @return the pixmap snapped from the page
*/
- static QPixmap renderPreview(const QWebPage &page, int w = WIDTH, int h = HEIGHT, bool save = true);
-
+ static QPixmap renderPagePreview(const QWebPage &page, int w = WIDTH, int h = HEIGHT);
+
+
+ /**
+ * Snaps a pixmap of size w * h from a page for tab preview
+ *
+ * @param page the page to snap
+ * @param w the image width
+ * @param h the image height
+ *
+ * @return the pixmap snapped from the page
+ */
+ static QPixmap renderTabPreview(const QWebPage &page, int w, int h);
+
/**
* Guess the local path where the image for the url provided
* should be
@@ -118,6 +129,9 @@ signals:
private:
QWebPage m_page;
KUrl m_url;
+
+ //render a preview: common part of renderPagePreview() and renderTabPreview()
+ static QPixmap render(const QWebPage &page, int w, int h);
};
#endif // WEB_SNAP_H