sec_interp.gui.main_dialog_tools module

class sec_interp.gui.main_dialog_tools.DialogToolManager(dialog: SecInterpDialog, pan_tool: QgsMapTool | None = None, measure_tool: ProfileMeasureTool | None = None, interpretation_tool: ProfileInterpretationTool | None = None)[source]

Bases: object

Manages map tools and related event handling for the preview canvas.

__init__(dialog: SecInterpDialog, pan_tool: QgsMapTool | None = None, measure_tool: ProfileMeasureTool | None = None, interpretation_tool: ProfileInterpretationTool | None = None)[source]

Initialize tool manager with reference to parent dialog.

Parameters:
  • dialog – The sec_interp.gui.main_dialog.SecInterpDialog instance

  • pan_tool – Optional pan tool for injection

  • measure_tool – Optional measure tool for injection

  • interpretation_tool – Optional interpretation tool for injection

activate_default_tool() None[source]

Set the default (pan) tool.

initialize_tools() None[source]

Create and configure map tools if not already provided.

toggle_interpretation_tool(checked: bool) None[source]

Toggle between interpretation and pan tools.

Parameters:

checked – True to activate interpretation tool, False for pan tool.

toggle_measure_tool(checked: bool) None[source]

Toggle between measurement and pan tools.

Parameters:

checked – True to activate measure tool, False for pan tool.

update_measurement_display(metrics: dict[str, Any]) None[source]

Display measurement results from multi-point tool.

Parameters:

metrics – Dictionary containing measurement data.

class sec_interp.gui.main_dialog_tools.NavigationManager(dialog: SecInterpDialog)[source]

Bases: object

Handles navigation events (zooming) for the preview canvas.

__init__(dialog: SecInterpDialog)[source]

Initialize navigation manager.

Parameters:

dialog – The SecInterpDialog instance

handle_wheel_event(event: Any) bool[source]

Handle mouse wheel for zooming in preview canvas.

Parameters:

event – The mouse wheel event.

Returns:

True if event was handled, False otherwise.

Return type:

bool