| 555 | } |
| 556 | |
| 557 | void MatrixView::wheelEvent(QWheelEvent* event) { |
| 558 | if (m_stackedWidget->currentIndex() == 1 && (QApplication::keyboardModifiers() & Qt::ControlModifier)) { |
| 559 | // TODO: implement https://wiki.qt.io/Smooth_Zoom_In_QGraphicsView also for the resize in QLabel? |
| 560 | QPoint numDegrees = event->angleDelta() / 8; |
| 561 | int numSteps = numDegrees.y() / 15; // see QWheelEvent documentation |
| 562 | if (numSteps > 0) |
| 563 | changeZoom(zoomInAction); |
| 564 | else |
| 565 | changeZoom(zoomOutAction); |
| 566 | } else |
| 567 | QWidget::wheelEvent(event); |
| 568 | } |
| 569 | |
| 570 | // ############################################################################## |
| 571 | // #################################### SLOTs ################################ |