src/eric7/Plugins/VcsPlugins/vcsMercurial/HgClientPromptDialog.py

branch
eric7
changeset 10438
4cd7e5a8b3cf
parent 9653
e67609152c5e
child 10439
21c28b0f9e41
equal deleted inserted replaced
10437:2f70ca07f0af 10438:4cd7e5a8b3cf
21 21
22 def __init__(self, size, message, parent=None): 22 def __init__(self, size, message, parent=None):
23 """ 23 """
24 Constructor 24 Constructor
25 25
26 @param size maximum length of the requested input (integer) 26 @param size maximum length of the requested input
27 @param message message sent by the server (string) 27 @type int
28 @param parent reference to the parent widget (QWidget) 28 @param message message sent by the server
29 @type str
30 @param parent reference to the parent widget
31 @type QWidget
29 """ 32 """
30 super().__init__(parent) 33 super().__init__(parent)
31 self.setupUi(self) 34 self.setupUi(self)
32 35
33 self.buttonBox.button(QDialogButtonBox.StandardButton.Ok).setEnabled(False) 36 self.buttonBox.button(QDialogButtonBox.StandardButton.Ok).setEnabled(False)
45 @pyqtSlot(str) 48 @pyqtSlot(str)
46 def on_inputEdit_textChanged(self, txt): 49 def on_inputEdit_textChanged(self, txt):
47 """ 50 """
48 Private slot to handle changes of the user input. 51 Private slot to handle changes of the user input.
49 52
50 @param txt text entered by the user (string) 53 @param txt text entered by the user
54 @type str
51 """ 55 """
52 self.buttonBox.button(QDialogButtonBox.StandardButton.Ok).setEnabled(bool(txt)) 56 self.buttonBox.button(QDialogButtonBox.StandardButton.Ok).setEnabled(bool(txt))
53 57
54 @pyqtSlot(bool) 58 @pyqtSlot(bool)
55 def on_passwordCheckBox_toggled(self, isOn): 59 def on_passwordCheckBox_toggled(self, isOn):
56 """ 60 """
57 Private slot to handle the password checkbox toggled. 61 Private slot to handle the password checkbox toggled.
58 62
59 @param isOn flag indicating the status of the check box (boolean) 63 @param isOn flag indicating the status of the check box
64 @type bool
60 """ 65 """
61 if isOn: 66 if isOn:
62 self.inputEdit.setEchoMode(QLineEdit.EchoMode.Password) 67 self.inputEdit.setEchoMode(QLineEdit.EchoMode.Password)
63 else: 68 else:
64 self.inputEdit.setEchoMode(QLineEdit.EchoMode.Normal) 69 self.inputEdit.setEchoMode(QLineEdit.EchoMode.Normal)
65 70
66 def getInput(self): 71 def getInput(self):
67 """ 72 """
68 Public method to get the user input. 73 Public method to get the user input.
69 74
70 @return user input (string) 75 @return user input
76 @rtype str
71 """ 77 """
72 return self.inputEdit.text() 78 return self.inputEdit.text()
73 79
74 def isPassword(self): 80 def isPassword(self):
75 """ 81 """

eric ide

mercurial