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.

mapCanvas

Returns the map canvas associated with the tool.

Virtual Methods

In PyQGIS, only methods marked as virtual can be safely overridden in a Python subclass of QgsAdvancedDigitizingTool. See the FAQ for more details.

canvasMoveEvent

Handles canvas press move.

canvasPressEvent

Handles canvas press event.

canvasReleaseEvent

Handles canvas release event.

createWidget

Returns a widget to control 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]

virtual 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])

virtual 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])

virtual 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])

virtual 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]

virtual 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.