Class: QgsPlotToolPan¶
- class qgis.gui.QgsPlotToolPan¶
Bases:
QgsPlotTool
Plot tool for panning/zoom/navigating plots.
New in version 3.26.
QgsPlotToolPan(canvas:
QgsPlotCanvas
) Constructor forQgsPlotToolPan
, with the associatedcanvas
.Methods
Constrains a point to force it to fall within the specified rectangle.
- rtype:
Qgis.PlotToolFlags
Returns
True
if a mouse press/release operation which started atstartViewPoint
and ended atendViewPoint
should be considered a "click and drag".- param event:
- param event:
- param event:
Converts a
point
in map coordinates to the associated canvas point.Converts a
point
on the canvas to the associated map coordinate.- childEvent(self, QChildEvent)¶
- connectNotify(self, QMetaMethod)¶
- constrainPointToRect(point: QPointF | QPoint, rect: QRectF) QPointF ¶
Constrains a point to force it to fall within the specified rectangle.
- customEvent(self, QEvent)¶
- deactivate(self)¶
- disconnectNotify(self, QMetaMethod)¶
- flags(self) Qgis.PlotToolFlags ¶
- Return type:
- isClickAndDrag(self, startViewPoint: QPoint, endViewPoint: QPoint) bool ¶
Returns
True
if a mouse press/release operation which started atstartViewPoint
and ended atendViewPoint
should be considered a “click and drag”. IfFalse
is returned, the operation should be instead treated as just a click onstartViewPoint
.
- isSignalConnected(self, QMetaMethod) bool ¶
- plotMoveEvent(self, event: QgsPlotMouseEvent)¶
- Parameters:
event (QgsPlotMouseEvent) –
- plotPressEvent(self, event: QgsPlotMouseEvent)¶
- Parameters:
event (QgsPlotMouseEvent) –
- plotReleaseEvent(self, event: QgsPlotMouseEvent)¶
- Parameters:
event (QgsPlotMouseEvent) –
- receivers(self, PYQT_SIGNAL) int ¶
- sender(self) QObject ¶
- senderSignalIndex(self) int ¶
- timerEvent(self, QTimerEvent)¶
- 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.