summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2009-07-10 16:10:10 +0200
committerAndrea Diamantini <adjam7@gmail.com>2009-07-10 16:10:10 +0200
commit81a1394215334daeb8a95276f55d408fffc968a7 (patch)
treea69ad37566bcdd398356f63a1f98addef55855d2 /src
parentMerge commit 'pano/master' (diff)
parentadd mouse actions in webview (diff)
downloadrekonq-81a1394215334daeb8a95276f55d408fffc968a7.tar.xz
Merge commit 'abuus/master'
Diffstat (limited to 'src')
-rw-r--r--src/webview.cpp14
-rw-r--r--src/webview.h2
2 files changed, 15 insertions, 1 deletions
diff --git a/src/webview.cpp b/src/webview.cpp
index d5744ccc..ce7378de 100644
--- a/src/webview.cpp
+++ b/src/webview.cpp
@@ -251,3 +251,17 @@ void WebView::keyPressEvent(QKeyEvent *event)
QWebView::keyPressEvent(event);
}
+
+void WebView::mousePressEvent(QMouseEvent *event)
+{
+ switch(event->button()) {
+ case Qt::XButton1:
+ triggerPageAction(QWebPage::Back);
+ break;
+ case Qt::XButton2:
+ triggerPageAction(QWebPage::Forward);
+ break;
+ default:
+ QWebView::mousePressEvent(event);
+ };
+}
diff --git a/src/webview.h b/src/webview.h
index 389db154..d8a6f3d6 100644
--- a/src/webview.h
+++ b/src/webview.h
@@ -61,7 +61,7 @@ signals:
protected:
void contextMenuEvent(QContextMenuEvent *event);
-
+ void mousePressEvent(QMouseEvent *event);
/**
* Filters (SHIFT + ) CTRL + TAB events and emit (shift)ctrlTabPressed()
* to make switch tab