Class: QgsMapToolCaptureLayerGeometry¶
QgsMapToolCaptureLayerGeometry
is a base class for map tools
digitizing layer geometries This map tool subclass automatically handles
intersection avoidance with other layers in the active project whenever
a geometry is digitized by the user.
Added in version 3.26.
Class Hierarchy¶
Base classes¶
|
|
The |
|
Base class for map tools that edit vector geometry |
|
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. |
|
Subclasses¶
This tool digitizes geometry of new point/line/polygon features on already existing vector layers Once the map tool is enabled, user can digitize the feature geometry. A signal will then be emitted. |
Methods
Called when the geometry is captured. |
|
Called when a line is captured. |
|
Called when a point is captured. |
|
Called when a polygon is captured. |
- class qgis.gui.QgsMapToolCaptureLayerGeometry[source]¶
Bases:
QgsMapToolCapture
- __init__(canvas: QgsMapCanvas | None, cadDockWidget: QgsAdvancedDigitizingDockWidget | None, mode: QgsMapToolCapture.CaptureMode)
Constructor
- Parameters:
canvas (Optional[QgsMapCanvas])
cadDockWidget (Optional[QgsAdvancedDigitizingDockWidget])
- layerGeometryCaptured(self, geometry: QgsGeometry)[source]¶
Called when the geometry is captured.
A more specific handler is also called afterwards (
layerPointCaptured()
,layerLineCaptured()
orlayerPolygonCaptured()
).- Parameters:
geometry (QgsGeometry)
- layerLineCaptured(self, line: QgsCurve | None)[source]¶
Called when a line is captured.
The generic
layerGeometryCaptured()
method will be called immediately before this line-specific method.- Parameters:
line (Optional[QgsCurve])
- layerPointCaptured(self, point: QgsPoint)[source]¶
Called when a point is captured.
The generic
layerGeometryCaptured()
method will be called immediately before this point-specific method.- Parameters:
point (QgsPoint)
- layerPolygonCaptured(self, polygon: QgsCurvePolygon | None)[source]¶
Called when a polygon is captured.
The generic
layerGeometryCaptured()
method will be called immediately before this polygon-specific method.- Parameters:
polygon (Optional[QgsCurvePolygon])