Builder classes#

Builder classes manage the creation of widgets and layout for the respective frames.

The gui.frames.builders sub-package includes 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.

classmethod build_frame(frame: BaseFrame)#

Create and initialize all widgets for the CompositeCreatorFrame.

Parameters:

frame (BaseFrame) – The BaseFrame instance in which the widgets shall be added.

class pydidas.gui.frames.builders.DataBrowsingFrameBuilder#

Class to populate the DataBrowsingFrame with widgets.

classmethod build_frame(frame: BaseFrame)#

Build the frame and create all required widgets.

class pydidas.gui.frames.builders.DefineDiffractionExpFrameBuilder#

Class to populate the DefineDiffractionExpFrame with widgets.

classmethod build_frame(frame: BaseFrame)#

Populate the input frame with the required widgets.

Parameters:

frame (BaseFrame) – The DefineDiffractionExpFrame instance.

classmethod create_detector_header()#

Create header items (label / buttons) for the detector.

classmethod create_geometry_header()#

Create header items (label / buttons) for the detector.

class pydidas.gui.frames.builders.DefineScanFrameBuilder#

Create all widgets and initialize their state.

classmethod build_frame(frame: BaseFrame)#

Create all widgets for the frame and place them in the layout.

Parameters:

frame (BaseFrame) – The DefineScanFrame instance.

classmethod 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

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.

classmethod populate_frame(frame: BaseFrame)#

Build the frame by creating all required widgets and placing them in the layout.

Parameters:

frame (BaseFrame) – The frame instance.

class pydidas.gui.frames.builders.QuickIntegrationFrameBuilder#

The QuickIntegrationFrameBuilder can be used to populate the QuickIntegrationFrame with widgets.

classmethod populate_frame(frame)#

Populate the given frame with widgets.

Note: This method is reliant upon passing the correct type of frame.

Parameters:

frame (pydidas.gui.frames.QuickIntegrationFrame) – The frame to be populated.

class pydidas.gui.frames.builders.UtilitiesFrameBuilder#

Create all widgets and initialize their state.

Parameters:

self (pydidas.gui.DefineScanFrame) – The DefineScanFrame instance.

classmethod build_frame(frame: BaseFrame)#

Create all widgets for the frame and place them in the layout.

Parameters:

frame (BaseFrame) – The frame to be populated.

class pydidas.gui.frames.builders.WorkflowEditFrameBuilder#

Builder for the WorkflowEditFrame.

classmethod populate_frame(frame: BaseFrame)#

Build the frame by creating all required widgets and placing them in the layout.

Parameters:

frame (BaseFrame) – The frame instance.

class pydidas.gui.frames.builders.WorkflowRunFrameBuilder#

Builder class to build the WorkflowRunFrame.

classmethod build_frame(frame: BaseFrameWithApp)#

Build the frame and create all widgets.

Parameters:

frame (BaseFrameWithApp) – The WorkflowRunFrame instance.

class pydidas.gui.frames.builders.WorkflowTestFrameBuilder#

Class to populate the WorkflowTestFrame with widgets.

classmethod build_frame(frame: BaseFrame)#

Build the frame and create all widgets.

Parameters:

frame (BaseFrame) – The WorkflowTestFrame instance.