sec_interp.gui.preview_state module
Shared preview state objects for SecInterp dialog managers.
- class sec_interp.gui.preview_state.PreviewCache
Bases:
objectShared mutable cache of generated preview data.
Owned by the dialog and shared between PreviewManager and InterpretationManager so that neither manager reaches into the other.
- __getitem__(key: str) Any
Return the cached value for
key.
- __init__() None
Initialize an empty cache with the standard preview keys.
- __setitem__(key: str, value: Any) None
Store
valuein the cache underkey.
- get(key: str, default: Any = None) Any
Return the cached value for
key, ordefault.
- update(other: dict[str, Any] | None = None, **kwargs: Any) None
Update the cache from a mapping and/or keyword arguments.
- class sec_interp.gui.preview_state.RenderState
Bases:
objectShared holder for the current preview render output.
Owned by the dialog, written by the plugin’s draw_preview and read by ExportManager so the export path no longer depends on loose dialog attributes (
current_canvas/current_layers).- __init__() None
Initialize an empty render state.
- update(canvas: Any, layers: list) None
Store the latest render output.