210 |
211 |
211 def __performSelectedAction(self, index, lineedit): |
212 def __performSelectedAction(self, index, lineedit): |
212 """ |
213 """ |
213 Private method performing some actions depending on the input. |
214 Private method performing some actions depending on the input. |
214 |
215 |
215 @param index selected list index (integer) |
216 @param index selected list index |
216 @param lineedit line edit widget to act on (QLineEdit) |
217 @type int |
|
218 @param lineedit line edit widget to act on |
|
219 @type QLineEdit |
217 """ |
220 """ |
218 if index < 3: |
221 if index < 3: |
219 lineedit.setEnabled(True) |
222 lineedit.setEnabled(True) |
220 if index == 0: |
223 if index == 0: |
221 lineedit.setValidator(self.charValidator) |
224 lineedit.setValidator(self.charValidator) |
260 |
263 |
261 def __formatCharacter(self, index, char): |
264 def __formatCharacter(self, index, char): |
262 """ |
265 """ |
263 Private method to format the characters entered into the dialog. |
266 Private method to format the characters entered into the dialog. |
264 |
267 |
265 @param index selected list index (integer) |
268 @param index selected list index |
266 @param char character string enetered into the dialog (string) |
269 @type int |
267 @return formated character string (string) |
270 @param char character string enetered into the dialog |
|
271 @type str |
|
272 @return formated character string |
|
273 @rtype str |
268 """ |
274 """ |
269 if index == 0: |
275 if index == 0: |
270 return char |
276 return char |
271 elif index == 1: |
277 elif index == 1: |
272 return "\\x{0}".format(char.lower()) |
278 return "\\x{0}".format(char.lower()) |
280 |
286 |
281 def getCharacters(self): |
287 def getCharacters(self): |
282 """ |
288 """ |
283 Public method to return the character string assembled via the dialog. |
289 Public method to return the character string assembled via the dialog. |
284 |
290 |
285 @return formatted string for character classes (string) |
291 @return formatted string for character classes |
|
292 @rtype str |
286 """ |
293 """ |
287 regexp = "" |
294 regexp = "" |
288 |
295 |
289 # negative character range |
296 # negative character range |
290 if self.negativeCheckBox.isChecked(): |
297 if self.negativeCheckBox.isChecked(): |