Class: QgsAdvancedDigitizingTool

An abstract class for advanced digitizing tools.

Added in version 3.40.

Class Hierarchy

Inheritance diagram of qgis.gui.QgsAdvancedDigitizingTool

Base classes

QObject

Methods

cadDockWidget

Returns the advanced digitizing widget associated with the tool.

canvasMoveEvent

Handles canvas press move.

canvasPressEvent

Handles canvas press event.

canvasReleaseEvent

Handles canvas release event.

createWidget

Returns a widget to control the tool.

mapCanvas

Returns the map canvas associated with the tool.

paint

Paints tool content onto the advanced digitizing canvas item.

Signals

paintRequested

Requests a new painting event to the advanced digitizing canvas item.

class qgis.gui.QgsAdvancedDigitizingTool[source]

Bases: QObject

__init__(canvas: QgsMapCanvas | None, cadDockWidget: QgsAdvancedDigitizingDockWidget | None)

The advanced digitizing tool constructor.

Parameters:
cadDockWidget(self) QgsAdvancedDigitizingDockWidget | None[source]

Returns the advanced digitizing widget associated with the tool.

Return type:

Optional[QgsAdvancedDigitizingDockWidget]

canvasMoveEvent(self, event: QgsMapMouseEvent | None)[source]

Handles canvas press move.

Note

To stop propagation, set the event’s accepted property to False.

Parameters:

event (Optional[QgsMapMouseEvent])

canvasPressEvent(self, event: QgsMapMouseEvent | None)[source]

Handles canvas press event.

Note

To stop propagation, set the event’s accepted property to False.

Parameters:

event (Optional[QgsMapMouseEvent])

canvasReleaseEvent(self, event: QgsMapMouseEvent | None)[source]

Handles canvas release event.

Note

To stop propagation, set the event’s accepted property to False.

Parameters:

event (Optional[QgsMapMouseEvent])

createWidget(self) QWidget | None[source]

Returns a widget to control the tool.

Note

The caller gets the ownership.

Return type:

Optional[QWidget]

mapCanvas(self) QgsMapCanvas | None[source]

Returns the map canvas associated with the tool.

Return type:

Optional[QgsMapCanvas]

paint(self, painter: QPainter | None)[source]

Paints tool content onto the advanced digitizing canvas item.

Parameters:

painter (Optional[QPainter])

signal paintRequested[source]

Requests a new painting event to the advanced digitizing canvas item.