Class: QgsMapToolExtent¶
A map tool that emits an extent from a rectangle drawn onto the map canvas.
Class Hierarchy¶
Base classes¶
Abstract base class for all map tools. Map tools are user interactive tools for manipulating the map canvas. For example map pan and zoom features are implemented as map tools. |
|
Methods
Removes the tool's rubber band from the canvas. |
|
Returns the current extent drawn onto the canvas. |
|
Returns the current fixed aspect ratio to be used when dragging extent onto the canvas. |
|
Sets a fixed aspect ratio to be used when dragging extent onto the canvas. |
Signals
signal emitted on extent change |
- class qgis.gui.QgsMapToolExtent[source]¶
Bases:
QgsMapTool
- __init__(canvas: QgsMapCanvas | None)
constructor
- Parameters:
canvas (Optional[QgsMapCanvas])
- clearRubberBand(self)[source]¶
Removes the tool’s rubber band from the canvas.
Added in version 3.20.
- extent(self) QgsRectangle [source]¶
Returns the current extent drawn onto the canvas.
- Return type:
- signal extentChanged(extent: QgsRectangle)[source]¶
signal emitted on extent change
- Parameters:
extent (QgsRectangle)