|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric7.Plugins.VcsPlugins.vcsGit.ProjectBrowserHelper</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.ProjectBrowserHelper</h1> |
|
24 |
|
25 <p> |
|
26 Module implementing the VCS project browser helper for Git. |
|
27 </p> |
|
28 <h3>Global Attributes</h3> |
|
29 |
|
30 <table> |
|
31 <tr><td>None</td></tr> |
|
32 </table> |
|
33 <h3>Classes</h3> |
|
34 |
|
35 <table> |
|
36 |
|
37 <tr> |
|
38 <td><a href="#GitProjectBrowserHelper">GitProjectBrowserHelper</a></td> |
|
39 <td>Class implementing the VCS project browser helper for Git.</td> |
|
40 </tr> |
|
41 </table> |
|
42 <h3>Functions</h3> |
|
43 |
|
44 <table> |
|
45 <tr><td>None</td></tr> |
|
46 </table> |
|
47 <hr /> |
|
48 <hr /> |
|
49 <a NAME="GitProjectBrowserHelper" ID="GitProjectBrowserHelper"></a> |
|
50 <h2>GitProjectBrowserHelper</h2> |
|
51 |
|
52 <p> |
|
53 Class implementing the VCS project browser helper for Git. |
|
54 </p> |
|
55 <h3>Derived from</h3> |
|
56 VcsProjectBrowserHelper |
|
57 <h3>Class Attributes</h3> |
|
58 |
|
59 <table> |
|
60 <tr><td>None</td></tr> |
|
61 </table> |
|
62 <h3>Class Methods</h3> |
|
63 |
|
64 <table> |
|
65 <tr><td>None</td></tr> |
|
66 </table> |
|
67 <h3>Methods</h3> |
|
68 |
|
69 <table> |
|
70 |
|
71 <tr> |
|
72 <td><a href="#GitProjectBrowserHelper.__init__">GitProjectBrowserHelper</a></td> |
|
73 <td>Constructor</td> |
|
74 </tr> |
|
75 <tr> |
|
76 <td><a href="#GitProjectBrowserHelper.__GitBlame">__GitBlame</a></td> |
|
77 <td>Private slot called by the context menu to show the annotations of a file.</td> |
|
78 </tr> |
|
79 <tr> |
|
80 <td><a href="#GitProjectBrowserHelper.__GitConfigure">__GitConfigure</a></td> |
|
81 <td>Private method to open the configuration dialog.</td> |
|
82 </tr> |
|
83 <tr> |
|
84 <td><a href="#GitProjectBrowserHelper.__GitCopy">__GitCopy</a></td> |
|
85 <td>Private slot called by the context menu to copy the selected file.</td> |
|
86 </tr> |
|
87 <tr> |
|
88 <td><a href="#GitProjectBrowserHelper.__GitExtendedDiff">__GitExtendedDiff</a></td> |
|
89 <td>Private slot called by the context menu to show the difference of a file to the repository.</td> |
|
90 </tr> |
|
91 <tr> |
|
92 <td><a href="#GitProjectBrowserHelper.__GitForget">__GitForget</a></td> |
|
93 <td>Private slot called by the context menu to remove the selected file from the Git repository leaving a copy in the project directory.</td> |
|
94 </tr> |
|
95 <tr> |
|
96 <td><a href="#GitProjectBrowserHelper.__GitMove">__GitMove</a></td> |
|
97 <td>Private slot called by the context menu to move the selected file.</td> |
|
98 </tr> |
|
99 <tr> |
|
100 <td><a href="#GitProjectBrowserHelper.__GitRevert">__GitRevert</a></td> |
|
101 <td>Private slot to revert changes of the working area.</td> |
|
102 </tr> |
|
103 <tr> |
|
104 <td><a href="#GitProjectBrowserHelper.__GitSbsDiff">__GitSbsDiff</a></td> |
|
105 <td>Private slot called by the context menu to show the difference of a file to the repository side-by-side.</td> |
|
106 </tr> |
|
107 <tr> |
|
108 <td><a href="#GitProjectBrowserHelper.__GitSbsExtendedDiff">__GitSbsExtendedDiff</a></td> |
|
109 <td>Private slot called by the context menu to show the difference of a file to the repository side-by-side.</td> |
|
110 </tr> |
|
111 <tr> |
|
112 <td><a href="#GitProjectBrowserHelper.__GitUnstage">__GitUnstage</a></td> |
|
113 <td>Private slot to unstage changes.</td> |
|
114 </tr> |
|
115 <tr> |
|
116 <td><a href="#GitProjectBrowserHelper._addVCSMenu">_addVCSMenu</a></td> |
|
117 <td>Protected method used to add the VCS menu to all project browsers.</td> |
|
118 </tr> |
|
119 <tr> |
|
120 <td><a href="#GitProjectBrowserHelper._addVCSMenuBack">_addVCSMenuBack</a></td> |
|
121 <td>Protected method used to add the VCS menu to all project browsers.</td> |
|
122 </tr> |
|
123 <tr> |
|
124 <td><a href="#GitProjectBrowserHelper._addVCSMenuDir">_addVCSMenuDir</a></td> |
|
125 <td>Protected method used to add the VCS menu to all project browsers.</td> |
|
126 </tr> |
|
127 <tr> |
|
128 <td><a href="#GitProjectBrowserHelper._addVCSMenuDirMulti">_addVCSMenuDirMulti</a></td> |
|
129 <td>Protected method used to add the VCS menu to all project browsers.</td> |
|
130 </tr> |
|
131 <tr> |
|
132 <td><a href="#GitProjectBrowserHelper._addVCSMenuMulti">_addVCSMenuMulti</a></td> |
|
133 <td>Protected method used to add the VCS menu for multi selection to all project browsers.</td> |
|
134 </tr> |
|
135 <tr> |
|
136 <td><a href="#GitProjectBrowserHelper.showContextMenu">showContextMenu</a></td> |
|
137 <td>Public slot called before the context menu is shown.</td> |
|
138 </tr> |
|
139 <tr> |
|
140 <td><a href="#GitProjectBrowserHelper.showContextMenuDir">showContextMenuDir</a></td> |
|
141 <td>Public slot called before the context menu is shown.</td> |
|
142 </tr> |
|
143 <tr> |
|
144 <td><a href="#GitProjectBrowserHelper.showContextMenuDirMulti">showContextMenuDirMulti</a></td> |
|
145 <td>Public slot called before the context menu is shown.</td> |
|
146 </tr> |
|
147 <tr> |
|
148 <td><a href="#GitProjectBrowserHelper.showContextMenuMulti">showContextMenuMulti</a></td> |
|
149 <td>Public slot called before the context menu (multiple selections) is shown.</td> |
|
150 </tr> |
|
151 </table> |
|
152 <h3>Static Methods</h3> |
|
153 |
|
154 <table> |
|
155 <tr><td>None</td></tr> |
|
156 </table> |
|
157 |
|
158 <a NAME="GitProjectBrowserHelper.__init__" ID="GitProjectBrowserHelper.__init__"></a> |
|
159 <h4>GitProjectBrowserHelper (Constructor)</h4> |
|
160 <b>GitProjectBrowserHelper</b>(<i>vcsObject, browserObject, projectObject, isTranslationsBrowser, parent=None, name=None</i>) |
|
161 |
|
162 <p> |
|
163 Constructor |
|
164 </p> |
|
165 <dl> |
|
166 |
|
167 <dt><i>vcsObject</i></dt> |
|
168 <dd> |
|
169 reference to the vcs object |
|
170 </dd> |
|
171 <dt><i>browserObject</i></dt> |
|
172 <dd> |
|
173 reference to the project browser object |
|
174 </dd> |
|
175 <dt><i>projectObject</i></dt> |
|
176 <dd> |
|
177 reference to the project object |
|
178 </dd> |
|
179 <dt><i>isTranslationsBrowser</i></dt> |
|
180 <dd> |
|
181 flag indicating, the helper is requested |
|
182 for the translations browser (this needs some special treatment) |
|
183 </dd> |
|
184 <dt><i>parent</i></dt> |
|
185 <dd> |
|
186 parent widget (QWidget) |
|
187 </dd> |
|
188 <dt><i>name</i></dt> |
|
189 <dd> |
|
190 name of this object (string) |
|
191 </dd> |
|
192 </dl> |
|
193 <a NAME="GitProjectBrowserHelper.__GitBlame" ID="GitProjectBrowserHelper.__GitBlame"></a> |
|
194 <h4>GitProjectBrowserHelper.__GitBlame</h4> |
|
195 <b>__GitBlame</b>(<i></i>) |
|
196 |
|
197 <p> |
|
198 Private slot called by the context menu to show the annotations of a |
|
199 file. |
|
200 </p> |
|
201 <a NAME="GitProjectBrowserHelper.__GitConfigure" ID="GitProjectBrowserHelper.__GitConfigure"></a> |
|
202 <h4>GitProjectBrowserHelper.__GitConfigure</h4> |
|
203 <b>__GitConfigure</b>(<i></i>) |
|
204 |
|
205 <p> |
|
206 Private method to open the configuration dialog. |
|
207 </p> |
|
208 <a NAME="GitProjectBrowserHelper.__GitCopy" ID="GitProjectBrowserHelper.__GitCopy"></a> |
|
209 <h4>GitProjectBrowserHelper.__GitCopy</h4> |
|
210 <b>__GitCopy</b>(<i></i>) |
|
211 |
|
212 <p> |
|
213 Private slot called by the context menu to copy the selected file. |
|
214 </p> |
|
215 <a NAME="GitProjectBrowserHelper.__GitExtendedDiff" ID="GitProjectBrowserHelper.__GitExtendedDiff"></a> |
|
216 <h4>GitProjectBrowserHelper.__GitExtendedDiff</h4> |
|
217 <b>__GitExtendedDiff</b>(<i></i>) |
|
218 |
|
219 <p> |
|
220 Private slot called by the context menu to show the difference of a |
|
221 file to the repository. |
|
222 </p> |
|
223 <p> |
|
224 This gives the chance to enter the revisions to compare. |
|
225 </p> |
|
226 <a NAME="GitProjectBrowserHelper.__GitForget" ID="GitProjectBrowserHelper.__GitForget"></a> |
|
227 <h4>GitProjectBrowserHelper.__GitForget</h4> |
|
228 <b>__GitForget</b>(<i></i>) |
|
229 |
|
230 <p> |
|
231 Private slot called by the context menu to remove the selected file |
|
232 from the Git repository leaving a copy in the project directory. |
|
233 </p> |
|
234 <a NAME="GitProjectBrowserHelper.__GitMove" ID="GitProjectBrowserHelper.__GitMove"></a> |
|
235 <h4>GitProjectBrowserHelper.__GitMove</h4> |
|
236 <b>__GitMove</b>(<i></i>) |
|
237 |
|
238 <p> |
|
239 Private slot called by the context menu to move the selected file. |
|
240 </p> |
|
241 <a NAME="GitProjectBrowserHelper.__GitRevert" ID="GitProjectBrowserHelper.__GitRevert"></a> |
|
242 <h4>GitProjectBrowserHelper.__GitRevert</h4> |
|
243 <b>__GitRevert</b>(<i></i>) |
|
244 |
|
245 <p> |
|
246 Private slot to revert changes of the working area. |
|
247 </p> |
|
248 <a NAME="GitProjectBrowserHelper.__GitSbsDiff" ID="GitProjectBrowserHelper.__GitSbsDiff"></a> |
|
249 <h4>GitProjectBrowserHelper.__GitSbsDiff</h4> |
|
250 <b>__GitSbsDiff</b>(<i></i>) |
|
251 |
|
252 <p> |
|
253 Private slot called by the context menu to show the difference of a |
|
254 file to the repository side-by-side. |
|
255 </p> |
|
256 <a NAME="GitProjectBrowserHelper.__GitSbsExtendedDiff" ID="GitProjectBrowserHelper.__GitSbsExtendedDiff"></a> |
|
257 <h4>GitProjectBrowserHelper.__GitSbsExtendedDiff</h4> |
|
258 <b>__GitSbsExtendedDiff</b>(<i></i>) |
|
259 |
|
260 <p> |
|
261 Private slot called by the context menu to show the difference of a |
|
262 file to the repository side-by-side. |
|
263 </p> |
|
264 <p> |
|
265 It allows the selection of revisions to compare. |
|
266 </p> |
|
267 <a NAME="GitProjectBrowserHelper.__GitUnstage" ID="GitProjectBrowserHelper.__GitUnstage"></a> |
|
268 <h4>GitProjectBrowserHelper.__GitUnstage</h4> |
|
269 <b>__GitUnstage</b>(<i></i>) |
|
270 |
|
271 <p> |
|
272 Private slot to unstage changes. |
|
273 </p> |
|
274 <a NAME="GitProjectBrowserHelper._addVCSMenu" ID="GitProjectBrowserHelper._addVCSMenu"></a> |
|
275 <h4>GitProjectBrowserHelper._addVCSMenu</h4> |
|
276 <b>_addVCSMenu</b>(<i>mainMenu</i>) |
|
277 |
|
278 <p> |
|
279 Protected method used to add the VCS menu to all project browsers. |
|
280 </p> |
|
281 <dl> |
|
282 |
|
283 <dt><i>mainMenu</i></dt> |
|
284 <dd> |
|
285 reference to the menu to be amended |
|
286 </dd> |
|
287 </dl> |
|
288 <a NAME="GitProjectBrowserHelper._addVCSMenuBack" ID="GitProjectBrowserHelper._addVCSMenuBack"></a> |
|
289 <h4>GitProjectBrowserHelper._addVCSMenuBack</h4> |
|
290 <b>_addVCSMenuBack</b>(<i>mainMenu</i>) |
|
291 |
|
292 <p> |
|
293 Protected method used to add the VCS menu to all project browsers. |
|
294 </p> |
|
295 <dl> |
|
296 |
|
297 <dt><i>mainMenu</i></dt> |
|
298 <dd> |
|
299 reference to the menu to be amended |
|
300 </dd> |
|
301 </dl> |
|
302 <a NAME="GitProjectBrowserHelper._addVCSMenuDir" ID="GitProjectBrowserHelper._addVCSMenuDir"></a> |
|
303 <h4>GitProjectBrowserHelper._addVCSMenuDir</h4> |
|
304 <b>_addVCSMenuDir</b>(<i>mainMenu</i>) |
|
305 |
|
306 <p> |
|
307 Protected method used to add the VCS menu to all project browsers. |
|
308 </p> |
|
309 <dl> |
|
310 |
|
311 <dt><i>mainMenu</i></dt> |
|
312 <dd> |
|
313 reference to the menu to be amended |
|
314 </dd> |
|
315 </dl> |
|
316 <a NAME="GitProjectBrowserHelper._addVCSMenuDirMulti" ID="GitProjectBrowserHelper._addVCSMenuDirMulti"></a> |
|
317 <h4>GitProjectBrowserHelper._addVCSMenuDirMulti</h4> |
|
318 <b>_addVCSMenuDirMulti</b>(<i>mainMenu</i>) |
|
319 |
|
320 <p> |
|
321 Protected method used to add the VCS menu to all project browsers. |
|
322 </p> |
|
323 <dl> |
|
324 |
|
325 <dt><i>mainMenu</i></dt> |
|
326 <dd> |
|
327 reference to the menu to be amended |
|
328 </dd> |
|
329 </dl> |
|
330 <a NAME="GitProjectBrowserHelper._addVCSMenuMulti" ID="GitProjectBrowserHelper._addVCSMenuMulti"></a> |
|
331 <h4>GitProjectBrowserHelper._addVCSMenuMulti</h4> |
|
332 <b>_addVCSMenuMulti</b>(<i>mainMenu</i>) |
|
333 |
|
334 <p> |
|
335 Protected method used to add the VCS menu for multi selection to all |
|
336 project browsers. |
|
337 </p> |
|
338 <dl> |
|
339 |
|
340 <dt><i>mainMenu</i></dt> |
|
341 <dd> |
|
342 reference to the menu to be amended |
|
343 </dd> |
|
344 </dl> |
|
345 <a NAME="GitProjectBrowserHelper.showContextMenu" ID="GitProjectBrowserHelper.showContextMenu"></a> |
|
346 <h4>GitProjectBrowserHelper.showContextMenu</h4> |
|
347 <b>showContextMenu</b>(<i>menu, standardItems</i>) |
|
348 |
|
349 <p> |
|
350 Public slot called before the context menu is shown. |
|
351 </p> |
|
352 <p> |
|
353 It enables/disables the VCS menu entries depending on the overall |
|
354 VCS status and the file status. |
|
355 </p> |
|
356 <dl> |
|
357 |
|
358 <dt><i>menu</i></dt> |
|
359 <dd> |
|
360 reference to the menu to be shown |
|
361 </dd> |
|
362 <dt><i>standardItems</i></dt> |
|
363 <dd> |
|
364 array of standard items that need |
|
365 activation/deactivation depending on the overall VCS status |
|
366 </dd> |
|
367 </dl> |
|
368 <a NAME="GitProjectBrowserHelper.showContextMenuDir" ID="GitProjectBrowserHelper.showContextMenuDir"></a> |
|
369 <h4>GitProjectBrowserHelper.showContextMenuDir</h4> |
|
370 <b>showContextMenuDir</b>(<i>menu, standardItems</i>) |
|
371 |
|
372 <p> |
|
373 Public slot called before the context menu is shown. |
|
374 </p> |
|
375 <p> |
|
376 It enables/disables the VCS menu entries depending on the overall |
|
377 VCS status and the directory status. |
|
378 </p> |
|
379 <dl> |
|
380 |
|
381 <dt><i>menu</i></dt> |
|
382 <dd> |
|
383 reference to the menu to be shown |
|
384 </dd> |
|
385 <dt><i>standardItems</i></dt> |
|
386 <dd> |
|
387 array of standard items that need |
|
388 activation/deactivation depending on the overall VCS status |
|
389 </dd> |
|
390 </dl> |
|
391 <a NAME="GitProjectBrowserHelper.showContextMenuDirMulti" ID="GitProjectBrowserHelper.showContextMenuDirMulti"></a> |
|
392 <h4>GitProjectBrowserHelper.showContextMenuDirMulti</h4> |
|
393 <b>showContextMenuDirMulti</b>(<i>menu, standardItems</i>) |
|
394 |
|
395 <p> |
|
396 Public slot called before the context menu is shown. |
|
397 </p> |
|
398 <p> |
|
399 It enables/disables the VCS menu entries depending on the overall |
|
400 VCS status and the directory status. |
|
401 </p> |
|
402 <dl> |
|
403 |
|
404 <dt><i>menu</i></dt> |
|
405 <dd> |
|
406 reference to the menu to be shown |
|
407 </dd> |
|
408 <dt><i>standardItems</i></dt> |
|
409 <dd> |
|
410 array of standard items that need |
|
411 activation/deactivation depending on the overall VCS status |
|
412 </dd> |
|
413 </dl> |
|
414 <a NAME="GitProjectBrowserHelper.showContextMenuMulti" ID="GitProjectBrowserHelper.showContextMenuMulti"></a> |
|
415 <h4>GitProjectBrowserHelper.showContextMenuMulti</h4> |
|
416 <b>showContextMenuMulti</b>(<i>menu, standardItems</i>) |
|
417 |
|
418 <p> |
|
419 Public slot called before the context menu (multiple selections) is |
|
420 shown. |
|
421 </p> |
|
422 <p> |
|
423 It enables/disables the VCS menu entries depending on the overall |
|
424 VCS status and the files status. |
|
425 </p> |
|
426 <dl> |
|
427 |
|
428 <dt><i>menu</i></dt> |
|
429 <dd> |
|
430 reference to the menu to be shown |
|
431 </dd> |
|
432 <dt><i>standardItems</i></dt> |
|
433 <dd> |
|
434 array of standard items that need |
|
435 activation/deactivation depending on the overall VCS status |
|
436 </dd> |
|
437 </dl> |
|
438 <div align="right"><a href="#top">Up</a></div> |
|
439 <hr /> |
|
440 </body></html> |