radioviz.views.unsaved_images_dialog
Dialog for selecting unsaved images before workspace save.
This module provides a modal dialog that allows users to select which unsaved images should be included when saving a workspace to JSON format. The dialog displays a tree view with checkboxes for each unsaved image, showing its name and any dependencies that would also be affected.
Classes
|
Data class representing an unsaved image item in the dialog. |
|
Modal dialog for selecting unsaved images before workspace save. |
- class radioviz.views.unsaved_images_dialog.UnsavedImageItem(image_id: UUID, name: str, dependency_text: str)[source]
Bases:
objectData class representing an unsaved image item in the dialog.
This class holds the information needed to display an unsaved image in the selection dialog, including its unique identifier, display name, and information about any dependencies.
- Parameters:
image_id (UUID) – The unique identifier of the image.
name (str) – The display name of the image.
dependency_text (str) – Text describing the profiles or regions that depend on this image.
- class radioviz.views.unsaved_images_dialog.UnsavedImagesDialog(items: Iterable[UnsavedImageItem], parent: QWidget | None = None)[source]
Bases:
QDialogModal dialog for selecting unsaved images before workspace save.
This dialog displays a tree view with checkboxes for each unsaved image, allowing users to select which images should be included when saving the workspace to JSON format. Each row shows the image name and any dependent profiles or regions.
The dialog provides “Select All” and “Select None” buttons for quick selection management. When the dialog is accepted, the
checked_ids()method can be used to retrieve the UUIDs of the selected images.Initialize the unsaved images selection dialog.
Creates a modal dialog with a tree view displaying all unsaved images as checkable items. Each item shows the image name and its dependencies. By default, all images are checked for inclusion.
- Parameters:
items (Iterable[UnsavedImageItem]) – Collection of unsaved image items to display in the dialog.
parent (QWidget | None) – The parent widget for the dialog, or None for no parent.
- _select_all() None[source]
Select all images in the tree view.
Sets the check state of every top-level item in the tree to checked, including all images to be saved when the dialog is accepted.