14 |
14 |
15 class SvnPropDelDialog(QDialog, Ui_SvnPropDelDialog): |
15 class SvnPropDelDialog(QDialog, Ui_SvnPropDelDialog): |
16 """ |
16 """ |
17 Class implementing a dialog to enter the data for a new property. |
17 Class implementing a dialog to enter the data for a new property. |
18 """ |
18 """ |
|
19 |
19 def __init__(self, recursive, parent=None): |
20 def __init__(self, recursive, parent=None): |
20 """ |
21 """ |
21 Constructor |
22 Constructor |
22 |
23 |
23 @param recursive flag indicating a recursive set is requested |
24 @param recursive flag indicating a recursive set is requested |
24 @param parent parent widget (QWidget) |
25 @param parent parent widget (QWidget) |
25 """ |
26 """ |
26 super().__init__(parent) |
27 super().__init__(parent) |
27 self.setupUi(self) |
28 self.setupUi(self) |
28 |
29 |
29 self.okButton = self.buttonBox.button( |
30 self.okButton = self.buttonBox.button(QDialogButtonBox.StandardButton.Ok) |
30 QDialogButtonBox.StandardButton.Ok) |
|
31 self.okButton.setEnabled(False) |
31 self.okButton.setEnabled(False) |
32 |
32 |
33 self.recurseCheckBox.setChecked(recursive) |
33 self.recurseCheckBox.setChecked(recursive) |
34 |
34 |
35 msh = self.minimumSizeHint() |
35 msh = self.minimumSizeHint() |
36 self.resize(max(self.width(), msh.width()), msh.height()) |
36 self.resize(max(self.width(), msh.width()), msh.height()) |
37 |
37 |
38 def on_propNameEdit_textChanged(self, text): |
38 def on_propNameEdit_textChanged(self, text): |
39 """ |
39 """ |
40 Private method used to enable/disable the OK-button. |
40 Private method used to enable/disable the OK-button. |
41 |
41 |
42 @param text ignored |
42 @param text ignored |
43 """ |
43 """ |
44 self.okButton.setDisabled(text == "") |
44 self.okButton.setDisabled(text == "") |
45 |
45 |
46 def getData(self): |
46 def getData(self): |
47 """ |
47 """ |
48 Public slot used to retrieve the data entered into the dialog. |
48 Public slot used to retrieve the data entered into the dialog. |
49 |
49 |
50 @return tuple of two values giving the property name and a flag |
50 @return tuple of two values giving the property name and a flag |
51 indicating, that this property should be applied recursively. |
51 indicating, that this property should be applied recursively. |
52 (string, boolean) |
52 (string, boolean) |
53 """ |
53 """ |
54 return (self.propNameEdit.text(), |
54 return (self.propNameEdit.text(), self.recurseCheckBox.isChecked()) |
55 self.recurseCheckBox.isChecked()) |
|