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

Method __init__

pyxrf/gui_module/main_window.py:43–84  ·  view source on GitHub ↗

Parameters ---------- gpc: object reference to a class that holds references to processing classes.

(self, *, gpc)

Source from the content-addressed store, hash-verified

41 signal_fitting_parameters_changed = Signal()
42
43 def __init__(self, *, gpc):
44 """
45 Parameters
46 ----------
47 gpc: object
48 reference to a class that holds references to processing classes.
49 """
50 super().__init__()
51
52 self._cursor_set = False # Indicates if temporary 'wait' cursor is set
53
54 self.gpc = gpc
55 self.gui_vars = global_gui_variables
56 self.gui_vars["ref_main_window"] = self
57
58 self.gpc.initialize()
59
60 self.wnd_manage_emission_lines = WndManageEmissionLines(gpc=self.gpc, gui_vars=self.gui_vars)
61 self.wnd_compute_roi_maps = WndComputeRoiMaps(gpc=self.gpc, gui_vars=self.gui_vars)
62 self.wnd_image_wizard = WndImageWizard(gpc=self.gpc, gui_vars=self.gui_vars)
63 self.wnd_load_quantitative_calibration = WndLoadQuantitativeCalibration(
64 gpc=self.gpc, gui_vars=self.gui_vars
65 )
66 self.wnd_general_fitting_settings = WndGeneralFittingSettings(gpc=self.gpc, gui_vars=self.gui_vars)
67 self.wnd_fitting_parameters_shared = WndDetailedFittingParamsShared(gpc=self.gpc, gui_vars=self.gui_vars)
68 self.wnd_fitting_parameters_lines = WndDetailedFittingParamsLines(gpc=self.gpc, gui_vars=self.gui_vars)
69
70 # Indicates that the window was closed (used mostly for testing)
71 self._is_closed = False
72
73 global_gui_variables["gui_state"]["databroker_available"] = self.gpc.is_databroker_available()
74
75 self.initialize()
76
77 self.central_widget.left_panel.load_data_widget.update_main_window_title.connect(self.update_window_title)
78
79 # Set the callback for update forms with fitting parameters
80 def update_fitting_parameter_forms():
81 self.signal_fitting_parameters_changed.emit()
82
83 gpc.add_parameters_changed_cb(update_fitting_parameter_forms)
84 gpc.param_model.parameters_changed()
85
86 def initialize(self):
87 self.resize(_main_window_geometry["initial_width"], _main_window_geometry["initial_height"])

Callers 1

__init__Method · 0.45

Tested by

no test coverage detected