MqttMonitor/MqttConnectionProfilesDialog.py

branch
eric7
changeset 95
d830314cca87
parent 92
2fb5c08019fd
child 97
21f9c010dc42
equal deleted inserted replaced
94:95b0b60d87ed 95:d830314cca87
54 self.__profilesChanged = False 54 self.__profilesChanged = False
55 55
56 self.plusButton.setIcon(UI.PixmapCache.getIcon("plus")) 56 self.plusButton.setIcon(UI.PixmapCache.getIcon("plus"))
57 self.copyButton.setIcon(UI.PixmapCache.getIcon("editCopy")) 57 self.copyButton.setIcon(UI.PixmapCache.getIcon("editCopy"))
58 self.minusButton.setIcon(UI.PixmapCache.getIcon("minus")) 58 self.minusButton.setIcon(UI.PixmapCache.getIcon("minus"))
59 self.showPasswordButton.setIcon(UI.PixmapCache.getIcon("showPassword"))
59 60
60 self.tlsCertsFilePicker.setMode(EricPathPickerModes.OPEN_FILE_MODE) 61 self.tlsCertsFilePicker.setMode(EricPathPickerModes.OPEN_FILE_MODE)
61 self.tlsCertsFilePicker.setFilters( 62 self.tlsCertsFilePicker.setFilters(
62 self.tr("Certificate Files (*.crt *.pem);;All Files (*)")) 63 self.tr("Certificate Files (*.crt *.pem);;All Files (*)"))
63 self.tlsSelfSignedCertsFilePicker.setMode( 64 self.tlsSelfSignedCertsFilePicker.setMode(
369 self.tlsCertsFilePicker.setText(profile["TlsCaCert"]) 370 self.tlsCertsFilePicker.setText(profile["TlsCaCert"])
370 else: 371 else:
371 self.tlsDefaultCertsButton.setChecked(True) 372 self.tlsDefaultCertsButton.setChecked(True)
372 self.__populatingProfile = False 373 self.__populatingProfile = False
373 374
375 self.showPasswordButton.setChecked(False)
374 self.profileFrame.setEnabled(True) 376 self.profileFrame.setEnabled(True)
375 self.__updateApplyButton() 377 self.__updateApplyButton()
376 378
377 def __clearProfile(self): 379 def __clearProfile(self):
378 """ 380 """
399 self.tlsSelfSignedCertsFilePicker.setText("") 401 self.tlsSelfSignedCertsFilePicker.setText("")
400 self.tlsSelfSignedClientCertFilePicker.setText("") 402 self.tlsSelfSignedClientCertFilePicker.setText("")
401 self.tlsSelfSignedClientKeyFilePicker.setText("") 403 self.tlsSelfSignedClientKeyFilePicker.setText("")
402 self.__populatingProfile = False 404 self.__populatingProfile = False
403 405
406 self.showPasswordButton.setChecked(False)
404 self.profileFrame.setEnabled(False) 407 self.profileFrame.setEnabled(False)
405 self.__updateApplyButton() 408 self.__updateApplyButton()
406 409
407 def __resetProfile(self): 410 def __resetProfile(self):
408 """ 411 """
547 @param checked current state of the clean session selection 550 @param checked current state of the clean session selection
548 @type bool 551 @type bool
549 """ 552 """
550 self.__updateApplyButton() 553 self.__updateApplyButton()
551 554
555 @pyqtSlot(bool)
556 def on_showPasswordButton_toggled(self, checked):
557 """
558 Private slot to show or hide the password.
559
560 @param checked flag indicating the button state
561 @type bool
562 """
563 (
564 self.passwordEdit.setEchoMode(QLineEdit.EchoMode.Normal)
565 if checked else
566 self.passwordEdit.setEchoMode(QLineEdit.EchoMode.Password)
567 )
568
552 @pyqtSlot(str) 569 @pyqtSlot(str)
553 def on_tlsCertsFilePicker_textChanged(self, path): 570 def on_tlsCertsFilePicker_textChanged(self, path):
554 """ 571 """
555 Private slot handling a change of the TLS CA certificates file. 572 Private slot handling a change of the TLS CA certificates file.
556 573

eric ide

mercurial