39 QDoubleValidator(-2147483647, 2147483647, 99, self.eDoubleFrom)) |
39 QDoubleValidator(-2147483647, 2147483647, 99, self.eDoubleFrom)) |
40 self.eDoubleTo.setValidator( |
40 self.eDoubleTo.setValidator( |
41 QDoubleValidator(-2147483647, 2147483647, 99, self.eDoubleTo)) |
41 QDoubleValidator(-2147483647, 2147483647, 99, self.eDoubleTo)) |
42 |
42 |
43 self.bTest = self.buttonBox.addButton( |
43 self.bTest = self.buttonBox.addButton( |
44 self.tr("Test"), QDialogButtonBox.ActionRole) |
44 self.tr("Test"), QDialogButtonBox.ButtonRole.ActionRole) |
45 |
45 |
46 msh = self.minimumSizeHint() |
46 msh = self.minimumSizeHint() |
47 self.resize(max(self.width(), msh.width()), msh.height()) |
47 self.resize(max(self.width(), msh.width()), msh.height()) |
48 |
48 |
49 @pyqtSlot(bool) |
49 @pyqtSlot(bool) |
69 """ |
69 """ |
70 Private method to test the selected options. |
70 Private method to test the selected options. |
71 """ |
71 """ |
72 if self.rText.isChecked(): |
72 if self.rText.isChecked(): |
73 if self.rEchoNormal.isChecked(): |
73 if self.rEchoNormal.isChecked(): |
74 echomode = QLineEdit.Normal |
74 echomode = QLineEdit.EchoMode.Normal |
75 elif self.rEchoNoEcho.isChecked(): |
75 elif self.rEchoNoEcho.isChecked(): |
76 echomode = QLineEdit.NoEcho |
76 echomode = QLineEdit.EchoMode.NoEcho |
77 else: |
77 else: |
78 echomode = QLineEdit.Password |
78 echomode = QLineEdit.EchoMode.Password |
79 QInputDialog.getText( |
79 QInputDialog.getText( |
80 None, |
80 None, |
81 self.eCaption.text(), |
81 self.eCaption.text(), |
82 self.eLabel.text(), |
82 self.eLabel.text(), |
83 echomode, |
83 echomode, |
146 code += 'self.tr("{0}"),{1}{2}'.format( |
146 code += 'self.tr("{0}"),{1}{2}'.format( |
147 self.eCaption.text(), os.linesep, istring) |
147 self.eCaption.text(), os.linesep, istring) |
148 code += 'self.tr("{0}"),{1}{2}'.format( |
148 code += 'self.tr("{0}"),{1}{2}'.format( |
149 self.eLabel.text(), os.linesep, istring) |
149 self.eLabel.text(), os.linesep, istring) |
150 if self.rEchoNormal.isChecked(): |
150 if self.rEchoNormal.isChecked(): |
151 code += 'QLineEdit.Normal' |
151 code += 'QLineEdit.EchoMode.Normal' |
152 elif self.rEchoNoEcho.isChecked(): |
152 elif self.rEchoNoEcho.isChecked(): |
153 code += 'QLineEdit.NoEcho' |
153 code += 'QLineEdit.EchoMode.NoEcho' |
154 else: |
154 else: |
155 code += 'QLineEdit.Password' |
155 code += 'QLineEdit.EchoMode.Password' |
156 if self.eTextDefault.text(): |
156 if self.eTextDefault.text(): |
157 code += ',{0}{1}self.tr("{2}")'.format( |
157 code += ',{0}{1}self.tr("{2}")'.format( |
158 os.linesep, istring, self.eTextDefault.text()) |
158 os.linesep, istring, self.eTextDefault.text()) |
159 code += '){0}'.format(estring) |
159 code += '){0}'.format(estring) |
160 elif self.rInteger.isChecked(): |
160 elif self.rInteger.isChecked(): |