in scripts/ui/common.py [0:0]
def switch_ui_elements_for_processing(parent, gb, state):
"""Switches element interaction when processing on the specified tab.
Args:
parent (App(QDialog)): Object corresponding to the parent UI element.
gb (QtWidgets.QGroupBox): Group box for the tab.
state (str): Identifier of the callback state.
"""
# Buttons
parent.update_buttons(gb)
# Switch all other sections, except the file explorer
dlg = parent.dlg
for gbi in dlg.findChildren(QtWidgets.QGroupBox):
if gbi != gb and not gbi.objectName().endswith("_file_explorer"):
gbi.setEnabled(state)
# Switch current group box elements
prefixes = ["cb_", "dd_", "val_", "label_"]
dep_util.switch_objects_prefix(gb, prefixes, state)
# Switch tabs that are not image preview or log
for w in dlg.findChildren(QtWidgets.QWidget):
name = w.objectName()
ignore = name.endswith("_preview") or name.endswith("_log")
if name.startswith("tab_") and not ignore:
w.setEnabled(state)
# Switch other sections
for s in parent.parent.sections:
if s != parent:
dep_util.set_tab_enabled(parent.dlg.w_steps, s.tag, state)