Builder classes#
Builder classes manage the creation of widgets and layout for the respective frames.
The builders sub-package includes build configs and builders for all GUI frame classes.
The builders to create and arrange the widgets have been separated simply for improved code organisation. They will create the user interface “shells” without any connections and functionality.
- class pydidas.gui.frames.builders.CompositeCreatorFrameBuilder#
Create the layout and add all widgets required for the CompositeCreatorFrame.
- class pydidas.gui.frames.builders.ImageMathFrameBuilder#
Create all widgets and initialize their state.
- Parameters:
self (pydidas.gui.ImageMathFrame) – The ImageMathFrame instance.
- classmethod create_combo_button_row(reference: str, label_text: str, combo_choices: list, button_text: str, button_icon: None | str = None)#
Create a combined widget with label, combobox and a button.
- Parameters:
reference (str) – The widget reference
label_text (str) – The text for the label.
combo_choices (list) – The choices to be displayed in the QComboBox.
button_text (str) – The button text.
button_icon (Union[None, str]) – The button icon.
- class pydidas.gui.frames.builders.UtilitiesFrameBuilder#
Create all widgets and initialize their state.
- Parameters:
self (pydidas.gui.DefineScanFrame) – The DefineScanFrame instance.
- class pydidas.gui.frames.builders.WorkflowEditFrameBuilder#
Builder for the WorkflowEditFrame.
- pydidas.gui.frames.builders.column_width_factor(two_columns: bool) int#
Get the width factor based on the number of visible columns.
- Parameters:
dim_columns (int) – The number of columns
- Returns:
The resulting total width factor for font metrics.
- Return type:
float
- pydidas.gui.frames.builders.create_splitter(filesystem_browser: QWidget, data_viewer: QWidget, frame_width: int) QSplitter#
Create a splitter widget for the frame.
- Parameters:
filesystem_browser (QtWidgets.QWidget) – The filesystem browser widget.
data_viewer (QtWidgets.QWidget) – The data viewer widget.
frame_width (int) – The width of the frame.
- Returns:
The splitter widget.
- Return type:
QtWidgets.QSplitter
- pydidas.gui.frames.builders.get_WorkflowTestFrame_build_config(frame: BaseFrame) list[list[str, tuple[str], dict]]#
Return the build configuration for the WorkflowTestFrame.
- Parameters:
frame (BaseFrame) – The WorkflowTestFrame instance.
- Returns:
The build configuration in form of a list. Each list entry consists of the widget creation method name, the method arguments and the method
- Return type:
list[list[str, tuple[str], dict]]
- pydidas.gui.frames.builders.scan_frame_build_config() list[list[str, tuple, dict[str, Any]]]#
Get the configuration to build the DefineScanFrame.
- Returns:
The configuration for the frame.
- Return type:
list[list[str, tuple, dict[str, Any]]]