populse_mia.user_interface.pipeline_manager.iteration_table¶
Module that handles pipeline iteration.
Classes
|
Widget that handles pipeline iteration. |
- class populse_mia.user_interface.pipeline_manager.iteration_table.IterationTable(project, scan_list=None, main_window=None)[source]¶
Bases:
QWidgetWidget that handles pipeline iteration.
This widget allows users to select tags for iteration and visualization, filter values, and manage the iteration process for pipeline execution.
Contains:
Methods:
_create_tag_button: Create a new tag button.
add_tag: Add a tag to visualize in the iteration table.
current_editor: Return the currently active pipeline editor
emit_iteration_table_updated: Emit a signal when the iteration scans have been updated.
fill_values: Fill values_list depending on the visualized tags.
filter_values: Select the tag values used for the iteration.
format_filter_value: Convert a value into a JSON-formatted string.
refresh_layout: Update the layout of the widget.
remove_tag: Remove a tag to visualize in the iteration table.
select_iteration_tag: Open a pop-up to let the user select on which tag to iterate.
select_visualized_tag: Open a pop-up to let the user select which tag to visualize in the iteration table.
update_iterated_tag: Update the widget.
update_table: Update the iteration table.
update_selected_tag: Update the selected tag for current pipeline manager tab.
Signals:
iteration_table_updated: Signal emitted when iteration scans have been updated or if the iteration is toggled off.
- __init__(project, scan_list=None, main_window=None)[source]¶
Initialize the IterationTable widget.
- Parameters:
project – Current project in the software.
scan_list – List of the selected database files. If None, all documents from the current collection will be used.
main_window – Software’s main window reference.
- _create_tag_button(text, index)[source]¶
Create a new tag button with the given text and index.
- Parameters:
text – (str) Text to display on the button.
index – (int) Index of the button in the push_buttons list.
- property current_editor¶
Return the currently active pipeline editor.
This property provides convenient access to the current editor from the pipeline manager without repeating the full attribute chain.
- Returns:
The active pipeline editor instance.
- fill_values(idx)[source]¶
Fill values_list with unique tag values for the specified tag.
- Parameters:
idx – (int) Index of the tag in push_buttons list.
- format_filter_value(value)[source]¶
Convert a value into a JSON-formatted string.
If
valueis a string, this method first attempts to interpret it as a Python literal (for example a list, dict, number, or boolean) usingast.literal_eval(). If parsing fails, the original string is preserved.- Parameters:
value – (Any) The value to serialize.
- Returns:
(str) The JSON representation of the resulting value.
- refresh_layout()[source]¶
Update the layout of the widget.
Called in widget’s initialization and when a tag push button is added or removed.
- select_visualized_tag(idx)[source]¶
Open a dialog to select which tag to visualize in the iteration table.
- Parameters:
idx – (int) Index of the clicked push button.
- update_iterated_tag(tag_name=None)[source]¶
Update the widget when the iterated tag is modified.
- Parameters:
tag_name – (str) Name of the iterated tag.
- update_selected_tag(selected_tag)[source]¶
Update the lists of values corresponding to the selected tag.
Retrieves all unique values of the selected tag from scans in the current collection that also exist in the scan list. Then updates the tag value lists in the current pipeline editor.
- Parameters:
selected_tag – (str) The tag whose values should be retrieved and updated.