summaryrefslogtreecommitdiff
path: root/src/webview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/webview.cpp')
-rw-r--r--src/webview.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/webview.cpp b/src/webview.cpp
index 75dc0979..96c3cef5 100644
--- a/src/webview.cpp
+++ b/src/webview.cpp
@@ -60,10 +60,13 @@
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)));
}
@@ -83,6 +86,10 @@ KUrl WebView::url() const
return KUrl(QWebView::url());
}
+int WebView::progress()
+{
+ return m_progress;
+}
QString WebView::lastStatusBarText() const
{
@@ -324,3 +331,14 @@ 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;
+}