Debian Codegraph @

ResistorDecoder/src/driver_resistance_calc.py

raw symbols SCIP
1 import PySide6.QtCore as Qc
2 import PySide6.QtGui as Qg
3 from PySide6.QtSvgWidgets import QSvgWidget
4 import PySide6.QtWidgets as Qw
5
6 import ResistorDecoder.src.helpers as gh
7 from ResistorDecoder.src import smd_code_parser as smd_parse
8 from ResistorDecoder.src.ui_generated_files.ui_resistance_calc import Ui_MainWindow
9 from ResistorDecoder.src.driver_license import LicenseAgreement
10
11
12
13 class ResistanceCalc(Qw.QMainWindow, Ui_MainWindow):
14 """Wrapper to handle interactions on the Unit Manager level."""
15
16
17 def __init__(self):
18 Qw.QMainWindow.__init__(self)
19 self.setupUi(self)
20
21 icon = Qg.QIcon()
22 icon.addFile(":/general/resistor_icon.svg", Qc.QSize(), Qg.QIcon.Normal, Qg.QIcon.Off)
23 self.setWindowIcon(icon)
24 self.setWindowTitle("Resistor Decoder")
25
26
27 # For the license window
28 self.license_window = None
29
30 self.populate_combo_boxes()
31
32 # Set the default tolerance to the most common band, gold
33 self.comboBox_t_4b.setCurrentIndex(2)
34 self.comboBox_t_5b.setCurrentIndex(1)
35 self.comboBox_t_6b.setCurrentIndex(1)
36 # Set the default multiplier to 1
37 self.comboBox_m_4b.setCurrentIndex(3)
38 self.comboBox_m_5b.setCurrentIndex(3)
39 self.comboBox_m_6b.setCurrentIndex(3)
40
41 # Initialize SVG widgets
42 self.svg_widget_4b = QSvgWidget(self.tab_4b)
43 self.horizontalLayout_4b_svg.insertWidget(1, self.svg_widget_4b)
44 self.svg_widget_4b.renderer().setAspectRatioMode(Qc.Qt.KeepAspectRatio)
45 self.svg_widget_4b.setFixedSize(Qc.QSize(445, 100))
46
47 self.svg_widget_5b = QSvgWidget(self.tab_5b)
48 self.horizontalLayout_5b_svg.insertWidget(1, self.svg_widget_5b)
49 self.svg_widget_5b.renderer().setAspectRatioMode(Qc.Qt.KeepAspectRatio)
50 self.svg_widget_5b.setFixedSize(Qc.QSize(445, 100))
51
52 self.svg_widget_6b = QSvgWidget(self.tab_6b)
53 self.horizontalLayout_6b_svg.insertWidget(1, self.svg_widget_6b)
54 self.svg_widget_6b.renderer().setAspectRatioMode(Qc.Qt.KeepAspectRatio)
55 self.svg_widget_6b.setFixedSize(Qc.QSize(445, 100))
56
57 self.svg_widget_smd = QSvgWidget(self.tab_smd)
58 self.horizontalLayout_smd_svg.insertWidget(1, self.svg_widget_smd)
59 self.svg_widget_smd.renderer().setAspectRatioMode(Qc.Qt.KeepAspectRatio)
60 self.svg_widget_smd.setFixedSize(Qc.QSize(300, 126))
61 # Add the lineEdit over the smd preview
62 self.smd_line_edit = Qw.QLineEdit(self.svg_widget_smd)
63 self.smd_line_edit.setFixedSize(Qc.QSize(300, 126))
64 self.smd_line_edit.setFrame(False)
65 self.smd_line_edit.setAlignment(Qg.Qt.AlignHCenter)
66 # Set a simple default smd code
67 self.smd_line_edit.setText("102")
68 # Set magic font size appropriate for the hard-coded size
69 smd_font = Qg.QFont()
70 smd_font.setPointSize(44)
71 self.smd_line_edit.setFont(smd_font)
72 self.smd_line_edit.setMaxLength(4)
73 self.smd_line_edit.setStyleSheet("background: transparent; color: white")
74 # Hide the warning and notice for smd values
75 self.label_code_invalid_icon.hide()
76 self.label_code_invalid_label.hide()
77 self.label_tolerance_notice.hide()
78
79 # Connect license button slot
80 self.pushButton_license.clicked.connect(self.open_license)
81 # Connect slots to update the output
82 self.comboBox_1d_4b.currentIndexChanged.connect(self.calculate_res_4b)
83 self.comboBox_2d_4b.currentIndexChanged.connect(self.calculate_res_4b)
84 self.comboBox_m_4b.currentIndexChanged.connect(self.calculate_res_4b)
85 self.comboBox_t_4b.currentIndexChanged.connect(self.calculate_res_4b)
86
87 self.comboBox_1d_5b.currentIndexChanged.connect(self.calculate_res_5b)
88 self.comboBox_2d_5b.currentIndexChanged.connect(self.calculate_res_5b)
89 self.comboBox_3d_5b.currentIndexChanged.connect(self.calculate_res_5b)
90 self.comboBox_m_5b.currentIndexChanged.connect(self.calculate_res_5b)
91 self.comboBox_t_5b.currentIndexChanged.connect(self.calculate_res_5b)
92
93 self.comboBox_1d_6b.currentIndexChanged.connect(self.calculate_res_6b)
94 self.comboBox_2d_6b.currentIndexChanged.connect(self.calculate_res_6b)
95 self.comboBox_3d_6b.currentIndexChanged.connect(self.calculate_res_6b)
96 self.comboBox_m_6b.currentIndexChanged.connect(self.calculate_res_6b)
97 self.comboBox_t_6b.currentIndexChanged.connect(self.calculate_res_6b)
98 self.comboBox_tcr_6b.currentIndexChanged.connect(self.calculate_res_6b)
99
100 self.radioButton_line_none.clicked.connect(self.calculate_res_smd)
101 self.radioButton_line_top.clicked.connect(self.calculate_res_smd)
102 self.radioButton_line_under_short.clicked.connect(self.calculate_res_smd)
103 self.radioButton_line_under_long.clicked.connect(self.calculate_res_smd)
104 self.smd_line_edit.textEdited.connect(self.calculate_res_smd)
105
106 self.color_lookup = [b"#000000", # Colors as specified by the IEC.
107 b"#800000",
108 b"#FF0000",
109 b"#FF9900",
110 b"#FFFF00",
111 b"#00B050",
112 b"#0070C0",
113 b"#9900FF",
114 b"#A6A6A6",
115 b"#FFFFFF",
116 b"#FFD100",
117 b"#DDDDDD",
118 b"#FFDDFF"
119 ]
120
121 # Could be improved with a helper function
122 file = Qc.QFile(":general/resistor_4b.svg")
123 if not file.open(Qc.QIODevice.ReadOnly):
124 print("Error: Unable to read resistor_4b.svg")
125 self.svg_data_4b = bytes(file.read(40000))
126
127 file = Qc.QFile(":general/resistor_5b.svg")
128 if not file.open(Qc.QIODevice.ReadOnly):
129 print("Error: Unable to read resistor_5b.svg")
130 self.svg_data_5b = bytes(file.read(40000))
131
132 file = Qc.QFile(":general/resistor_6b.svg")
133 if not file.open(Qc.QIODevice.ReadOnly):
134 print("Error: Unable to read resistor_6b.svg")
135 self.svg_data_6b = bytes(file.read(40000))
136
137 file = Qc.QFile(":general/resistor_smd.svg")
138 if not file.open(Qc.QIODevice.ReadOnly):
139 print("Error: Unable to read resistor_smd.svg")
140 self.svg_data_smd = bytes(file.read(40000))
141
142 self.change_band_colors_4b()
143
144 # Fill initial state in outputs
145 self.calculate_res_4b()
146 self.calculate_res_5b()
147 self.calculate_res_6b()
148 self.calculate_res_smd()
149
150
151 def change_band_colors_4b(self):
152 idx1 = self.comboBox_1d_4b.currentIndex() + 1 # Black not available, skipping 0 index
153 idx2 = self.comboBox_2d_4b.currentIndex()
154 idm = self.comboBox_m_4b.currentIndex()
155 idt = self.comboBox_t_4b.currentIndex() + 1 # Black not available, skipping 0 index
156 # Shift values down by 3 unless reaching the end. The last 3 colors were moved to the front.
157 idt -= 3
158 if idt <= 0:
159 idt = 10 - idt
160 # Correct coloring order for the multiplier band
161 idm -= 3
162 if idm < 0:
163 idm = 9 - idm
164 # Hot patch SVG file
165 current_data = self.svg_data_4b.replace(b"#400001", self.color_lookup[idx1]) \
166 .replace(b"#400002", self.color_lookup[idx2]) \
167 .replace(b"#400003", self.color_lookup[idm])
168
169 if idt == 12: # Make 4th band invisible if blank selected, otherwise apply color transform.
170 current_data = current_data.replace(b"opacity:1;mix-blend-mode:normal;vector-effect:none;fill:#400004;",
171 b"opacity:0;mix-blend-mode:normal;vector-effect:none;fill:#400004;")
172 else:
173 current_data = current_data.replace(b"#400004", self.color_lookup[idt])
174 # Update SVG
175 self.svg_widget_4b.load(Qc.QByteArray(current_data))
176 # change_band_colors_4b
177
178
179 def change_band_colors_5b(self):
180 idx1 = self.comboBox_1d_5b.currentIndex() + 1 # Black not available, skipping 0 index
181 idx2 = self.comboBox_2d_5b.currentIndex()
182 idx3 = self.comboBox_3d_5b.currentIndex()
183 idm = self.comboBox_m_5b.currentIndex()
184 idt = self.comboBox_t_5b.currentIndex() + 1 # Black not available, skipping 0 index
185 # Shift values down by 3 unless reaching the end. The last 3 colors were moved to the front.
186 idt -= 2
187 if idt <= 0:
188 idt = 10 - idt
189 # Correct coloring order for the multiplier band
190 idm -= 3
191 if idm < 0:
192 idm = 9 - idm
193 # Hot patch SVG file
194 current_data = self.svg_data_5b.replace(b"#500001", self.color_lookup[idx1]) \
195 .replace(b"#500002", self.color_lookup[idx2]) \
196 .replace(b"#500003", self.color_lookup[idx3]) \
197 .replace(b"#500004", self.color_lookup[idm]) \
198 .replace(b"#500005", self.color_lookup[idt])
199 # Update SVG
200 self.svg_widget_5b.load(Qc.QByteArray(current_data))
201 # change_band_colors_5b
202
203
204 def change_band_colors_6b(self):
205 idx1 = self.comboBox_1d_6b.currentIndex() + 1 # Black not available, skipping 0 index
206 idx2 = self.comboBox_2d_6b.currentIndex()
207 idx3 = self.comboBox_3d_6b.currentIndex()
208 idm = self.comboBox_m_6b.currentIndex()
209 idt = self.comboBox_t_6b.currentIndex() + 1 # Black not available, skipping 0 index
210 idc = self.comboBox_tcr_6b.currentIndex()
211 # Shift values down by 3 unless reaching the end. The last 3 colors were moved to the front.
212 idt -= 2
213 if idt <= 0:
214 idt = 10 - idt
215 # Correct coloring order for the multiplier band
216 idm -= 3
217 if idm < 0:
218 idm = 9 - idm
219 # Hot patch SVG file
220 current_data = self.svg_data_6b.replace(b"#600001", self.color_lookup[idx1]) \
221 .replace(b"#600002", self.color_lookup[idx2]) \
222 .replace(b"#600003", self.color_lookup[idx3]) \
223 .replace(b"#600004", self.color_lookup[idm]) \
224 .replace(b"#600005", self.color_lookup[idt]) \
225 .replace(b"#600006", self.color_lookup[idc])
226 # Update SVG
227 self.svg_widget_6b.load(Qc.QByteArray(current_data))
228 # change_band_colors_6b
229
230
231 def change_band_colors_smd(self):
232 line_under_short = self.radioButton_line_under_short.isChecked()
233 line_under_long = self.radioButton_line_under_long.isChecked()
234 line_top = self.radioButton_line_top.isChecked()
235
236
237 def color_assignment(show):
238 if show:
239 return b"#FFFFFF"
240 else:
241 return b"#000000"
242
243
244 def opacity_assignment(show):
245 # Used to make the long bar transparent or opaque, since it overlaps the short bar.
246 if show:
247 return b"stroke-opacity:1"
248 else:
249 return b"stroke-opacity:0"
250
251
252 # Hot patch SVG file by replacing these placeholder colors.
253 current_data = self.svg_data_smd.replace(b"#996601", color_assignment(line_under_short)) \
254 .replace(b"#996602", color_assignment(line_under_long)) \
255 .replace(b"#996603", color_assignment(line_top)) \
256 .replace(b"stroke-opacity:0.28", opacity_assignment(line_under_long))
257 # Update SVG
258 self.svg_widget_smd.load(Qc.QByteArray(current_data))
259 # change_band_colors_smd
260
261
262 def calculate_res_4b(self):
263 self.change_band_colors_4b() # Update svg
264 digit1 = self.comboBox_1d_4b.currentText()
265 digit2 = self.comboBox_2d_4b.currentText()
266 multiplier = self.comboBox_m_4b.currentIndex() - 3 # scale starts at milli ohm
267 tolerance = self.comboBox_t_4b.currentText()
268 mantissa = int(digit1 + digit2)
269
270 value, min_value, max_value = gh.calculate_values(tolerance, mantissa, multiplier)
271
272 self.lineEdit_resistance_4b.setText(f"{gh.format_resistance(value, 3)} ±{tolerance}")
273 self.lineEdit_resistance_min_4b.setText(gh.format_resistance(min_value, 5))
274 self.lineEdit_resistance_max_4b.setText(gh.format_resistance(max_value, 5))
275
276 return value, min_value, max_value
277 # calculate_res_4b
278
279
280 def calculate_res_5b(self):
281 self.change_band_colors_5b() # Update svg
282 digit1 = self.comboBox_1d_5b.currentText()
283 digit2 = self.comboBox_2d_5b.currentText()
284 digit3 = self.comboBox_3d_5b.currentText()
285 multiplier = self.comboBox_m_5b.currentIndex() - 3 # scale starts at milli ohm
286 tolerance = self.comboBox_t_5b.currentText()
287 mantissa = int(digit1 + digit2 + digit3)
288
289 value, min_value, max_value = gh.calculate_values(tolerance, mantissa, multiplier)
290
291 self.lineEdit_resistance_5b.setText(f"{gh.format_resistance(value, 3)} ±{tolerance}")
292 self.lineEdit_resistance_min_5b.setText(gh.format_resistance(min_value, 5))
293 self.lineEdit_resistance_max_5b.setText(gh.format_resistance(max_value, 5))
294
295 return value, min_value, max_value
296 # calculate_res_5b
297
298
299 def calculate_res_6b(self):
300 self.change_band_colors_6b() # Update svg
301 digit1 = self.comboBox_1d_6b.currentText()
302 digit2 = self.comboBox_2d_6b.currentText()
303 digit3 = self.comboBox_3d_6b.currentText()
304 multiplier = self.comboBox_m_6b.currentIndex() - 3 # scale starts at milli ohm
305 tolerance = self.comboBox_t_6b.currentText()
306 tcr = self.comboBox_tcr_6b.currentText()
307 mantissa = int(digit1 + digit2 + digit3)
308
309 value, min_value, max_value = gh.calculate_values(tolerance, mantissa, multiplier)
310
311 self.lineEdit_resistance_6b.setText(f"{gh.format_resistance(value, 3)} ±{tolerance}")
312 self.lineEdit_resistance_min_6b.setText(gh.format_resistance(min_value, 5))
313 self.lineEdit_resistance_max_6b.setText(gh.format_resistance(max_value, 5))
314 self.lineEdit_tcr_6b.setText(tcr + " ppm/°C")
315
316 return value, min_value, max_value, int(tcr[1:])
317 # calculate_res_6b
318
319
320 def calculate_res_smd(self):
321 self.change_band_colors_smd() # Update svg
322 smd_code = self.smd_line_edit.text()
323 line_under_short = self.radioButton_line_under_short.isChecked()
324 line_under_long = self.radioButton_line_under_long.isChecked()
325 # Top Line is irrelevant for the calculation and cosmetic only.
326 # line_top = self.radioButton_line_top.isChecked()
327
328 decoded = smd_parse.parse_code(smd_code, line_under_short, line_under_long)
329
330 if decoded is not None:
331 value, tolerance, is_standard_tolerance = decoded
332
333 min_value = value * (1 - 0.01 * tolerance)
334 max_value = value * (1 + 0.01 * tolerance)
335
336 self.lineEdit_resistance_smd.setText(f"{gh.format_resistance(value, 3)} ±{tolerance}%")
337 self.lineEdit_resistance_min_smd.setText(gh.format_resistance(min_value, 5))
338 self.lineEdit_resistance_max_smd.setText(gh.format_resistance(max_value, 5))
339
340 # Hide notice if standardized
341 self.label_tolerance_notice.setHidden(is_standard_tolerance)
342 # Hide warnings
343 self.label_code_invalid_icon.hide()
344 self.label_code_invalid_label.hide()
345
346 return value, min_value, max_value
347 else:
348 # Invalid code
349 self.lineEdit_resistance_smd.clear()
350 self.lineEdit_resistance_min_smd.clear()
351 self.lineEdit_resistance_max_smd.clear()
352 # Hide notice
353 self.label_tolerance_notice.hide()
354 # Show warnings
355 self.label_code_invalid_icon.show()
356 self.label_code_invalid_label.show()
357
358 return None, None, None
359 # calculate_res_smd
360
361
362 def populate_combo_boxes(self):
363 icons = dict()
364 icons["black"] = Qg.QIcon()
365 icons["black"].addFile(":/colors/Color Squares/black.png", Qc.QSize(), Qg.QIcon.Normal, Qg.QIcon.Off)
366 icons["brown"] = Qg.QIcon()
367 icons["brown"].addFile(":/colors/Color Squares/brown.png", Qc.QSize(), Qg.QIcon.Normal, Qg.QIcon.Off)
368 icons["red"] = Qg.QIcon()
369 icons["red"].addFile(":/colors/Color Squares/red.png", Qc.QSize(), Qg.QIcon.Normal, Qg.QIcon.Off)
370 icons["orange"] = Qg.QIcon()
371 icons["orange"].addFile(":/colors/Color Squares/orange.png", Qc.QSize(), Qg.QIcon.Normal, Qg.QIcon.Off)
372 icons["yellow"] = Qg.QIcon()
373 icons["yellow"].addFile(":/colors/Color Squares/yellow.png", Qc.QSize(), Qg.QIcon.Normal, Qg.QIcon.Off)
374 icons["green"] = Qg.QIcon()
375 icons["green"].addFile(":/colors/Color Squares/green.png", Qc.QSize(), Qg.QIcon.Normal, Qg.QIcon.Off)
376 icons["blue"] = Qg.QIcon()
377 icons["blue"].addFile(":/colors/Color Squares/blue.png", Qc.QSize(), Qg.QIcon.Normal, Qg.QIcon.Off)
378 icons["violet"] = Qg.QIcon()
379 icons["violet"].addFile(":/colors/Color Squares/violet.png", Qc.QSize(), Qg.QIcon.Normal, Qg.QIcon.Off)
380 icons["gray"] = Qg.QIcon()
381 icons["gray"].addFile(":/colors/Color Squares/gray.png", Qc.QSize(), Qg.QIcon.Normal, Qg.QIcon.Off)
382 icons["white"] = Qg.QIcon()
383 icons["white"].addFile(":/colors/Color Squares/white.png", Qc.QSize(), Qg.QIcon.Normal, Qg.QIcon.Off)
384 icons["gold"] = Qg.QIcon()
385 icons["gold"].addFile(":/colors/Color Squares/gold.png", Qc.QSize(), Qg.QIcon.Normal, Qg.QIcon.Off)
386 icons["silver"] = Qg.QIcon()
387 icons["silver"].addFile(":/colors/Color Squares/silver.png", Qc.QSize(), Qg.QIcon.Normal, Qg.QIcon.Off)
388 icons["pink"] = Qg.QIcon()
389 icons["pink"].addFile(":/colors/Color Squares/pink.png", Qc.QSize(), Qg.QIcon.Normal, Qg.QIcon.Off)
390 icons["blank"] = Qg.QIcon()
391 icons["blank"].addFile(":/colors/Color Squares/blank.png", Qc.QSize(), Qg.QIcon.Normal, Qg.QIcon.Off)
392
393
394 def attach_digit1(combobox):
395 combobox.addItem(icons["brown"], "1")
396 combobox.addItem(icons["red"], "2")
397 combobox.addItem(icons["orange"], "3")
398 combobox.addItem(icons["yellow"], "4")
399 combobox.addItem(icons["green"], "5")
400 combobox.addItem(icons["blue"], "6")
401 combobox.addItem(icons["violet"], "7")
402 combobox.addItem(icons["gray"], "8")
403 combobox.addItem(icons["white"], "9")
404
405
406 def attach_digit2(combobox):
407 combobox.addItem(icons["black"], "0")
408 combobox.addItem(icons["brown"], "1")
409 combobox.addItem(icons["red"], "2")
410 combobox.addItem(icons["orange"], "3")
411 combobox.addItem(icons["yellow"], "4")
412 combobox.addItem(icons["green"], "5")
413 combobox.addItem(icons["blue"], "6")
414 combobox.addItem(icons["violet"], "7")
415 combobox.addItem(icons["gray"], "8")
416 combobox.addItem(icons["white"], "9")
417
418
419 def attach_digit3(combobox):
420 combobox.addItem(icons["black"], "0")
421 combobox.addItem(icons["brown"], "1")
422 combobox.addItem(icons["red"], "2")
423 combobox.addItem(icons["orange"], "3")
424 combobox.addItem(icons["yellow"], "4")
425 combobox.addItem(icons["green"], "5")
426 combobox.addItem(icons["blue"], "6")
427 combobox.addItem(icons["violet"], "7")
428 combobox.addItem(icons["gray"], "8")
429 combobox.addItem(icons["white"], "9")
430
431
432 def attach_multiplier(combobox):
433 combobox.addItem(icons["pink"], "1 mΩ")
434 combobox.addItem(icons["silver"], "10 mΩ")
435 combobox.addItem(icons["gold"], "100 mΩ")
436 combobox.addItem(icons["black"], "1 Ω")
437 combobox.addItem(icons["brown"], "10 Ω")
438 combobox.addItem(icons["red"], "100 Ω")
439 combobox.addItem(icons["orange"], "1 kΩ")
440 combobox.addItem(icons["yellow"], "10 kΩ")
441 combobox.addItem(icons["green"], "100 kΩ")
442 combobox.addItem(icons["blue"], "1 MΩ")
443 combobox.addItem(icons["violet"], "10 MΩ")
444 combobox.addItem(icons["gray"], "100 MΩ")
445 combobox.addItem(icons["white"], "1 GΩ")
446
447
448 def attach_tolerance(combobox, allow_blank=False):
449 if allow_blank:
450 combobox.addItem(icons["blank"], "20%")
451 combobox.addItem(icons["silver"], "10% Silver")
452 combobox.addItem(icons["gold"], "5% Gold")
453 combobox.addItem(icons["brown"], "1%")
454 combobox.addItem(icons["red"], "2%")
455 combobox.addItem(icons["orange"], "0.05%")
456 combobox.addItem(icons["yellow"], "0.02%")
457 combobox.addItem(icons["green"], "0.5%")
458 combobox.addItem(icons["blue"], "0.25%")
459 combobox.addItem(icons["violet"], "0.1%")
460 combobox.addItem(icons["gray"], "0.01%")
461
462
463 def attach_tcr(combobox):
464 combobox.addItem(icons["black"], "±250")
465 combobox.addItem(icons["brown"], "±100")
466 combobox.addItem(icons["red"], "±50")
467 combobox.addItem(icons["orange"], "±15")
468 combobox.addItem(icons["yellow"], "±25")
469 combobox.addItem(icons["green"], "±20")
470 combobox.addItem(icons["blue"], "±10")
471 combobox.addItem(icons["violet"], "±5")
472 combobox.addItem(icons["gray"], "±1")
473
474
475 # Assign 4 Band
476 attach_digit1(self.comboBox_1d_4b)
477 attach_digit2(self.comboBox_2d_4b)
478 attach_multiplier(self.comboBox_m_4b)
479 attach_tolerance(self.comboBox_t_4b, True) # "True" enables the 20% tolerance band
480 # Assign 5 Band
481 attach_digit1(self.comboBox_1d_5b)
482 attach_digit2(self.comboBox_2d_5b)
483 attach_digit3(self.comboBox_3d_5b)
484 attach_multiplier(self.comboBox_m_5b)
485 attach_tolerance(self.comboBox_t_5b)
486 # Assign 6 Band
487 attach_digit1(self.comboBox_1d_6b)
488 attach_digit2(self.comboBox_2d_6b)
489 attach_digit3(self.comboBox_3d_6b)
490 attach_multiplier(self.comboBox_m_6b)
491 attach_tolerance(self.comboBox_t_6b)
492 attach_tcr(self.comboBox_tcr_6b)
493 # populate_combo_boxes
494
495 def open_license(self):
496 if self.license_window is None:
497 self.license_window = LicenseAgreement()
498 self.license_window.show()