MCPcopy Create free account
hub / github.com/dail8859/NotepadNext / eventFilter

Method eventFilter

src/ZoomEventWatcher.cpp:49–67  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47}
48
49bool ZoomEventWatcher::eventFilter(QObject *obj, QEvent *event)
50{
51 if (event->type() == QEvent::Wheel) {
52 QWheelEvent *wheelEvent = static_cast<QWheelEvent *>(event);
53
54 if (!isWheelEventHorizontal(wheelEvent)) {
55 if (QApplication::keyboardModifiers() & Qt::ControlModifier) {
56 if (wheelEventYDelta(wheelEvent) > 0) {
57 emit zoomIn();
58 } else {
59 emit zoomOut();
60 }
61 return true;
62 }
63 }
64 }
65
66 return QObject::eventFilter(obj, event);
67}

Callers

nothing calls this directly

Calls 2

isWheelEventHorizontalFunction · 0.85
wheelEventYDeltaFunction · 0.85

Tested by

no test coverage detected