← Back to widgets
DataSelectionPanel¶
Source: Distributed_Design_Optimizer/postprocess/widgets/DataSelectionPanel.py
Data selection panel for file loading, tree browsing, and item selection.
Classes¶
_GripSplitterHandle¶
Inherits from:
QSplitterHandleSplitter handle that paints small grip dots and a directional arrow.
Methods¶
paintEvent(self, event) → None
Paint grip dots and directional arrow on the handle.
Args:
event: The paint event triggered by Qt.
_GripSplitter¶
Inherits from:
QSplitterQSplitter that uses grip-dot handles.
Methods¶
createHandle(self) → QSplitterHandle
Create a custom grip-dot splitter handle.
Returns:
A new grip-dot styled splitter handle.
DataSelectionPanel¶
Inherits from:
QWidgetLeft panel: file loading, tree browsing, item selection.
Methods¶
init(self, parent: QWidget | None) → None
Initialize the data selection panel.
Args:
parent: Optional parent widget.
set_data_handler(self, handler) → None
Set the DataHandler reference for plottability checks.
Args:
handler: The DataHandler instance used for plottability filtering.
showEvent(self, event) → None
Handle the widget show event.
Args:
event: The show event triggered by Qt.
load_files(self) → None
Open a file dialog and emit paths.
populate_tree(self, entry_id: str, tree_structure: dict) → None
Add or update an entry's tree structure in the tree view.
Args:
entry_id: Unique identifier for the data entry.
tree_structure: Nested dict representing the hierarchical data structure.
clear_tree(self) → None
Remove all entries from the tree and selection list.
move_selected_keys(self) → None
Move selected tree items to the list widget.
remove_selected_keys(self) → None
Remove selected items from the list widget.
get_selected_item_paths(self) → list[str]
Return currently highlighted items in the list widget.
Returns:
List of full paths for items currently selected in the list.
get_all_item_paths(self) → list[str]
Return all items in the list widget.
Returns:
List of full paths for all items in the list.
undo(self) → None
Restore the list widget to its previous state.