gui_layout module

Functions for GUI layout building.

These functions build the layout of the GUI. It controls what elements are available and where they are placed in the GUI. Styling controls the overall look and feel of the elements within this space.

AUTHOR: Timothy Cote, ANL, Fall 2019.

gui_layout.element_keys() → Dict[str, List[str]][source]

Keep track and return the element keys that need bindings to them in the GUI

gui_layout.file_choice_ly(tfs: str) → List[List[Any]][source]

Creates the file choice window for saving reconstructed windows.

Parameters:tfs – The type of through focal series (Single or Unflip/FLip)
Returns:The layout for the file choice window.
Return type:window
gui_layout.home_tab(style: gui_styling.WindowStyle, DEFAULTS: Dict[KT, VT]) → <sphinx.ext.autodoc.importer._MockObject object at 0x7f37cfe55ad0>[source]

The home tab layout.

Parameters:
  • style – The class that holds all style data for the window. Look at gui_styling.py for more info.
  • DEFAULTS – The default values for certain style elements such as font
Returns:

The layout for the hometab.

Return type:

tab

gui_layout.menu_bar() → <sphinx.ext.autodoc.importer._MockObject object at 0x7f37cfe55950>[source]

Return the menu bar layout.

gui_layout.output_ly() → <sphinx.ext.autodoc.importer._MockObject object at 0x7f37cfe55990>[source]

Creates the output log layout.

Returns:The PySimpleGUI window element of the output window.
Return type:window
gui_layout.reconstruct_tab(style: gui_styling.WindowStyle, DEFAULTS: Dict[KT, VT]) → <sphinx.ext.autodoc.importer._MockObject object at 0x7f37cfe55ad0>[source]

The reconstruction tab layout.

Parameters:
  • style – The class that holds all style data for the window. Look at gui_styling.py for more info.
  • DEFAULTS – The default values for certain style elements such as font.
Returns:

The layout for the reconstruction tab.

Return type:

tab

gui_layout.save_window_ly(event: str, image_dir: str, orientations: Union[List[str], str, None], tfs: Optional[str] = None, tie_prefix: str = 'Example') → List[List[Any]][source]

Initializes save window.

Parameters:
  • event – The event key that was passed to the save window.
  • image_dir – The image parent directory/current working directory.
  • orientations – List of the strings of the unflip or flip or tfs orientations. Otherwise may be the prefix for REC or None.
  • tfs – The string of the tfs selected value.
  • tie_prefix – The prefix label for the name of the images to be saved from the reconstruction.
Returns:

The layout for the save window. im_type: The image file type. file_paths: List of the file paths. orientations: List of strings of the orientations or image names. inputs: The keys of the inputs.

Return type:

layout

gui_layout.window_ly(background_color: str, DEFAULTS: Dict[KT, VT]) → <sphinx.ext.autodoc.importer._MockObject object at 0x7f37cfe55990>[source]

The full window layout.

Parameters:
  • background_color – The background color for the window.
  • DEFAULTS – The default values for certain style elements such as font.
Returns:

The window element of the window.

Return type:

window