33 self.setObjectName("MicroPythonPage") |
33 self.setObjectName("MicroPythonPage") |
34 |
34 |
35 self.colorSchemeComboBox.addItems(sorted(AnsiColorSchemes.keys())) |
35 self.colorSchemeComboBox.addItems(sorted(AnsiColorSchemes.keys())) |
36 |
36 |
37 # set initial values |
37 # set initial values |
|
38 self.timeoutSpinBox.setValue( |
|
39 Preferences.getMicroPython("SerialTimeout") / 1000) |
|
40 # converted to seconds |
38 self.colorSchemeComboBox.setCurrentIndex( |
41 self.colorSchemeComboBox.setCurrentIndex( |
39 self.colorSchemeComboBox.findText( |
42 self.colorSchemeComboBox.findText( |
40 Preferences.getMicroPython("ColorScheme"))) |
43 Preferences.getMicroPython("ColorScheme"))) |
41 self.timeoutSpinBox.setValue( |
44 self.replWrapCheckBox.setChecked( |
42 Preferences.getMicroPython("SerialTimeout") / 1000) |
45 Preferences.getMicroPython("ReplLineWrap")) |
43 # converted to seconds |
|
44 |
46 |
45 def save(self): |
47 def save(self): |
46 """ |
48 """ |
47 Public slot to save the MicroPython configuration. |
49 Public slot to save the MicroPython configuration. |
48 """ |
50 """ |
49 Preferences.setMicroPython( |
51 Preferences.setMicroPython( |
|
52 "SerialTimeout", self.timeoutSpinBox.value() * 1000) |
|
53 # converted to milliseconds |
|
54 Preferences.setMicroPython( |
50 "ColorScheme", self.colorSchemeComboBox.currentText()) |
55 "ColorScheme", self.colorSchemeComboBox.currentText()) |
51 Preferences.setMicroPython( |
56 Preferences.setMicroPython( |
52 "SerialTimeout", self.timeoutSpinBox.value() * 1000) |
57 "ReplLineWrap", self.replWrapCheckBox.isChecked()) |
53 # converted to milliseconds |
|
54 |
58 |
55 |
59 |
56 def create(dlg): |
60 def create(dlg): |
57 """ |
61 """ |
58 Module function to create the configuration page. |
62 Module function to create the configuration page. |