preview_grid
anomaly_match_ui.widgets.preview_grid
¶
Lightweight image preview grid for setup screens.
PreviewGrid()
¶
A 3x3 grid of image thumbnails for previewing source data.
Unlike the full :class:GalleryWidget, this is a read-only grid
with no pagination, sorting, or interaction — just images and labels.
Call :meth:update with image bytes and filenames to populate,
or :meth:show_message / :meth:show_spinner for status feedback.
Source code in anomaly_match_ui/widgets/preview_grid.py
update(items)
¶
Populate the grid with image data.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
items
|
list[tuple[str, bytes]]
|
List of |
required |
Source code in anomaly_match_ui/widgets/preview_grid.py
show_spinner(text='Loading preview...')
¶
Show a spinner with a status message.
Source code in anomaly_match_ui/widgets/preview_grid.py
update_spinner_text(text)
¶
Replace the spinner caption without altering display mode.
Safe to call from a background thread. No-op when the grid is not currently showing a spinner — prevents stale log messages from stomping on a rendered preview or an error state.
Source code in anomaly_match_ui/widgets/preview_grid.py
show_message(text)
¶
Show a plain text message (e.g. error or empty state).