forward urlchaged signal
back forward reload slots to make it more usable from javascript and to have the api simiar to qgraphicswebview svn path=/trunk/KDE/kdelibs/; revision=1166067
This commit is contained in:
parent
4b8bffc1f8
commit
44d2c0b531
@ -79,6 +79,8 @@ WebView::WebView(QGraphicsItem *parent)
|
||||
this, SIGNAL(loadProgress(int)));
|
||||
connect(d->webView, SIGNAL(loadFinished(bool)),
|
||||
this, SLOT(loadingFinished(bool)));
|
||||
connect(d->webView, SIGNAL(urlChanged(const QUrl &)),
|
||||
this, SLOT(urlChanged(const QUrl &)));
|
||||
}
|
||||
|
||||
WebView::~WebView()
|
||||
@ -179,6 +181,26 @@ bool WebView::dragToScroll()
|
||||
return d->webView->dragToScroll();
|
||||
}
|
||||
|
||||
void WebView::back()
|
||||
{
|
||||
d->webView->back();
|
||||
}
|
||||
|
||||
void WebView::forward()
|
||||
{
|
||||
d->webView->forward();
|
||||
}
|
||||
|
||||
void WebView::reload()
|
||||
{
|
||||
d->webView->reload();
|
||||
}
|
||||
|
||||
void WebView::stop()
|
||||
{
|
||||
d->webView->stop();
|
||||
}
|
||||
|
||||
void WebView::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
|
||||
{
|
||||
QGraphicsWidget::paint(painter, option, widget);
|
||||
|
@ -174,6 +174,31 @@ class PLASMA_EXPORT WebView : public QGraphicsWidget
|
||||
*/
|
||||
void setGeometry(const QRectF &geometry);
|
||||
|
||||
public Q_SLOTS:
|
||||
/**
|
||||
* Loads the previous document in the list of documents built by navigating links.
|
||||
* @since 4.6
|
||||
*/
|
||||
void back();
|
||||
|
||||
/**
|
||||
* Loads the next document in the list of documents built by navigating links.
|
||||
* @since 4.6
|
||||
*/
|
||||
void forward();
|
||||
|
||||
/**
|
||||
* Reloads the current document.
|
||||
* @since 4.6
|
||||
*/
|
||||
void reload();
|
||||
|
||||
/**
|
||||
* Stops loading the document.
|
||||
* @since 4.6
|
||||
*/
|
||||
void stop();
|
||||
|
||||
Q_SIGNALS:
|
||||
/**
|
||||
* During loading progress, this signal is emitted. The values
|
||||
@ -191,6 +216,12 @@ class PLASMA_EXPORT WebView : public QGraphicsWidget
|
||||
*/
|
||||
void loadFinished(bool success);
|
||||
|
||||
/**
|
||||
* url displayed by the web page changed
|
||||
* @since 4.6
|
||||
*/
|
||||
void urlChanged(const QUrl &url);
|
||||
|
||||
protected:
|
||||
/**
|
||||
* Reimplementation
|
||||
|
Loading…
x
Reference in New Issue
Block a user