diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2010-09-17 00:42:55 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2010-09-17 00:42:55 +0200 |
commit | 596d75fa61f58f489a898ce1918ee04170dbcf6a (patch) | |
tree | 58051bd873d88f4896c2c84e24a20071a721d877 /src/websnap.h | |
parent | Merge commit 'refs/merge-requests/2295' of git://gitorious.org/rekonq/mainline (diff) | |
parent | Websnaps: change the image path to use base64. (diff) | |
download | rekonq-596d75fa61f58f489a898ce1918ee04170dbcf6a.tar.xz |
Merge commit 'refs/merge-requests/211' of git://gitorious.org/rekonq/mainline into m211
Diffstat (limited to 'src/websnap.h')
-rw-r--r-- | src/websnap.h | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/websnap.h b/src/websnap.h index 5bad952d..e5b550fc 100644 --- a/src/websnap.h +++ b/src/websnap.h @@ -43,11 +43,6 @@ // Forward Declarations class QPixmap; -// Defines -#define WIDTH 200 -#define HEIGHT 150 - - /** * This class is used in many classes of rekonq to produce an image * based on the site corresponding to the url passed as argument. @@ -63,6 +58,7 @@ class QPixmap; * - NewTabPage class: to show the favorites page "preview" (given an url, you show AND save an image) * */ + class REKONQ_TESTS_EXPORT WebSnap : public QObject { Q_OBJECT @@ -88,7 +84,7 @@ public: * * @return the pixmap snapped from the page */ - static QPixmap renderPagePreview(const QWebPage &page, int w = WIDTH, int h = HEIGHT); + static QPixmap renderPagePreview(const QWebPage &page, int w = defaultWidth, int h = defaultHeight); // static QPixmap renderVisiblePagePreview(const QWebPage &page, int w = WIDTH, int h = HEIGHT); TODO: try to make this method work => more previews for the urlbar @@ -101,7 +97,7 @@ public: * * @return the pixmap snapped from the page */ - static QPixmap renderClosingPagePreview(const QWebPage &page, int w = WIDTH, int h = HEIGHT); + static QPixmap renderClosingPagePreview(const QWebPage &page, int w = defaultWidth, int h = defaultHeight); /** * Snaps a pixmap of size w * h from a page for tab preview @@ -139,6 +135,9 @@ signals: void snapDone(bool ok); private: + // Constants + static const int defaultWidth = 200; + static const int defaultHeight = 150; QWebPage m_page; KUrl m_url; |