┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dolphinview.cpp
diff options
context:
space:
mode:
authorLuciano Montanaro <[email protected]>2008-02-12 09:27:26 +0000
committerLuciano Montanaro <[email protected]>2008-02-12 09:27:26 +0000
commit4caebde3cb9e31fcb18b36e45afa287e9c03abd4 (patch)
treedcefcca624c0746f82f7512de42278783ed7885c /src/dolphinview.cpp
parentbad99f25fee78ccf36971da00e3ef18d493c22fe (diff)
Move the Ctrl-wheel zoom handling to dolphinview.
The specialized views still need to ignore the Ctrl-qualified wheel events, though. svn path=/trunk/KDE/kdebase/apps/; revision=773976
Diffstat (limited to 'src/dolphinview.cpp')
-rw-r--r--src/dolphinview.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/dolphinview.cpp b/src/dolphinview.cpp
index 7d3fea96a..3fec8fdfb 100644
--- a/src/dolphinview.cpp
+++ b/src/dolphinview.cpp
@@ -537,6 +537,20 @@ void DolphinView::mouseReleaseEvent(QMouseEvent* event)
QWidget::mouseReleaseEvent(event);
setActive(true);
}
+
+void DolphinView::wheelEvent(QWheelEvent* event)
+{
+ if ((event->modifiers() & Qt::ControlModifier) == Qt::ControlModifier) {
+ int d = event->delta();
+ if (d > 0 && isZoomInPossible()) {
+ zoomIn();
+ } else if (d < 0 && isZoomOutPossible()) {
+ zoomOut();
+ }
+ event->accept();
+ }
+}
+
void DolphinView::activate()
{
setActive(true);