src/eric7/Plugins/VcsPlugins/vcsSubversion/SvnCopyDialog.py

branch
eric7
changeset 10438
4cd7e5a8b3cf
parent 9653
e67609152c5e
child 10439
21c28b0f9e41
equal deleted inserted replaced
10437:2f70ca07f0af 10438:4cd7e5a8b3cf
25 25
26 def __init__(self, source, parent=None, move=False, force=False): 26 def __init__(self, source, parent=None, move=False, force=False):
27 """ 27 """
28 Constructor 28 Constructor
29 29
30 @param source name of the source file/directory (string) 30 @param source name of the source file/directory
31 @param parent parent widget (QWidget) 31 @type str
32 @param move flag indicating a move operation (boolean) 32 @param parent parent widget
33 @param force flag indicating a forced operation (boolean) 33 @type QWidget
34 @param move flag indicating a move operation
35 @type bool
36 @param force flag indicating a forced operation
37 @type bool
34 """ 38 """
35 super().__init__(parent) 39 super().__init__(parent)
36 self.setupUi(self) 40 self.setupUi(self)
37 41
38 self.source = source 42 self.source = source
56 60
57 def getData(self): 61 def getData(self):
58 """ 62 """
59 Public method to retrieve the copy data. 63 Public method to retrieve the copy data.
60 64
61 @return the target name (string) and a flag indicating 65 @return tuple containing the target name and a flag indicating the
62 the operation should be enforced (boolean) 66 operation should be enforced
67 @rtype tuple of (str, bool)
63 """ 68 """
64 target = self.targetPicker.text() 69 target = self.targetPicker.text()
65 if not os.path.isabs(target): 70 if not os.path.isabs(target):
66 sourceDir = os.path.dirname(self.sourceEdit.text()) 71 sourceDir = os.path.dirname(self.sourceEdit.text())
67 target = os.path.join(sourceDir, target) 72 target = os.path.join(sourceDir, target)
70 @pyqtSlot(str) 75 @pyqtSlot(str)
71 def on_targetPicker_textChanged(self, txt): 76 def on_targetPicker_textChanged(self, txt):
72 """ 77 """
73 Private slot to handle changes of the target. 78 Private slot to handle changes of the target.
74 79
75 @param txt contents of the target edit (string) 80 @param txt contents of the target edit
81 @type str
76 """ 82 """
77 self.buttonBox.button(QDialogButtonBox.StandardButton.Ok).setEnabled( 83 self.buttonBox.button(QDialogButtonBox.StandardButton.Ok).setEnabled(
78 os.path.isabs(txt) or os.path.dirname(txt) == "" 84 os.path.isabs(txt) or os.path.dirname(txt) == ""
79 ) 85 )

eric ide

mercurial