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

Method zoomIn

src/backend/worksheet/plots/cartesian/CartesianPlot.cpp:3055–3068  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3053// zoom
3054
3055void CartesianPlot::zoomIn(int xIndex, int yIndex, const QPointF& sceneRelPos) {
3056 setUndoAware(false);
3057 enableAutoScale(Dimension::X, xIndex, false);
3058 enableAutoScale(Dimension::Y, yIndex, false);
3059 setUndoAware(true);
3060 setRangeDirty(Dimension::X, xIndex, true);
3061 setRangeDirty(Dimension::Y, yIndex, true);
3062 zoom(xIndex, Dimension::X, true, sceneRelPos.x()); // zoom in x
3063 zoom(yIndex, Dimension::Y, true, sceneRelPos.y()); // zoom in y
3064
3065 Q_D(CartesianPlot);
3066 d->retransformScales(xIndex, yIndex);
3067 WorksheetElementContainer::retransform();
3068}
3069
3070void CartesianPlot::zoomOut(int xIndex, int yIndex, const QPointF& sceneRelPos) {
3071 setUndoAware(false);

Callers 1

wheelEventMethod · 0.80

Calls 3

xMethod · 0.80
retransformScalesMethod · 0.80
yMethod · 0.45

Tested by

no test coverage detected