sec_interp.gui.preview_side_panel module

Side panel shown beside the preview canvas (legend with layers and units).

class sec_interp.gui.preview_side_panel.PreviewSidePanel(*args: Any, **kwargs: Any)

Bases: QWidget

Legend panel (layers, units and interpretations) beside the canvas.

__init__(parent: QWidget | None = None) → None

Initialize the side panel.

Parameters:

parent – Optional parent widget.

interpretation_color_requested

alias of str

interpretation_visibility_changed

alias of str

layer_color_requested

alias of str

layer_visibility_changed

alias of str

set_legend_visible(visible: bool) → None

Show or hide the legend section.

unit_color_requested

alias of str

unit_visibility_changed

alias of str

update_interpretations(interpretations: list | None) → None

Update the interpretations shown inside the legend.

update_legend(renderer: Any, visible: bool = True, style: dict | None = None, layer_visibility: dict[str, bool] | None = None, hidden_interp_ids: set[str] | None = None) → None

Rebuild all legend rows from a preview renderer and the active styles.

class sec_interp.gui.preview_side_panel.UnitStyleEditor(*args: Any, **kwargs: Any)

Bases: QWidget

A row: visibility, color and (optionally) rename/reorder controls.

__init__(name: str, color: QColor, hidden: bool = False, label: str | None = None, interactive: bool = True, with_visibility: bool = True, with_color: bool = True, with_rename: bool = False, with_reorder: bool = False, parent: QWidget | None = None) → None

Initialize the row.

Parameters:
  • name – Identity (unit name or entry key).

  • color – Swatch color.

  • hidden – Whether the entry is currently hidden.

  • label – Display label (alias) or the name.

  • interactive – Whether to show any control.

  • with_visibility – Show the visibility checkbox (interactive).

  • with_color – Show the color button (interactive).

  • with_rename – Whether to show an editable name.

  • with_reorder – Whether to show up/down buttons.

  • parent – Optional parent widget.

color_requested

alias of str

label_changed

alias of str

move_requested

alias of str

visibility_changed

alias of str