diff options
Diffstat (limited to 'src/webview.cpp')
-rw-r--r-- | src/webview.cpp | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/src/webview.cpp b/src/webview.cpp index 75dc0979..1c9440f4 100644 --- a/src/webview.cpp +++ b/src/webview.cpp @@ -55,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))); } @@ -84,6 +85,12 @@ KUrl WebView::url() const } +int WebView::progress() +{ + return m_progress; +} + + QString WebView::lastStatusBarText() const { return m_statusBarText; @@ -324,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; +} |