sec_interp.gui.tools.measure_tool module
- class sec_interp.gui.tools.measure_tool.ProfileMeasureTool(*args: Any, **kwargs: Any)[source]
Bases:
QgsMapToolEmitPointMap tool for measuring distances in profile view.
Supports multi-point polyline measurements: - Click to add points along the trace - Click “Finalizar” button in UI to complete measurement - Right-click or Escape to cancel and reset
- 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.
Left click: Add point to measurement
Right click: Cancel and reset
Press Enter to finalize (see keyPressEvent)
- Parameters:
event – Map tool event from QGIS
- deactivate() None[source]
Deactivate the measurement tool.
Note: We no longer call reset() here to allow measurements to persist visually until a new one is started or explicitly cleared.
- finalize_measurement()[source]
Finalize the measurement and emit final metrics.
This is a public method that can be called from UI buttons. After finalizing, the tool is deactivated but results remain visible.
- keyPressEvent(event: Any) None[source]
Handle keyboard events.
Enter/Return: Finalize measurement
Escape: Cancel measurement
- Parameters:
event – Key event from QGIS
- measurementChanged
alias of
dict