! \internal This slot is connected to the selection rect's \ref QCPSelectionRect::accepted signal when \ref setSelectionRectMode is set to \ref QCP::srmZoom. It determines which axis rect was the origin of the selection rect judging by the starting point of the selection, and then zooms the axes defined via \ref QCPAxisRect::setRangeZoomAxes to the provided \a rect (see \ref QCPAxisR
| 15382 | \see processRectSelection |
| 15383 | */ |
| 15384 | void QCustomPlot::processRectZoom(QRect rect, QMouseEvent *event) |
| 15385 | { |
| 15386 | Q_UNUSED(event) |
| 15387 | if (QCPAxisRect *axisRect = axisRectAt(rect.topLeft())) |
| 15388 | { |
| 15389 | QList<QCPAxis*> affectedAxes = QList<QCPAxis*>() << axisRect->rangeZoomAxes(Qt::Horizontal) << axisRect->rangeZoomAxes(Qt::Vertical); |
| 15390 | affectedAxes.removeAll(static_cast<QCPAxis*>(0)); |
| 15391 | axisRect->zoom(QRectF(rect), affectedAxes); |
| 15392 | } |
| 15393 | replot(rpQueuedReplot); // always replot to make selection rect disappear |
| 15394 | } |
| 15395 | |
| 15396 | /*! \internal |
| 15397 |
nothing calls this directly
no test coverage detected