|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric7.Plugins.VcsPlugins.vcsGit.GitDiffDialog</title> |
|
4 <meta charset="UTF-8"> |
|
5 <style> |
|
6 body { |
|
7 background: #EDECE6; |
|
8 margin: 0em 1em 10em 1em; |
|
9 color: black; |
|
10 } |
|
11 |
|
12 h1 { color: white; background: #85774A; } |
|
13 h2 { color: white; background: #85774A; } |
|
14 h3 { color: white; background: #9D936E; } |
|
15 h4 { color: white; background: #9D936E; } |
|
16 |
|
17 a { color: #BA6D36; } |
|
18 |
|
19 </style> |
|
20 </head> |
|
21 <body> |
|
22 <a NAME="top" ID="top"></a> |
|
23 <h1>eric7.Plugins.VcsPlugins.vcsGit.GitDiffDialog</h1> |
|
24 |
|
25 <p> |
|
26 Module implementing a dialog to show the output of the git diff command |
|
27 process. |
|
28 </p> |
|
29 <h3>Global Attributes</h3> |
|
30 |
|
31 <table> |
|
32 <tr><td>None</td></tr> |
|
33 </table> |
|
34 <h3>Classes</h3> |
|
35 |
|
36 <table> |
|
37 |
|
38 <tr> |
|
39 <td><a href="#GitDiffDialog">GitDiffDialog</a></td> |
|
40 <td>Class implementing a dialog to show the output of the git diff command process.</td> |
|
41 </tr> |
|
42 </table> |
|
43 <h3>Functions</h3> |
|
44 |
|
45 <table> |
|
46 <tr><td>None</td></tr> |
|
47 </table> |
|
48 <hr /> |
|
49 <hr /> |
|
50 <a NAME="GitDiffDialog" ID="GitDiffDialog"></a> |
|
51 <h2>GitDiffDialog</h2> |
|
52 |
|
53 <p> |
|
54 Class implementing a dialog to show the output of the git diff command |
|
55 process. |
|
56 </p> |
|
57 <h3>Derived from</h3> |
|
58 QWidget, Ui_GitDiffDialog |
|
59 <h3>Class Attributes</h3> |
|
60 |
|
61 <table> |
|
62 <tr><td>None</td></tr> |
|
63 </table> |
|
64 <h3>Class Methods</h3> |
|
65 |
|
66 <table> |
|
67 <tr><td>None</td></tr> |
|
68 </table> |
|
69 <h3>Methods</h3> |
|
70 |
|
71 <table> |
|
72 |
|
73 <tr> |
|
74 <td><a href="#GitDiffDialog.__init__">GitDiffDialog</a></td> |
|
75 <td>Constructor</td> |
|
76 </tr> |
|
77 <tr> |
|
78 <td><a href="#GitDiffDialog.__generatorFinished">__generatorFinished</a></td> |
|
79 <td>Private slot connected to the finished signal.</td> |
|
80 </tr> |
|
81 <tr> |
|
82 <td><a href="#GitDiffDialog.__mergeFileSeparators">__mergeFileSeparators</a></td> |
|
83 <td>Private method to merge the file separator entries.</td> |
|
84 </tr> |
|
85 <tr> |
|
86 <td><a href="#GitDiffDialog.closeEvent">closeEvent</a></td> |
|
87 <td>Protected slot implementing a close event handler.</td> |
|
88 </tr> |
|
89 <tr> |
|
90 <td><a href="#GitDiffDialog.on_buttonBox_clicked">on_buttonBox_clicked</a></td> |
|
91 <td>Private slot called by a button of the button box clicked.</td> |
|
92 </tr> |
|
93 <tr> |
|
94 <td><a href="#GitDiffDialog.on_filesCombo_activated">on_filesCombo_activated</a></td> |
|
95 <td>Private slot to handle the selection of a file.</td> |
|
96 </tr> |
|
97 <tr> |
|
98 <td><a href="#GitDiffDialog.on_refreshButton_clicked">on_refreshButton_clicked</a></td> |
|
99 <td>Private slot to refresh the display.</td> |
|
100 </tr> |
|
101 <tr> |
|
102 <td><a href="#GitDiffDialog.on_saveButton_clicked">on_saveButton_clicked</a></td> |
|
103 <td>Private slot to handle the Save button press.</td> |
|
104 </tr> |
|
105 <tr> |
|
106 <td><a href="#GitDiffDialog.start">start</a></td> |
|
107 <td>Public slot to start the git diff command.</td> |
|
108 </tr> |
|
109 </table> |
|
110 <h3>Static Methods</h3> |
|
111 |
|
112 <table> |
|
113 <tr><td>None</td></tr> |
|
114 </table> |
|
115 |
|
116 <a NAME="GitDiffDialog.__init__" ID="GitDiffDialog.__init__"></a> |
|
117 <h4>GitDiffDialog (Constructor)</h4> |
|
118 <b>GitDiffDialog</b>(<i>vcs, parent=None</i>) |
|
119 |
|
120 <p> |
|
121 Constructor |
|
122 </p> |
|
123 <dl> |
|
124 |
|
125 <dt><i>vcs</i></dt> |
|
126 <dd> |
|
127 reference to the vcs object |
|
128 </dd> |
|
129 <dt><i>parent</i></dt> |
|
130 <dd> |
|
131 parent widget (QWidget) |
|
132 </dd> |
|
133 </dl> |
|
134 <a NAME="GitDiffDialog.__generatorFinished" ID="GitDiffDialog.__generatorFinished"></a> |
|
135 <h4>GitDiffDialog.__generatorFinished</h4> |
|
136 <b>__generatorFinished</b>(<i></i>) |
|
137 |
|
138 <p> |
|
139 Private slot connected to the finished signal. |
|
140 </p> |
|
141 <a NAME="GitDiffDialog.__mergeFileSeparators" ID="GitDiffDialog.__mergeFileSeparators"></a> |
|
142 <h4>GitDiffDialog.__mergeFileSeparators</h4> |
|
143 <b>__mergeFileSeparators</b>(<i>fileSeparators</i>) |
|
144 |
|
145 <p> |
|
146 Private method to merge the file separator entries. |
|
147 </p> |
|
148 <dl> |
|
149 |
|
150 <dt><i>fileSeparators</i></dt> |
|
151 <dd> |
|
152 list of file separator entries to be merged |
|
153 </dd> |
|
154 </dl> |
|
155 <dl> |
|
156 <dt>Return:</dt> |
|
157 <dd> |
|
158 merged list of file separator entries |
|
159 </dd> |
|
160 </dl> |
|
161 <a NAME="GitDiffDialog.closeEvent" ID="GitDiffDialog.closeEvent"></a> |
|
162 <h4>GitDiffDialog.closeEvent</h4> |
|
163 <b>closeEvent</b>(<i>e</i>) |
|
164 |
|
165 <p> |
|
166 Protected slot implementing a close event handler. |
|
167 </p> |
|
168 <dl> |
|
169 |
|
170 <dt><i>e</i></dt> |
|
171 <dd> |
|
172 close event (QCloseEvent) |
|
173 </dd> |
|
174 </dl> |
|
175 <a NAME="GitDiffDialog.on_buttonBox_clicked" ID="GitDiffDialog.on_buttonBox_clicked"></a> |
|
176 <h4>GitDiffDialog.on_buttonBox_clicked</h4> |
|
177 <b>on_buttonBox_clicked</b>(<i>button</i>) |
|
178 |
|
179 <p> |
|
180 Private slot called by a button of the button box clicked. |
|
181 </p> |
|
182 <dl> |
|
183 |
|
184 <dt><i>button</i></dt> |
|
185 <dd> |
|
186 button that was clicked (QAbstractButton) |
|
187 </dd> |
|
188 </dl> |
|
189 <a NAME="GitDiffDialog.on_filesCombo_activated" ID="GitDiffDialog.on_filesCombo_activated"></a> |
|
190 <h4>GitDiffDialog.on_filesCombo_activated</h4> |
|
191 <b>on_filesCombo_activated</b>(<i>index</i>) |
|
192 |
|
193 <p> |
|
194 Private slot to handle the selection of a file. |
|
195 </p> |
|
196 <dl> |
|
197 |
|
198 <dt><i>index</i></dt> |
|
199 <dd> |
|
200 activated row (integer) |
|
201 </dd> |
|
202 </dl> |
|
203 <a NAME="GitDiffDialog.on_refreshButton_clicked" ID="GitDiffDialog.on_refreshButton_clicked"></a> |
|
204 <h4>GitDiffDialog.on_refreshButton_clicked</h4> |
|
205 <b>on_refreshButton_clicked</b>(<i></i>) |
|
206 |
|
207 <p> |
|
208 Private slot to refresh the display. |
|
209 </p> |
|
210 <a NAME="GitDiffDialog.on_saveButton_clicked" ID="GitDiffDialog.on_saveButton_clicked"></a> |
|
211 <h4>GitDiffDialog.on_saveButton_clicked</h4> |
|
212 <b>on_saveButton_clicked</b>(<i></i>) |
|
213 |
|
214 <p> |
|
215 Private slot to handle the Save button press. |
|
216 </p> |
|
217 <p> |
|
218 It saves the diff shown in the dialog to a file in the local |
|
219 filesystem. |
|
220 </p> |
|
221 <a NAME="GitDiffDialog.start" ID="GitDiffDialog.start"></a> |
|
222 <h4>GitDiffDialog.start</h4> |
|
223 <b>start</b>(<i>fn, versions=None, diffMode="work2repo", stashName="", refreshable=False</i>) |
|
224 |
|
225 <p> |
|
226 Public slot to start the git diff command. |
|
227 </p> |
|
228 <dl> |
|
229 |
|
230 <dt><i>fn</i></dt> |
|
231 <dd> |
|
232 filename to be diffed (string) |
|
233 </dd> |
|
234 <dt><i>versions</i></dt> |
|
235 <dd> |
|
236 list of versions to be diffed (list of up to 2 strings |
|
237 or None) |
|
238 </dd> |
|
239 <dt><i>diffMode</i></dt> |
|
240 <dd> |
|
241 indication for the type of diff to be performed ( |
|
242 'work2repo' compares the working tree with the HEAD commit, |
|
243 'work2stage' compares the working tree with the staging area, |
|
244 'stage2repo' compares the staging area with the HEAD commit, |
|
245 'work2stage2repo' compares the working tree with the staging area |
|
246 and the staging area with the HEAD commit, |
|
247 'stash' shows the diff for a stash) |
|
248 </dd> |
|
249 <dt><i>stashName</i></dt> |
|
250 <dd> |
|
251 name of the stash to show a diff for (string) |
|
252 </dd> |
|
253 <dt><i>refreshable</i></dt> |
|
254 <dd> |
|
255 flag indicating a refreshable diff (boolean) |
|
256 </dd> |
|
257 </dl> |
|
258 <dl> |
|
259 |
|
260 <dt>Raises <b>ValueError</b>:</dt> |
|
261 <dd> |
|
262 raised to indicate a bad value for the 'diffMode' |
|
263 parameter. |
|
264 </dd> |
|
265 </dl> |
|
266 <div align="right"><a href="#top">Up</a></div> |
|
267 <hr /> |
|
268 </body></html> |