summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/previewimage.cpp17
-rw-r--r--src/websnap.cpp1
2 files changed, 12 insertions, 6 deletions
diff --git a/src/previewimage.cpp b/src/previewimage.cpp
index d027bfd1..b78f9ae5 100644
--- a/src/previewimage.cpp
+++ b/src/previewimage.cpp
@@ -27,6 +27,7 @@
#include "previewimage.moc"
#include <QFile>
+#include <QMovie>
#include <KUrl>
#include <KStandardDirs>
@@ -46,22 +47,28 @@ PreviewImage::PreviewImage(const QString &url, const QString &pos)
}
else
{
- QString path = KStandardDirs::locate("appdata", "pics/loading.mng");
- setPixmap( QPixmap(path) );
-
ws = new WebSnap( url, pos );
connect(ws, SIGNAL(finished()), this, SLOT(setSiteImage()));
+
+ QString path = KStandardDirs::locate("appdata", "pics/busywidget.gif");
+
+ QMovie *movie = new QMovie(path, QByteArray(), this);
+ movie->setSpeed(50);
+ setMovie(movie);
+ movie->start();
}
}
PreviewImage::~PreviewImage()
{
- kDebug() << "bye bye..";
}
void PreviewImage::setSiteImage()
{
- kDebug() << "Done. works?";
+ QMovie *m = movie();
+ delete m;
+ setMovie(0);
+
setPixmap( ws->previewImage() );
}
diff --git a/src/websnap.cpp b/src/websnap.cpp
index ec537b32..94560891 100644
--- a/src/websnap.cpp
+++ b/src/websnap.cpp
@@ -58,7 +58,6 @@ WebSnap::WebSnap(const QString &url, const QString &pos)
void WebSnap::load()
{
- kDebug() << "loading..";
m_page.mainFrame()->load( QUrl(m_url) );
}