summaryrefslogtreecommitdiff
path: root/src/webview.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2009-07-26 18:51:13 +0200
committerAndrea Diamantini <adjam7@gmail.com>2009-07-26 18:51:13 +0200
commitc2cf251dfe808e1a4e336dbf1cddc645d63c2e2f (patch)
treef038c3a38a7532cf15f1d988ac4ad9b6954228e3 /src/webview.cpp
parentFixing a bit GooWiki actions and updating TODO (diff)
downloadrekonq-c2cf251dfe808e1a4e336dbf1cddc645d63c2e2f.tar.xz
A lot of fixes here:
- CTRL + click browsing - mouse wheel gestures - cleaning a bit web* classes This has been possible restoring some code from rekonq 0.1 web classes implementation.
Diffstat (limited to 'src/webview.cpp')
-rw-r--r--src/webview.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/webview.cpp b/src/webview.cpp
index f001f664..e39cdacb 100644
--- a/src/webview.cpp
+++ b/src/webview.cpp
@@ -298,6 +298,9 @@ void WebView::keyPressEvent(QKeyEvent *event)
void WebView::mousePressEvent(QMouseEvent *event)
{
+ m_page->m_pressedButtons = event->buttons();
+ m_page->m_keyboardModifiers = event->modifiers();
+
switch(event->button())
{
case Qt::XButton1:
@@ -312,6 +315,20 @@ void WebView::mousePressEvent(QMouseEvent *event)
}
+void WebView::wheelEvent(QWheelEvent *event)
+{
+ if (QApplication::keyboardModifiers() & Qt::ControlModifier)
+ {
+ int numDegrees = event->delta() / 8;
+ int numSteps = numDegrees / 15;
+ setTextSizeMultiplier(textSizeMultiplier() + numSteps * 0.1);
+ event->accept();
+ return;
+ }
+ QWebView::wheelEvent(event);
+}
+
+
void WebView::slotGooWikiSearch()
{
KAction *a = qobject_cast<KAction*>(sender());