summaryrefslogtreecommitdiff
path: root/src/webview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/webview.cpp')
-rw-r--r--src/webview.cpp25
1 files changed, 21 insertions, 4 deletions
diff --git a/src/webview.cpp b/src/webview.cpp
index dca8b6fb..1c9440f4 100644
--- a/src/webview.cpp
+++ b/src/webview.cpp
@@ -36,8 +36,6 @@
#include "application.h"
#include "mainwindow.h"
#include "mainview.h"
-#include "cookiejar.h"
-#include "networkaccessmanager.h"
#include "history.h"
#include "webpage.h"
@@ -57,15 +55,16 @@
#include <QtGui/QAction>
-
-
WebView::WebView(QWidget* parent)
: QWebView(parent)
, m_page(new WebPage(this))
+ , m_progress(0)
{
setPage(m_page);
connect(page(), SIGNAL(statusBarMessage(const QString&)), this, SLOT(setStatusBarText(const QString&)));
+ connect(this, SIGNAL(loadProgress(int)), this, SLOT(slotUpdateProgress(int)));
+ connect(this, SIGNAL(loadFinished(bool)), this, SLOT(slotLoadFinished(bool)));
}
@@ -86,6 +85,12 @@ KUrl WebView::url() const
}
+int WebView::progress()
+{
+ return m_progress;
+}
+
+
QString WebView::lastStatusBarText() const
{
return m_statusBarText;
@@ -326,3 +331,15 @@ void WebView::slotSearch()
KUrl urlSearch = KUrl::fromEncoded(search.toUtf8());
Application::instance()->loadUrl(urlSearch, Rekonq::NewCurrentTab);
}
+
+
+void WebView::slotUpdateProgress(int p)
+{
+ m_progress=p;
+}
+
+
+void WebView::slotLoadFinished(bool)
+{
+ m_progress=0;
+}