sec_interp.gui.dialog_interpretation_manager module
Interpretation management module for SecInterp main dialog.
This module handles interpretation polygons, their persistence, and attribute inheritance, decoupling this logic from the main dialog class. Persistence and inheritance live in dedicated mixins.
- class sec_interp.gui.dialog_interpretation_manager.InterpretationManager(dialog: SecInterpDialog, cache: PreviewCache | None = None)
Bases:
InterpretationPersistenceMixin,InterpretationInheritanceMixinManages interpretation polygons and their business logic.
- __init__(dialog: SecInterpDialog, cache: PreviewCache | None = None) None
Initialize interpretation manager.
- Parameters:
dialog – The main dialog instance.
cache – Shared preview data cache (owned by the dialog).
- clear_interpretations() None
Clear all interpretations and persist the change.
- handle_interpretation_finished(interpretation: InterpretationPolygon) None
Process a finished interpretation polygon.
- Parameters:
interpretation – The finished interpretation polygon.
- set_preview_update_handler(handler: Callable[[], None]) None
Register the callback invoked after an interpretation is added.
- Parameters:
handler – Callable that re-renders the preview.