src/eric7/Preferences/ConfigurationPages/MicroPythonPage.py

branch
eric7
changeset 9498
d48061567354
parent 9496
05017f795c24
child 9624
b47dfa7a137d
equal deleted inserted replaced
9497:8beca4047c53 9498:d48061567354
19 from PyQt6.QtCharts import QChart 19 from PyQt6.QtCharts import QChart
20 except ImportError: 20 except ImportError:
21 QChart = None 21 QChart = None
22 22
23 23
24 # TODO: add option to enable/disable manual device selection
25 class MicroPythonPage(ConfigurationPageBase, Ui_MicroPythonPage): 24 class MicroPythonPage(ConfigurationPageBase, Ui_MicroPythonPage):
26 """ 25 """
27 Class implementing the MicroPython configuration page. 26 Class implementing the MicroPython configuration page.
28 """ 27 """
29 28
84 Utilities.toNativeSeparators( 83 Utilities.toNativeSeparators(
85 Preferences.getMicroPython("MpyWorkspace") or Utilities.getHomeDir() 84 Preferences.getMicroPython("MpyWorkspace") or Utilities.getHomeDir()
86 ) 85 )
87 ) 86 )
88 87
88 # devices parameters
89 self.manualSelectionCheckBox.setChecked(
90 Preferences.getMicroPython("EnableManualDeviceSelection")
91 )
92
89 # serial link parameters 93 # serial link parameters
90 self.timeoutSpinBox.setValue( 94 self.timeoutSpinBox.setValue(
91 Preferences.getMicroPython("SerialTimeout") // 1000 95 Preferences.getMicroPython("SerialTimeout") // 1000
92 ) 96 )
93 # converted to seconds 97 # converted to seconds
164 Public slot to save the MicroPython configuration. 168 Public slot to save the MicroPython configuration.
165 """ 169 """
166 # workspace 170 # workspace
167 Preferences.setMicroPython("MpyWorkspace", self.workspacePicker.text()) 171 Preferences.setMicroPython("MpyWorkspace", self.workspacePicker.text())
168 172
173 # devices parameters
174 Preferences.setMicroPython(
175 "EnableManualDeviceSelection", self.manualSelectionCheckBox.isChecked()
176 )
177
169 # serial link parameters 178 # serial link parameters
170 Preferences.setMicroPython("SerialTimeout", self.timeoutSpinBox.value() * 1000) 179 Preferences.setMicroPython("SerialTimeout", self.timeoutSpinBox.value() * 1000)
171 # converted to milliseconds 180 # converted to milliseconds
172 Preferences.setMicroPython( 181 Preferences.setMicroPython(
173 "SyncTimeAfterConnect", self.syncTimeCheckBox.isChecked() 182 "SyncTimeAfterConnect", self.syncTimeCheckBox.isChecked()

eric ide

mercurial