117 ) |
117 ) |
118 if index < 0: |
118 if index < 0: |
119 index = 0 |
119 index = 0 |
120 self.chartThemeComboBox.setCurrentIndex(index) |
120 self.chartThemeComboBox.setCurrentIndex(index) |
121 |
121 |
|
122 # WiFi |
|
123 self.countryEdit.setText(Preferences.getMicroPython("WifiCountry").upper()) |
|
124 self.ssidEdit.setText(Preferences.getMicroPython("WifiName")) |
|
125 self.passwordEdit.setText(Preferences.getMicroPython("WifiPassword")) |
|
126 self.apSsidEdit.setText(Preferences.getMicroPython("WifiApName")) |
|
127 self.apPasswordEdit.setText(Preferences.getMicroPython("WifiApPassword")) |
|
128 |
122 # MPY Cross Compiler |
129 # MPY Cross Compiler |
123 self.mpyCrossPicker.setText(Preferences.getMicroPython("MpyCrossCompiler")) |
130 self.mpyCrossPicker.setText(Preferences.getMicroPython("MpyCrossCompiler")) |
124 |
|
125 # WiFi |
|
126 self.ssidEdit.setText(Preferences.getMicroPython("WifiName")) |
|
127 self.passwordEdit.setText(Preferences.getMicroPython("WifiPassword")) |
|
128 |
131 |
129 # PyBoard specifics |
132 # PyBoard specifics |
130 self.dfuUtilPathPicker.setText(Preferences.getMicroPython("DfuUtilPath")) |
133 self.dfuUtilPathPicker.setText(Preferences.getMicroPython("DfuUtilPath")) |
131 |
134 |
132 # MicroPython URLs |
135 # MicroPython URLs |
201 # Chart Pane |
204 # Chart Pane |
202 Preferences.setMicroPython( |
205 Preferences.setMicroPython( |
203 "ChartColorTheme", self.chartThemeComboBox.currentData() |
206 "ChartColorTheme", self.chartThemeComboBox.currentData() |
204 ) |
207 ) |
205 |
208 |
|
209 # WiFi |
|
210 Preferences.setMicroPython("WifiCountry", self.countryEdit.text().upper()) |
|
211 Preferences.setMicroPython("WifiName", self.ssidEdit.text()) |
|
212 Preferences.setMicroPython("WifiPassword", self.passwordEdit.text()) |
|
213 Preferences.setMicroPython("WifiApName", self.apSsidEdit.text()) |
|
214 Preferences.setMicroPython("WifiApPassword", self.apPasswordEdit.text()) |
|
215 |
206 # MPY Cross Compiler |
216 # MPY Cross Compiler |
207 Preferences.setMicroPython("MpyCrossCompiler", self.mpyCrossPicker.text()) |
217 Preferences.setMicroPython("MpyCrossCompiler", self.mpyCrossPicker.text()) |
208 |
218 |
209 # WiFi |
|
210 Preferences.setMicroPython("WifiName", self.ssidEdit.text()) |
|
211 Preferences.setMicroPython("WifiPassword", self.passwordEdit.text()) |
|
212 |
|
213 # PyBoard specifics |
219 # PyBoard specifics |
214 Preferences.setMicroPython("DfuUtilPath", self.dfuUtilPathPicker.text()) |
220 Preferences.setMicroPython("DfuUtilPath", self.dfuUtilPathPicker.text()) |
215 |
221 |
216 # MicroPython URLs |
222 # MicroPython URLs |
217 Preferences.setMicroPython( |
223 Preferences.setMicroPython( |
272 else: |
278 else: |
273 self.passwordEdit.setEchoMode(QLineEdit.EchoMode.Password) |
279 self.passwordEdit.setEchoMode(QLineEdit.EchoMode.Password) |
274 self.showPasswordButton.setIcon(EricPixmapCache.getIcon("showPassword")) |
280 self.showPasswordButton.setIcon(EricPixmapCache.getIcon("showPassword")) |
275 self.showPasswordButton.setToolTip(self.tr("Press to show the password")) |
281 self.showPasswordButton.setToolTip(self.tr("Press to show the password")) |
276 |
282 |
|
283 @pyqtSlot(bool) |
|
284 def on_apShowPasswordButton_clicked(self, checked): |
|
285 """ |
|
286 Private slot to show or hide the WiFi Access Point password. |
|
287 |
|
288 @param checked state of the button |
|
289 @type bool |
|
290 """ |
|
291 if checked: |
|
292 self.apPasswordEdit.setEchoMode(QLineEdit.EchoMode.Normal) |
|
293 self.apShowPasswordButton.setIcon(EricPixmapCache.getIcon("hidePassword")) |
|
294 self.apShowPasswordButton.setToolTip(self.tr("Press to hide the password")) |
|
295 else: |
|
296 self.apPasswordEdit.setEchoMode(QLineEdit.EchoMode.Password) |
|
297 self.apShowPasswordButton.setIcon(EricPixmapCache.getIcon("showPassword")) |
|
298 self.apShowPasswordButton.setToolTip(self.tr("Press to show the password")) |
|
299 |
277 |
300 |
278 def create(dlg): |
301 def create(dlg): |
279 """ |
302 """ |
280 Module function to create the configuration page. |
303 Module function to create the configuration page. |
281 |
304 |