~paulliu/qr-tools/python3

« back to all changes in this revision

Viewing changes to qtqr.py

  • Committer: Ramiro Algozino
  • Date: 2015-06-21 23:55:16 UTC
  • Revision ID: algozino@gmail.com-20150621235516-kjudpe1qaim4jx4p
Added option to show or not the WiFi Password while writing it.

Show diffs side-by-side

added added

removed removed

Lines of Context:
163
163
        self.wifiSSIDEdit = QtGui.QLineEdit()
164
164
        self.wifiPasswordLabel = QtGui.QLabel(self.trUtf8("Password:"))
165
165
        self.wifiPasswordEdit = QtGui.QLineEdit()
 
166
        self.wifiShowPassword = QtGui.QCheckBox(self.trUtf8('Show Password'))
166
167
        self.wifiEncriptionLabel = QtGui.QLabel(self.trUtf8("Encription:"))
167
168
        self.wifiEncriptionType = QtGui.QComboBox()
168
169
        self.wifiEncriptionType.addItems(
329
330
        self.wifiTabLayout.addWidget(self.wifiSSIDEdit)
330
331
        self.wifiTabLayout.addWidget(self.wifiPasswordLabel)
331
332
        self.wifiTabLayout.addWidget(self.wifiPasswordEdit)
 
333
        self.wifiTabLayout.addWidget(self.wifiShowPassword)
 
334
        self.wifiShowPassword.setChecked(True)
332
335
        self.wifiTabLayout.addWidget(self.wifiEncriptionLabel)
333
336
        self.wifiTabLayout.addWidget(self.wifiEncriptionType)
334
337
        self.wifiTabLayout.addStretch()
411
414
        self.geoLongEdit.textChanged.connect(self.qrencode)
412
415
        self.wifiSSIDEdit.textChanged.connect(self.qrencode)
413
416
        self.wifiPasswordEdit.textChanged.connect(self.qrencode)
 
417
        self.wifiShowPassword.stateChanged.connect(self.toggleShowPassword)
414
418
        self.wifiEncriptionType.currentIndexChanged.connect(self.qrencode)
415
419
        self.pixelSize.valueChanged.connect(self.qrencode)
416
420
        self.ecLevel.currentIndexChanged.connect(self.qrencode)
749
753
        fn.close()
750
754
        self.decodeFile(tmpfn)
751
755
 
 
756
    def toggleShowPassword(self, status):
 
757
        if status == 0:
 
758
            self.wifiPasswordEdit.setEchoMode(QtGui.QLineEdit.Password)
 
759
        elif status == 2:
 
760
            self.wifiPasswordEdit.setEchoMode(QtGui.QLineEdit.Normal)
752
761
 
753
762
class VideoDevices(QtGui.QDialog):
754
763
    def __init__(self):