sec_interp.gui.tools.interpretation_tool module¶
Interpretation tool for Profile View.
This module provides the ProfileInterpretationTool for drawing interpretation polygons in the profile preview window.
- class sec_interp.gui.tools.interpretation_tool.ProfileSnapper(canvas: QgsMapCanvas)¶
Bases:
objectHelper class to handle point snapping functionality.
Duplicates logic from ProfileMeasureTool to avoid tight coupling.
- snap(mouse_pos: QPoint) QgsPointXY¶
Find the nearest vertex or edge to the mouse position.
- class sec_interp.gui.tools.interpretation_tool.ProfileInterpretationTool(canvas: QgsMapCanvas)¶
Bases:
QgsMapToolEmitPointTool for drawing interpretation polygons on the profile canvas.
Left Click: Add vertex
Move: Update preview rubber band
Right Click: Remove last vertex
Enter/Double Click: Finalize polygon
Escape: Cancel
- polygonFinished¶
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.
- Type:
pyqtSignal(*types, name
- activate(self)¶
called when set as currently active map tool
- deactivate()¶
Cleanup when tool is deactivated.
- reset()¶
Reset the tool state safely.
- canvasReleaseEvent(event)¶
Handle mouse click release.
- canvasMoveEvent(event)¶
Handle mouse move for rubber band update.
- canvasDoubleClickEvent(event)¶
Finalize polygon on double click.
- keyPressEvent(event)¶
Handle keyboard events.
- finalize_polygon()¶
Finalize the polygon and emit signal.