sec_interp.plugin.lifecycle module
QGIS lifecycle and action/toolbar wiring for the SecInterp plugin.
- class sec_interp.plugin.lifecycle.PluginLifecycleMixin
Bases:
objectMenu/toolbar actions and unload/cleanup lifecycle.
- add_action(icon_path: str, text: str, callback: Any, enabled_flag: bool = True, add_to_menu: bool = True, add_to_toolbar: bool = True, status_tip: str | None = None, whats_this: str | None = None, parent: Any = None) qgis.PyQt.QtWidgets.QAction
Add a toolbar icon to the toolbar.
- Parameters:
icon_path – Path to the icon for this action.
text – Text shown in menu items for this action.
callback – Function called when the action is triggered.
enabled_flag – Whether the action is enabled by default.
add_to_menu – Whether the action is added to the menu.
add_to_toolbar – Whether the action is added to the toolbar.
status_tip – Optional popup text on hover.
whats_this – Optional status-bar text on hover.
parent – Parent widget for the new action.
- Returns:
The created QAction (also appended to
self.actions).
- disconnect_signals() None
Disconnect all signals to prevent memory leaks.
- initGui() None
Create the menu entries and toolbar icons inside the QGIS GUI.
- process_data(inputs: dict[str, Any] | None = None) tuple[Any, Any, Any] | None
Process profile data by delegating to the dialog’s preview manager.
- Parameters:
inputs – Pre-validated inputs (optional)
- Returns:
Tuple of (profile_data, geol_data, struct_data) or None
- run() None
Run method that performs all the real work.
- unload() None
Remove the plugin menu item and icon from QGIS GUI.