# sec_interp.gui.main_dialog_preview module

Preview management module for SecInterp main dialog.

This module handles preview generation, rendering, and updates, separating preview logic from the main dialog class.

class sec_interp.gui.main_dialog_preview.PreviewManager(dialog: SecInterpDialog)

  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.

  Initialize preview manager with reference to parent dialog.

  Parameters:

    dialog – The SecInterpDialog instance

  __init__(dialog: SecInterpDialog)

    Initialize preview manager with reference to parent dialog.

    Parameters:

      dialog – The SecInterpDialog instance

  generate_preview() → tuple[bool, str]

    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

    Update preview when checkboxes change.

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