MCPcopy Create free account
hub / github.com/Gecode/gecode / wheelEvent

Method wheelEvent

gecode/gist/treecanvas.cpp:1291–1307  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1289 }
1290
1291 void
1292 TreeCanvas::wheelEvent(QWheelEvent* event) {
1293 if (event->modifiers() & Qt::ShiftModifier) {
1294 event->accept();
1295#if QT_VERSION >= 0x060000
1296 if (event->angleDelta().y() != 0 && !autoZoom)
1297 scaleTree(scale*100+ceil(static_cast<double>(event->angleDelta().y())/4.0),
1298 event->position().x(), event->position().y());
1299#else
1300 if (event->orientation() == Qt::Vertical && !autoZoom)
1301 scaleTree(scale*100+ceil(static_cast<double>(event->delta())/4.0),
1302 event->x(), event->y());
1303#endif
1304 } else {
1305 event->ignore();
1306 }
1307 }
1308
1309 bool
1310 TreeCanvas::finish(void) {

Callers

nothing calls this directly

Calls 3

yMethod · 0.45
xMethod · 0.45
ignoreMethod · 0.45

Tested by

no test coverage detected