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

Class WndImageWizard

pyxrf/gui_module/wnd_image_wizard.py:23–333  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21
22
23class WndImageWizard(SecondaryWindow):
24 signal_redraw_maps = Signal()
25
26 def __init__(self, *, gpc, gui_vars):
27 super().__init__()
28
29 # The variable enables/disables plot updates. Setting it False prevents
30 # plot updates while updating the table or Select/Deselect All operation
31 self._enable_plot_updates = False
32 self._changes_exist = False
33
34 # Global processing classes
35 self.gpc = gpc
36 # Global GUI variables (used for control of GUI state)
37 self.gui_vars = gui_vars
38
39 self.initialize()
40
41 def initialize(self):
42 self.setWindowTitle("PyXRF: Image Wizard")
43
44 self.setMinimumHeight(400)
45 self.setMinimumWidth(500)
46 self.resize(600, 600)
47
48 self.cb_select_all = QCheckBox("All")
49 self.cb_select_all.stateChanged.connect(self.cb_select_all_state_changed)
50
51 self.pb_add_elements = QPushButton("Add All Elements")
52 self.pb_add_elements.clicked.connect(self.pb_add_elements_clicked)
53
54 self._auto_update = True
55 self.cb_auto_update = QCheckBox("Auto")
56 self.cb_auto_update.setCheckState(Qt.Checked if self._auto_update else Qt.Unchecked)
57 self.cb_auto_update.stateChanged.connect(self.cb_auto_update_state_changed)
58
59 self.pb_update_plots = QPushButton("Update Plots")
60 self.pb_update_plots.setEnabled(not self._auto_update)
61 self.pb_update_plots.clicked.connect(self.pb_update_plots_clicked)
62
63 self._setup_table()
64
65 vbox = QVBoxLayout()
66
67 hbox = QHBoxLayout()
68 hbox.addWidget(self.cb_select_all)
69 hbox.addWidget(self.pb_add_elements)
70 hbox.addStretch(1)
71 hbox.addWidget(self.cb_auto_update)
72 hbox.addWidget(self.pb_update_plots)
73 vbox.addLayout(hbox)
74
75 hbox = QHBoxLayout()
76 hbox.addWidget(self.table)
77 vbox.addLayout(hbox)
78
79 self.setLayout(vbox)
80

Callers 2

test_WndImageWizard_1Function · 0.90
__init__Method · 0.85

Calls

no outgoing calls

Tested by 1

test_WndImageWizard_1Function · 0.72