sec_interp.gui.dialog_message_mixin module

Message-bar and error-reporting mixin for the SecInterp main dialog.

class sec_interp.gui.dialog_message_mixin.DialogMessageMixin

Bases: object

Push messages to the QGIS message bar and the plugin results area.

handle_error(error: Exception, title: str = 'Error') → None

Centralized error handling for the dialog.

Parameters:
  • error – The exception to handle.

  • title – Title for the error message box.

push_message(title: str, message: str, level: int = qgis.core.Qgis.MessageLevel.Info, duration: int = 5, show_in_plugin: bool = True) → None

Push a message to the QGIS message bar and optionally to plugin results.

Parameters:
  • title – Message title.

  • message – Message content.

  • level – Qgis message level (Info, Warning, Critical, Success).

  • duration – Visibility duration in seconds.

  • show_in_plugin – If True, also show message in plugin results area.