sec_interp.gui.tools.interpretation_tool module

class sec_interp.gui.tools.interpretation_tool.ProfileInterpretationTool(*args: Any, **kwargs: Any)[source]

Bases: QgsMapToolEmitPoint

Tool 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

activate() None[source]

Activate the interpretation tool.

canvasDoubleClickEvent(event: Any) None[source]

Finalize polygon on double click.

Parameters:

event – Map tool event from QGIS

canvasMoveEvent(event: Any) None[source]

Handle mouse move for rubber band update.

Parameters:

event – Map tool event from QGIS

canvasReleaseEvent(event: Any) None[source]

Handle mouse click release.

Parameters:

event – Map tool event from QGIS

deactivate() None[source]

Deactivate the interpretation tool.

finalize_polygon()[source]

Finalize the polygon and emit signal.

keyPressEvent(event: Any) None[source]

Handle keyboard events.

Parameters:

event – Key event from QGIS

polygonFinished

alias of InterpretationPolygon

reset()[source]

Reset the tool state safely.

class sec_interp.gui.tools.interpretation_tool.ProfileSnapper(canvas: qgis.gui.QgsMapCanvas)[source]

Bases: object

Helper class to handle point snapping functionality.

Duplicates logic from ProfileMeasureTool to avoid tight coupling.

snap(mouse_pos: qgis.PyQt.QtCore.QPoint) qgis.core.QgsPointXY[source]

Find the nearest vertex or edge to the mouse position.