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

branch
eric7
changeset 10438
4cd7e5a8b3cf
parent 9653
e67609152c5e
child 10439
21c28b0f9e41
equal deleted inserted replaced
10437:2f70ca07f0af 10438:4cd7e5a8b3cf
24 def __init__(self, vcs, parent=None): 24 def __init__(self, vcs, parent=None):
25 """ 25 """
26 Constructor 26 Constructor
27 27
28 @param vcs reference to the VCS object (Git) 28 @param vcs reference to the VCS object (Git)
29 @param parent reference to the parent widget (QWidget) 29 @type Git
30 @param parent reference to the parent widget
31 @type QWidget
30 """ 32 """
31 super().__init__(parent) 33 super().__init__(parent)
32 self.setupUi(self) 34 self.setupUi(self)
33 self.setWindowFlags(Qt.WindowType.Window) 35 self.setWindowFlags(Qt.WindowType.Window)
34 36
41 43
42 def start(self, projectDir, patchCheckData): 44 def start(self, projectDir, patchCheckData):
43 """ 45 """
44 Public method to start the statistics process. 46 Public method to start the statistics process.
45 47
46 @param projectDir directory name of the project (string) 48 @param projectDir directory name of the project
49 @type str
47 @param patchCheckData tuple of data as returned by the 50 @param patchCheckData tuple of data as returned by the
48 GitPatchFilesDialog.getData() method 51 GitPatchFilesDialog.getData() method
52 @type tuple of (list of str, int, bool, bool)
49 """ 53 """
50 from .GitPatchFilesDialog import GitPatchFilesDialog 54 from .GitPatchFilesDialog import GitPatchFilesDialog
51 55
52 self.__patchCheckData = patchCheckData 56 self.__patchCheckData = patchCheckData
53 57
135 139
136 def __createStatisticsItem(self, line): 140 def __createStatisticsItem(self, line):
137 """ 141 """
138 Private method to create a file statistics entry. 142 Private method to create a file statistics entry.
139 143
140 @param line string with file statistics data (string) 144 @param line string with file statistics data
145 @type str
141 """ 146 """
142 insertions, deletions, filename = line.strip().split(None, 2) 147 insertions, deletions, filename = line.strip().split(None, 2)
143 itm = QTreeWidgetItem(self.changesTreeWidget, [insertions, deletions, filename]) 148 itm = QTreeWidgetItem(self.changesTreeWidget, [insertions, deletions, filename])
144 itm.setTextAlignment(0, Qt.AlignmentFlag.AlignRight) 149 itm.setTextAlignment(0, Qt.AlignmentFlag.AlignRight)
145 itm.setTextAlignment(1, Qt.AlignmentFlag.AlignRight) 150 itm.setTextAlignment(1, Qt.AlignmentFlag.AlignRight)
158 Public method to get the data used to generate the statistics. 163 Public method to get the data used to generate the statistics.
159 164
160 @return tuple of list of patch files, strip count, flag indicating 165 @return tuple of list of patch files, strip count, flag indicating
161 that the patch has inaccurate end-of-file marker and a flag 166 that the patch has inaccurate end-of-file marker and a flag
162 indicating to not trust the line count information 167 indicating to not trust the line count information
163 (list of string, integer, boolean, boolean) 168 @rtype tuple of (list of str, int, bool, bool)
164 """ 169 """
165 return self.__patchCheckData 170 return self.__patchCheckData

eric ide

mercurial