src/eric7/MicroPython/WifiDialogs/WifiConnectionDialog.py

branch
mpy_network
changeset 9868
467288cffee2
parent 9789
d8e0ab86ddca
child 9870
0399d3607829
equal deleted inserted replaced
9867:e69788b71c00 9868:467288cffee2
69 else: 69 else:
70 self.passwordEdit.setEchoMode(QLineEdit.EchoMode.Password) 70 self.passwordEdit.setEchoMode(QLineEdit.EchoMode.Password)
71 self.showPasswordButton.setIcon(EricPixmapCache.getIcon("showPassword")) 71 self.showPasswordButton.setIcon(EricPixmapCache.getIcon("showPassword"))
72 self.showPasswordButton.setToolTip(self.tr("Press to show the password")) 72 self.showPasswordButton.setToolTip(self.tr("Press to show the password"))
73 73
74 @pyqtSlot()
75 def accept(self):
76 """
77 Public slot accepting the dialog.
78 """
79 if self.rememberCheckBox.isChecked():
80 Preferences.setMicroPython("WifiName", self.ssidEdit.text())
81 Preferences.setMicroPython("WifiPassword", self.passwordEdit.text())
82
83 super().accept()
84
74 def getConnectionParameters(self): 85 def getConnectionParameters(self):
75 """ 86 """
76 Public method to get the entered connection parameters. 87 Public method to get the entered connection parameters.
77 88
78 @return tuple containing the SSID, password and a flag indicating, if the 89 @return tuple containing the SSID and the password
79 parameters shall be saved to the preferences 90 @rtype tuple of (str, str)
80 @rtype tuple of (str, str, bool)
81 """ 91 """
82 return ( 92 return (
83 self.ssidEdit.text(), 93 self.ssidEdit.text(),
84 self.passwordEdit.text(), 94 self.passwordEdit.text(),
85 self.rememberCheckBox.isChecked(),
86 ) 95 )

eric ide

mercurial