summaryrefslogtreecommitdiff
path: root/src/websnap.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/websnap.cpp')
-rw-r--r--src/websnap.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/websnap.cpp b/src/websnap.cpp
index 0d72ef3a..ff4746ca 100644
--- a/src/websnap.cpp
+++ b/src/websnap.cpp
@@ -42,10 +42,6 @@
#include <QFile>
-#define WIDTH 200
-#define HEIGHT 150
-
-
WebSnap::WebSnap(const QUrl &url)
: QObject()
{
@@ -115,6 +111,13 @@ QPixmap WebSnap::renderPreview(const QWebPage &page,int w, int h)
}
+void WebSnap::savePreview(QPixmap pm, KUrl url)
+{
+ QFile::remove(fileForUrl(url).toLocalFile());
+ pm.save(fileForUrl(url).toLocalFile());
+}
+
+
KUrl WebSnap::fileForUrl(KUrl url)
{
QString filePath =