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