MCPcopy Create free account
hub / github.com/KDE/labplot / wheelEvent

Method wheelEvent

src/frontend/matrix/MatrixView.cpp:557–568  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

555}
556
557void 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 ################################

Calls 2

currentIndexMethod · 0.45
yMethod · 0.45