Plugins/VcsPlugins/vcsPySvn/SvnPropDelDialog.py

changeset 0
de9c2efb9d02
child 12
1d8dd9706f46
equal deleted inserted replaced
-1:000000000000 0:de9c2efb9d02
1 # -*- coding: utf-8 -*-
2
3 # Copyright (c) 2003 - 2009 Detlev Offenbach <detlev@die-offenbachs.de>
4 #
5
6 """
7 Module implementing a dialog to enter the data for a new property.
8 """
9
10 from PyQt4.QtCore import *
11 from PyQt4.QtGui import *
12
13 from Ui_SvnPropDelDialog import Ui_SvnPropDelDialog
14
15 class SvnPropDelDialog(QDialog, Ui_SvnPropDelDialog):
16 """
17 Class implementing a dialog to enter the data for a new property.
18 """
19 def __init__(self, recursive, parent = None):
20 """
21 Constructor
22
23 @param recursive flag indicating a recursive set is requested
24 @param parent parent widget (QWidget)
25 """
26 QDialog.__init__(self, parent)
27 self.setupUi(self)
28
29 self.okButton = self.buttonBox.button(QDialogButtonBox.Ok)
30 self.okButton.setEnabled(False)
31
32 self.recurseCheckBox.setChecked(recursive)
33
34 def on_propNameEdit_textChanged(self, text):
35 """
36 Private method used to enable/disable the OK-button.
37
38 @param text ignored
39 """
40 self.okButton.setDisabled(text == "")
41
42 def getData(self):
43 """
44 Public slot used to retrieve the data entered into the dialog.
45
46 @return tuple of two values giving the property name and a flag
47 indicating, that this property should be applied recursively.
48 (string, boolean)
49 """
50 return (self.propNameEdit.text(),
51 self.recurseCheckBox.isChecked())

eric ide

mercurial