Class: QgsPlotToolZoom

class qgis.gui.QgsPlotToolZoom

Bases: QgsPlotTool

Plot tool for zooming into and out of the plot.

Added in version 3.26.

QgsPlotToolZoom(canvas: Optional[QgsPlotCanvas]) Constructor for QgsPlotToolZoom, with the associated canvas.

Methods

childEvent

connectNotify

constrainPointToRect

Constrains a point to force it to fall within the specified rectangle.

customEvent

deactivate

disconnectNotify

isClickAndDrag

Returns True if a mouse press/release operation which started at startViewPoint and ended at endViewPoint should be considered a "click and drag".

isSignalConnected

keyPressEvent

param event:

keyReleaseEvent

param event:

plotMoveEvent

param event:

plotPressEvent

param event:

plotReleaseEvent

param event:

receivers

sender

senderSignalIndex

timerEvent

toCanvasCoordinates

Converts a point in map coordinates to the associated canvas point.

toMapCoordinates

Converts a point on the canvas to the associated map coordinate.

childEvent(self, a0: QChildEvent | None)
connectNotify(self, signal: QMetaMethod)
constrainPointToRect(point: QPointF | QPoint, rect: QRectF) QPointF

Constrains a point to force it to fall within the specified rectangle.

customEvent(self, a0: QEvent | None)
deactivate(self)
disconnectNotify(self, signal: QMetaMethod)
isClickAndDrag(self, startViewPoint: QPoint, endViewPoint: QPoint) bool

Returns True if a mouse press/release operation which started at startViewPoint and ended at endViewPoint should be considered a “click and drag”. If False is returned, the operation should be instead treated as just a click on startViewPoint.

isSignalConnected(self, signal: QMetaMethod) bool
keyPressEvent(self, event: QKeyEvent | None)
Parameters:

event (Optional[QKeyEvent])

keyReleaseEvent(self, event: QKeyEvent | None)
Parameters:

event (Optional[QKeyEvent])

plotMoveEvent(self, event: QgsPlotMouseEvent | None)
Parameters:

event (Optional[QgsPlotMouseEvent])

plotPressEvent(self, event: QgsPlotMouseEvent | None)
Parameters:

event (Optional[QgsPlotMouseEvent])

plotReleaseEvent(self, event: QgsPlotMouseEvent | None)
Parameters:

event (Optional[QgsPlotMouseEvent])

receivers(self, signal: PYQT_SIGNAL) int
sender(self) QObject | None
senderSignalIndex(self) int
timerEvent(self, a0: QTimerEvent | None)
toCanvasCoordinates(self, point: QgsPoint) QgsPointXY

Converts a point in map coordinates to the associated canvas point.

May return an empty point if the map point cannot be converted to a canvas point.

toMapCoordinates(self, point: QgsPointXY) QgsPoint

Converts a point on the canvas to the associated map coordinate.

May return an empty point if the canvas point cannot be converted to a map point.