summaryrefslogtreecommitdiff
path: root/src/webwindow
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2012-07-25 10:44:49 +0200
committerAndrea Diamantini <adjam7@gmail.com>2012-12-10 02:48:04 +0100
commit4ea8138fcaf25b4d866ccafc277ab624d0b24441 (patch)
tree0e14399f6237418a3643173eb69c8df05543469b /src/webwindow
parentRe-view and re-add tab highlight feature (diff)
downloadrekonq-4ea8138fcaf25b4d866ccafc277ab624d0b24441.tar.xz
Re-add WebSnap class & included API in WebWindow for tab preview
Diffstat (limited to 'src/webwindow')
-rw-r--r--src/webwindow/webwindow.cpp7
-rw-r--r--src/webwindow/webwindow.h3
2 files changed, 10 insertions, 0 deletions
diff --git a/src/webwindow/webwindow.cpp b/src/webwindow/webwindow.cpp
index 631c9a2c..6d0d4d72 100644
--- a/src/webwindow/webwindow.cpp
+++ b/src/webwindow/webwindow.cpp
@@ -22,6 +22,7 @@
#include "webwindow.moc"
#include "webpage.h"
+#include "websnap.h"
#include <QUrl>
#include <QLineEdit>
@@ -148,3 +149,9 @@ QIcon WebWindow::icon() const
{
return _view->icon();
}
+
+
+QPixmap WebWindow::tabPreview(int width, int height)
+{
+ return WebSnap::renderPagePreview(*page(), width, height);
+}
diff --git a/src/webwindow/webwindow.h b/src/webwindow/webwindow.h
index 7d72ed34..189f111f 100644
--- a/src/webwindow/webwindow.h
+++ b/src/webwindow/webwindow.h
@@ -29,6 +29,7 @@ class WebPage;
class QWebView;
class QLineEdit;
+class QPixmap;
class QUrl;
@@ -47,6 +48,8 @@ public:
QUrl url() const;
QString title() const;
QIcon icon() const;
+
+ QPixmap tabPreview(int width, int height);
private Q_SLOTS:
void checkLoadUrl();