sec_interp.gui.main_dialog_preview module

class sec_interp.gui.main_dialog_preview.PreviewManager(dialog: Any, preview_service: IPreviewService | None = None)[source]

Bases: object

Manages preview generation and rendering for the dialog.

This class encapsulates all preview-related logic, including data generation, rendering, and updates based on user interactions.

__init__(dialog: Any, preview_service: IPreviewService | None = None) None[source]

Initialize preview manager with reference to parent dialog.

Parameters:
  • dialog – The parent SecInterpDialog instance.

  • preview_service – Optional preview service for dependency injection.

cleanup()[source]

Clean up resources and stop background tasks.

generate_preview() tuple[bool, str][source]

Generate complete preview with all available data layers.

This is the main preview generation method that orchestrates data generation and rendering.

Returns:

Tuple of (success, message)

update_from_checkboxes() None[source]

Update preview when checkboxes change.

This method re-renders the preview using cached data and current checkbox states without regenerating data.