21 |
21 |
22 def __init__(self, parent=None): |
22 def __init__(self, parent=None): |
23 """ |
23 """ |
24 Constructor |
24 Constructor |
25 |
25 |
26 @param parent parent widget (QWidget) |
26 @param parent parent widget |
|
27 @type QWidget |
27 """ |
28 """ |
28 super().__init__(parent) |
29 super().__init__(parent) |
29 self.setupUi(self) |
30 self.setupUi(self) |
30 |
31 |
31 self.propFilePicker.setMode(EricPathPickerModes.OPEN_FILE_MODE) |
32 self.propFilePicker.setMode(EricPathPickerModes.OPEN_FILE_MODE) |
32 |
33 |
33 def getData(self): |
34 def getData(self): |
34 """ |
35 """ |
35 Public slot used to retrieve the data entered into the dialog. |
36 Public slot used to retrieve the data entered into the dialog. |
36 |
37 |
37 @return tuple of three values giving the property name, a flag |
38 @return tuple containing the property name, a flag indicating a file was |
38 indicating a file was selected and the text of the property |
39 selected and the text of the property or the selected filename |
39 or the selected filename. (string, boolean, string) |
40 @rtype tuple of (str, bool, str) |
40 """ |
41 """ |
41 if self.fileRadioButton.isChecked(): |
42 if self.fileRadioButton.isChecked(): |
42 return (self.propNameEdit.text(), True, self.propFilePicker.text()) |
43 return (self.propNameEdit.text(), True, self.propFilePicker.text()) |
43 else: |
44 else: |
44 return (self.propNameEdit.text(), False, self.propTextEdit.toPlainText()) |
45 return (self.propNameEdit.text(), False, self.propTextEdit.toPlainText()) |