spinetoolbox.widgets.select_database_items
A widget and utilities to select database items.
Module Contents
Classes
Widget that allows selecting database items. |
Functions
|
Adds check boxes to grid layout. |
|
Sets the checked state of multiple check boxes. |
- spinetoolbox.widgets.select_database_items.add_check_boxes(check_boxes, checked_states, select_all_button, deselect_all_button, state_changed_slot, layout)[source]
Adds check boxes to grid layout.
- Parameters
check_boxes (dict) – mapping from label to QCheckBox
checked_states (dict) – mapping from label to checked state boolean
select_all_button (QPushButton) – the Select all button
deselect_all_button (QPushButton) – the Deselect all button
state_changed_slot (Callable) – slot to call when any checked state changes
layout (QGridLayout) – target layout
- spinetoolbox.widgets.select_database_items.batch_set_check_state(boxes, checked)[source]
Sets the checked state of multiple check boxes.
- Parameters
boxes (Iterable of QCheckBox) – check boxes
checked (bool) – checked state
- class spinetoolbox.widgets.select_database_items.SelectDatabaseItems(checked_states=None, parent=None)[source]
Bases:
PySide6.QtWidgets.QWidget
Widget that allows selecting database items.
- Parameters
checked_states (dict, optional) – mapping from item name to check state boolean
parent (QWidget) – parent widget
- _DATA_ITEMS = ('entity', 'entity_group', 'parameter_value', 'entity_metadata', 'parameter_value_metadata')[source]
- checked_states()[source]
Collects the checked states of database items.
- Returns
mapping from item name to checked state boolean
- Return type
dict