Class: QgsAdvancedDigitizingTool¶
An abstract class for advanced digitizing tools.
Added in version 3.40.
Class Hierarchy¶
Base classes¶
- class qgis.gui.QgsAdvancedDigitizingTool[source]¶
Bases:
QObject- __init__(canvas: QgsMapCanvas | None, cadDockWidget: QgsAdvancedDigitizingDockWidget | None)
The advanced digitizing tool constructor.
- Parameters:
canvas (Optional[QgsMapCanvas]) – The map canvas on which the widget operates
cadDockWidget (Optional[QgsAdvancedDigitizingDockWidget]) – The cadDockWidget to which the floater belongs
- 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]¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.