MCPcopy Create free account
hub / github.com/NSLS2/PyXRF / update_widget_state

Method update_widget_state

pyxrf/gui_module/main_window.py:428–453  ·  view source on GitHub ↗
(self, condition=None)

Source from the content-addressed store, hash-verified

426 @Slot()
427 @Slot(str)
428 def update_widget_state(self, condition=None):
429 # Update the state of the menu bar
430 state = not self.gui_vars["gui_state"]["running_computations"]
431 self.menuBar().setEnabled(state)
432
433 state_computations = self.gui_vars["gui_state"]["running_computations"]
434 if state_computations:
435 if not self._cursor_set:
436 QGuiApplication.setOverrideCursor(QCursor(Qt.WaitCursor))
437 self._cursor_set = True
438 else:
439 if self._cursor_set:
440 QGuiApplication.restoreOverrideCursor()
441 self._cursor_set = False
442
443 # Forward to children
444 self.central_widget.update_widget_state(condition)
445
446 # Forward the updates to open windows
447 self.wnd_manage_emission_lines.update_widget_state(condition)
448 self.wnd_compute_roi_maps.update_widget_state(condition)
449 self.wnd_image_wizard.update_widget_state(condition)
450 self.wnd_load_quantitative_calibration.update_widget_state(condition)
451 self.wnd_general_fitting_settings.update_widget_state(condition)
452 self.wnd_fitting_parameters_shared.update_widget_state(condition)
453 self.wnd_fitting_parameters_lines.update_widget_state(condition)
454
455 def closeEvent(self, event):
456 mb_close = QMessageBox(

Calls

no outgoing calls

Tested by

no test coverage detected