src/eric7/Plugins/VcsPlugins/vcsGit/GitPatchFilesDialog.py

branch
eric7
changeset 10438
4cd7e5a8b3cf
parent 9653
e67609152c5e
child 10439
21c28b0f9e41
equal deleted inserted replaced
10437:2f70ca07f0af 10438:4cd7e5a8b3cf
24 24
25 def __init__(self, rootDir, patchCheckData, parent=None): 25 def __init__(self, rootDir, patchCheckData, parent=None):
26 """ 26 """
27 Constructor 27 Constructor
28 28
29 @param rootDir root of the directory tree (string) 29 @param rootDir root of the directory tree
30 @type str
30 @param patchCheckData tuple of data as returned by the 31 @param patchCheckData tuple of data as returned by the
31 getData() method 32 getData() method
32 @param parent reference to the parent widget (QWidget) 33 @type tuple of (list of str, int, bool, bool)
34 @param parent reference to the parent widget
35 @type QWidget
33 """ 36 """
34 super().__init__(parent) 37 super().__init__(parent)
35 self.setupUi(self) 38 self.setupUi(self)
36 39
37 self.__rootDir = rootDir 40 self.__rootDir = rootDir
126 129
127 def __getPatchFilesList(self): 130 def __getPatchFilesList(self):
128 """ 131 """
129 Private method to get the list of patch files. 132 Private method to get the list of patch files.
130 133
131 @return list of patch files (list of string) 134 @return list of patch files
135 @rtype list of str
132 """ 136 """
133 patchFiles = [] 137 patchFiles = []
134 for row in range(self.patchFilesList.count()): 138 for row in range(self.patchFilesList.count()):
135 itm = self.patchFilesList.item(row) 139 itm = self.patchFilesList.item(row)
136 patchFiles.append(itm.text()) 140 patchFiles.append(itm.text())
142 Public slot to get the entered data. 146 Public slot to get the entered data.
143 147
144 @return tuple of list of patch files, strip count, flag indicating 148 @return tuple of list of patch files, strip count, flag indicating
145 that the patch has inaccurate end-of-file marker and a flag 149 that the patch has inaccurate end-of-file marker and a flag
146 indicating to not trust the line count information 150 indicating to not trust the line count information
147 (list of string, integer, boolean, boolean) 151 @rtype tuple of (list of str, int, bool, bool)
148 """ 152 """
149 return ( 153 return (
150 self.__getPatchFilesList(), 154 self.__getPatchFilesList(),
151 self.stripSpinBox.value(), 155 self.stripSpinBox.value(),
152 self.eofCheckBox.isChecked(), 156 self.eofCheckBox.isChecked(),

eric ide

mercurial