(self)
| 5 | |
| 6 | class DialogPlotEscapePeak(QDialog): |
| 7 | def __init__(self): |
| 8 | super().__init__() |
| 9 | |
| 10 | self.setWindowTitle("Escape Peak Settings") |
| 11 | |
| 12 | self.grp_show_escape_peak = QGroupBox("Show Escape Peak") |
| 13 | self.grp_show_escape_peak.setCheckable(True) |
| 14 | self.grp_show_escape_peak.setChecked(False) # Set based on data !!! |
| 15 | |
| 16 | self.le_incident_energy = LineEditReadOnly() |
| 17 | set_tooltip( |
| 18 | self.le_incident_energy, |
| 19 | "<b>Incident energy</b>. Use <b>General...</b> button of <b>Model</b> tab " |
| 20 | "to change the value if needed.", |
| 21 | ) |
| 22 | self.combo_detector_type = QComboBox() |
| 23 | set_tooltip(self.combo_detector_type, "Select <b>detector</b> material. The typical choice is <b>Si</b>") |
| 24 | |
| 25 | self._detector_types = ["Si", "Ge"] |
| 26 | self.combo_detector_type.addItems(self._detector_types) |
| 27 | |
| 28 | grid = QGridLayout() |
| 29 | grid.addWidget(QLabel("Incident energy, kev:"), 0, 0) |
| 30 | grid.addWidget(self.le_incident_energy, 0, 1) |
| 31 | grid.addWidget(QLabel("Detectory type:"), 1, 0) |
| 32 | grid.addWidget(self.combo_detector_type, 1, 1) |
| 33 | self.grp_show_escape_peak.setLayout(grid) |
| 34 | |
| 35 | # Yes/No button box |
| 36 | button_box = QDialogButtonBox(QDialogButtonBox.Ok | QDialogButtonBox.Cancel) |
| 37 | button_box.accepted.connect(self.accept) |
| 38 | button_box.rejected.connect(self.reject) |
| 39 | |
| 40 | vbox = QVBoxLayout() |
| 41 | vbox.addWidget(self.grp_show_escape_peak) |
| 42 | vbox.addWidget(button_box) |
| 43 | self.setLayout(vbox) |
| 44 | |
| 45 | def set_parameters(self, plot_escape_peak, incident_energy, detector_material): |
| 46 | index_material = -1 |
nothing calls this directly
no test coverage detected