|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric7.Plugins.VcsPlugins.vcsMercurial.ProjectBrowserHelper</title> |
|
4 <meta charset="UTF-8"> |
|
5 <link rel="stylesheet" href="styles.css"> |
|
6 </head> |
|
7 <body> |
|
8 <a NAME="top" ID="top"></a> |
|
9 <h1>eric7.Plugins.VcsPlugins.vcsMercurial.ProjectBrowserHelper</h1> |
|
10 |
|
11 <p> |
|
12 Module implementing the VCS project browser helper for Mercurial. |
|
13 </p> |
|
14 <h3>Global Attributes</h3> |
|
15 |
|
16 <table> |
|
17 <tr><td>None</td></tr> |
|
18 </table> |
|
19 <h3>Classes</h3> |
|
20 |
|
21 <table> |
|
22 |
|
23 <tr> |
|
24 <td><a href="#HgProjectBrowserHelper">HgProjectBrowserHelper</a></td> |
|
25 <td>Class implementing the VCS project browser helper for Mercurial.</td> |
|
26 </tr> |
|
27 </table> |
|
28 <h3>Functions</h3> |
|
29 |
|
30 <table> |
|
31 <tr><td>None</td></tr> |
|
32 </table> |
|
33 <hr /> |
|
34 <hr /> |
|
35 <a NAME="HgProjectBrowserHelper" ID="HgProjectBrowserHelper"></a> |
|
36 <h2>HgProjectBrowserHelper</h2> |
|
37 |
|
38 <p> |
|
39 Class implementing the VCS project browser helper for Mercurial. |
|
40 </p> |
|
41 <h3>Derived from</h3> |
|
42 VcsProjectBrowserHelper |
|
43 <h3>Class Attributes</h3> |
|
44 |
|
45 <table> |
|
46 <tr><td>None</td></tr> |
|
47 </table> |
|
48 <h3>Class Methods</h3> |
|
49 |
|
50 <table> |
|
51 <tr><td>None</td></tr> |
|
52 </table> |
|
53 <h3>Methods</h3> |
|
54 |
|
55 <table> |
|
56 |
|
57 <tr> |
|
58 <td><a href="#HgProjectBrowserHelper.__init__">HgProjectBrowserHelper</a></td> |
|
59 <td>Constructor</td> |
|
60 </tr> |
|
61 <tr> |
|
62 <td><a href="#HgProjectBrowserHelper.__HgAnnotate">__HgAnnotate</a></td> |
|
63 <td>Private slot called by the context menu to show the annotations of a file.</td> |
|
64 </tr> |
|
65 <tr> |
|
66 <td><a href="#HgProjectBrowserHelper.__HgConfigure">__HgConfigure</a></td> |
|
67 <td>Private method to open the configuration dialog.</td> |
|
68 </tr> |
|
69 <tr> |
|
70 <td><a href="#HgProjectBrowserHelper.__HgCopy">__HgCopy</a></td> |
|
71 <td>Private slot called by the context menu to copy the selected file.</td> |
|
72 </tr> |
|
73 <tr> |
|
74 <td><a href="#HgProjectBrowserHelper.__HgExtendedDiff">__HgExtendedDiff</a></td> |
|
75 <td>Private slot called by the context menu to show the difference of a file to the repository.</td> |
|
76 </tr> |
|
77 <tr> |
|
78 <td><a href="#HgProjectBrowserHelper.__HgForget">__HgForget</a></td> |
|
79 <td>Private slot called by the context menu to remove the selected file from the Mercurial repository leaving a copy in the project directory.</td> |
|
80 </tr> |
|
81 <tr> |
|
82 <td><a href="#HgProjectBrowserHelper.__HgMove">__HgMove</a></td> |
|
83 <td>Private slot called by the context menu to move the selected file.</td> |
|
84 </tr> |
|
85 <tr> |
|
86 <td><a href="#HgProjectBrowserHelper.__HgReMerge">__HgReMerge</a></td> |
|
87 <td>Private slot called by the context menu to re-merge a file.</td> |
|
88 </tr> |
|
89 <tr> |
|
90 <td><a href="#HgProjectBrowserHelper.__HgResolved">__HgResolved</a></td> |
|
91 <td>Private slot called by the context menu to mark conflicts of a file as being resolved.</td> |
|
92 </tr> |
|
93 <tr> |
|
94 <td><a href="#HgProjectBrowserHelper.__HgRevert">__HgRevert</a></td> |
|
95 <td>Private slot called by the context menu to revert changes made.</td> |
|
96 </tr> |
|
97 <tr> |
|
98 <td><a href="#HgProjectBrowserHelper.__HgSbsDiff">__HgSbsDiff</a></td> |
|
99 <td>Private slot called by the context menu to show the difference of a file to the repository side-by-side.</td> |
|
100 </tr> |
|
101 <tr> |
|
102 <td><a href="#HgProjectBrowserHelper.__HgSbsExtendedDiff">__HgSbsExtendedDiff</a></td> |
|
103 <td>Private slot called by the context menu to show the difference of a file to the repository side-by-side.</td> |
|
104 </tr> |
|
105 <tr> |
|
106 <td><a href="#HgProjectBrowserHelper.__HgUnresolved">__HgUnresolved</a></td> |
|
107 <td>Private slot called by the context menu to mark conflicts of a file as being unresolved.</td> |
|
108 </tr> |
|
109 <tr> |
|
110 <td><a href="#HgProjectBrowserHelper.__addExtensionsMenu">__addExtensionsMenu</a></td> |
|
111 <td>Private method to add an extension menu entry.</td> |
|
112 </tr> |
|
113 <tr> |
|
114 <td><a href="#HgProjectBrowserHelper.__showExtensionMenu">__showExtensionMenu</a></td> |
|
115 <td>Private slot showing the extensions menu.</td> |
|
116 </tr> |
|
117 <tr> |
|
118 <td><a href="#HgProjectBrowserHelper._addVCSMenu">_addVCSMenu</a></td> |
|
119 <td>Protected method used to add the VCS menu to all project browsers.</td> |
|
120 </tr> |
|
121 <tr> |
|
122 <td><a href="#HgProjectBrowserHelper._addVCSMenuBack">_addVCSMenuBack</a></td> |
|
123 <td>Protected method used to add the VCS menu to all project browsers.</td> |
|
124 </tr> |
|
125 <tr> |
|
126 <td><a href="#HgProjectBrowserHelper._addVCSMenuDir">_addVCSMenuDir</a></td> |
|
127 <td>Protected method used to add the VCS menu to all project browsers.</td> |
|
128 </tr> |
|
129 <tr> |
|
130 <td><a href="#HgProjectBrowserHelper._addVCSMenuDirMulti">_addVCSMenuDirMulti</a></td> |
|
131 <td>Protected method used to add the VCS menu to all project browsers.</td> |
|
132 </tr> |
|
133 <tr> |
|
134 <td><a href="#HgProjectBrowserHelper._addVCSMenuMulti">_addVCSMenuMulti</a></td> |
|
135 <td>Protected method used to add the VCS menu for multi selection to all project browsers.</td> |
|
136 </tr> |
|
137 <tr> |
|
138 <td><a href="#HgProjectBrowserHelper.showContextMenu">showContextMenu</a></td> |
|
139 <td>Public slot called before the context menu is shown.</td> |
|
140 </tr> |
|
141 <tr> |
|
142 <td><a href="#HgProjectBrowserHelper.showContextMenuDir">showContextMenuDir</a></td> |
|
143 <td>Public slot called before the context menu is shown.</td> |
|
144 </tr> |
|
145 <tr> |
|
146 <td><a href="#HgProjectBrowserHelper.showContextMenuDirMulti">showContextMenuDirMulti</a></td> |
|
147 <td>Public slot called before the context menu is shown.</td> |
|
148 </tr> |
|
149 <tr> |
|
150 <td><a href="#HgProjectBrowserHelper.showContextMenuMulti">showContextMenuMulti</a></td> |
|
151 <td>Public slot called before the context menu (multiple selections) is shown.</td> |
|
152 </tr> |
|
153 </table> |
|
154 <h3>Static Methods</h3> |
|
155 |
|
156 <table> |
|
157 <tr><td>None</td></tr> |
|
158 </table> |
|
159 |
|
160 <a NAME="HgProjectBrowserHelper.__init__" ID="HgProjectBrowserHelper.__init__"></a> |
|
161 <h4>HgProjectBrowserHelper (Constructor)</h4> |
|
162 <b>HgProjectBrowserHelper</b>(<i>vcsObject, browserObject, projectObject, isTranslationsBrowser, parent=None, name=None</i>) |
|
163 |
|
164 <p> |
|
165 Constructor |
|
166 </p> |
|
167 <dl> |
|
168 |
|
169 <dt><i>vcsObject</i></dt> |
|
170 <dd> |
|
171 reference to the vcs object |
|
172 </dd> |
|
173 <dt><i>browserObject</i></dt> |
|
174 <dd> |
|
175 reference to the project browser object |
|
176 </dd> |
|
177 <dt><i>projectObject</i></dt> |
|
178 <dd> |
|
179 reference to the project object |
|
180 </dd> |
|
181 <dt><i>isTranslationsBrowser</i></dt> |
|
182 <dd> |
|
183 flag indicating, the helper is requested |
|
184 for the translations browser (this needs some special treatment) |
|
185 </dd> |
|
186 <dt><i>parent</i></dt> |
|
187 <dd> |
|
188 parent widget (QWidget) |
|
189 </dd> |
|
190 <dt><i>name</i></dt> |
|
191 <dd> |
|
192 name of this object (string) |
|
193 </dd> |
|
194 </dl> |
|
195 <a NAME="HgProjectBrowserHelper.__HgAnnotate" ID="HgProjectBrowserHelper.__HgAnnotate"></a> |
|
196 <h4>HgProjectBrowserHelper.__HgAnnotate</h4> |
|
197 <b>__HgAnnotate</b>(<i></i>) |
|
198 |
|
199 <p> |
|
200 Private slot called by the context menu to show the annotations of a |
|
201 file. |
|
202 </p> |
|
203 <a NAME="HgProjectBrowserHelper.__HgConfigure" ID="HgProjectBrowserHelper.__HgConfigure"></a> |
|
204 <h4>HgProjectBrowserHelper.__HgConfigure</h4> |
|
205 <b>__HgConfigure</b>(<i></i>) |
|
206 |
|
207 <p> |
|
208 Private method to open the configuration dialog. |
|
209 </p> |
|
210 <a NAME="HgProjectBrowserHelper.__HgCopy" ID="HgProjectBrowserHelper.__HgCopy"></a> |
|
211 <h4>HgProjectBrowserHelper.__HgCopy</h4> |
|
212 <b>__HgCopy</b>(<i></i>) |
|
213 |
|
214 <p> |
|
215 Private slot called by the context menu to copy the selected file. |
|
216 </p> |
|
217 <a NAME="HgProjectBrowserHelper.__HgExtendedDiff" ID="HgProjectBrowserHelper.__HgExtendedDiff"></a> |
|
218 <h4>HgProjectBrowserHelper.__HgExtendedDiff</h4> |
|
219 <b>__HgExtendedDiff</b>(<i></i>) |
|
220 |
|
221 <p> |
|
222 Private slot called by the context menu to show the difference of a |
|
223 file to the repository. |
|
224 </p> |
|
225 <p> |
|
226 This gives the chance to enter the revisions to compare. |
|
227 </p> |
|
228 <a NAME="HgProjectBrowserHelper.__HgForget" ID="HgProjectBrowserHelper.__HgForget"></a> |
|
229 <h4>HgProjectBrowserHelper.__HgForget</h4> |
|
230 <b>__HgForget</b>(<i></i>) |
|
231 |
|
232 <p> |
|
233 Private slot called by the context menu to remove the selected file |
|
234 from the Mercurial repository leaving a copy in the project directory. |
|
235 </p> |
|
236 <a NAME="HgProjectBrowserHelper.__HgMove" ID="HgProjectBrowserHelper.__HgMove"></a> |
|
237 <h4>HgProjectBrowserHelper.__HgMove</h4> |
|
238 <b>__HgMove</b>(<i></i>) |
|
239 |
|
240 <p> |
|
241 Private slot called by the context menu to move the selected file. |
|
242 </p> |
|
243 <a NAME="HgProjectBrowserHelper.__HgReMerge" ID="HgProjectBrowserHelper.__HgReMerge"></a> |
|
244 <h4>HgProjectBrowserHelper.__HgReMerge</h4> |
|
245 <b>__HgReMerge</b>(<i></i>) |
|
246 |
|
247 <p> |
|
248 Private slot called by the context menu to re-merge a file. |
|
249 </p> |
|
250 <a NAME="HgProjectBrowserHelper.__HgResolved" ID="HgProjectBrowserHelper.__HgResolved"></a> |
|
251 <h4>HgProjectBrowserHelper.__HgResolved</h4> |
|
252 <b>__HgResolved</b>(<i></i>) |
|
253 |
|
254 <p> |
|
255 Private slot called by the context menu to mark conflicts of a file |
|
256 as being resolved. |
|
257 </p> |
|
258 <a NAME="HgProjectBrowserHelper.__HgRevert" ID="HgProjectBrowserHelper.__HgRevert"></a> |
|
259 <h4>HgProjectBrowserHelper.__HgRevert</h4> |
|
260 <b>__HgRevert</b>(<i></i>) |
|
261 |
|
262 <p> |
|
263 Private slot called by the context menu to revert changes made. |
|
264 </p> |
|
265 <a NAME="HgProjectBrowserHelper.__HgSbsDiff" ID="HgProjectBrowserHelper.__HgSbsDiff"></a> |
|
266 <h4>HgProjectBrowserHelper.__HgSbsDiff</h4> |
|
267 <b>__HgSbsDiff</b>(<i></i>) |
|
268 |
|
269 <p> |
|
270 Private slot called by the context menu to show the difference of a |
|
271 file to the repository side-by-side. |
|
272 </p> |
|
273 <a NAME="HgProjectBrowserHelper.__HgSbsExtendedDiff" ID="HgProjectBrowserHelper.__HgSbsExtendedDiff"></a> |
|
274 <h4>HgProjectBrowserHelper.__HgSbsExtendedDiff</h4> |
|
275 <b>__HgSbsExtendedDiff</b>(<i></i>) |
|
276 |
|
277 <p> |
|
278 Private slot called by the context menu to show the difference of a |
|
279 file to the repository side-by-side. |
|
280 </p> |
|
281 <p> |
|
282 It allows the selection of revisions to compare. |
|
283 </p> |
|
284 <a NAME="HgProjectBrowserHelper.__HgUnresolved" ID="HgProjectBrowserHelper.__HgUnresolved"></a> |
|
285 <h4>HgProjectBrowserHelper.__HgUnresolved</h4> |
|
286 <b>__HgUnresolved</b>(<i></i>) |
|
287 |
|
288 <p> |
|
289 Private slot called by the context menu to mark conflicts of a file |
|
290 as being unresolved. |
|
291 </p> |
|
292 <a NAME="HgProjectBrowserHelper.__addExtensionsMenu" ID="HgProjectBrowserHelper.__addExtensionsMenu"></a> |
|
293 <h4>HgProjectBrowserHelper.__addExtensionsMenu</h4> |
|
294 <b>__addExtensionsMenu</b>(<i>menu, key</i>) |
|
295 |
|
296 <p> |
|
297 Private method to add an extension menu entry. |
|
298 </p> |
|
299 <dl> |
|
300 |
|
301 <dt><i>menu</i></dt> |
|
302 <dd> |
|
303 menu to add it to (QMenu) |
|
304 </dd> |
|
305 <dt><i>key</i></dt> |
|
306 <dd> |
|
307 menu key (string, one of 'mainMenu', 'multiMenu', |
|
308 'backMenu', 'dirMenu' or 'dirMultiMenu') |
|
309 </dd> |
|
310 </dl> |
|
311 <dl> |
|
312 <dt>Return:</dt> |
|
313 <dd> |
|
314 reference to the menu action (QAction) |
|
315 </dd> |
|
316 </dl> |
|
317 <a NAME="HgProjectBrowserHelper.__showExtensionMenu" ID="HgProjectBrowserHelper.__showExtensionMenu"></a> |
|
318 <h4>HgProjectBrowserHelper.__showExtensionMenu</h4> |
|
319 <b>__showExtensionMenu</b>(<i>key, controlled</i>) |
|
320 |
|
321 <p> |
|
322 Private slot showing the extensions menu. |
|
323 </p> |
|
324 <dl> |
|
325 |
|
326 <dt><i>key</i></dt> |
|
327 <dd> |
|
328 menu key (string, one of 'mainMenu', 'multiMenu', |
|
329 'backMenu', 'dirMenu' or 'dirMultiMenu') |
|
330 </dd> |
|
331 <dt><i>controlled</i></dt> |
|
332 <dd> |
|
333 flag indicating to show the menu for a |
|
334 version controlled entry or a non-version controlled entry |
|
335 (boolean) |
|
336 </dd> |
|
337 </dl> |
|
338 <a NAME="HgProjectBrowserHelper._addVCSMenu" ID="HgProjectBrowserHelper._addVCSMenu"></a> |
|
339 <h4>HgProjectBrowserHelper._addVCSMenu</h4> |
|
340 <b>_addVCSMenu</b>(<i>mainMenu</i>) |
|
341 |
|
342 <p> |
|
343 Protected method used to add the VCS menu to all project browsers. |
|
344 </p> |
|
345 <dl> |
|
346 |
|
347 <dt><i>mainMenu</i></dt> |
|
348 <dd> |
|
349 reference to the menu to be amended |
|
350 </dd> |
|
351 </dl> |
|
352 <a NAME="HgProjectBrowserHelper._addVCSMenuBack" ID="HgProjectBrowserHelper._addVCSMenuBack"></a> |
|
353 <h4>HgProjectBrowserHelper._addVCSMenuBack</h4> |
|
354 <b>_addVCSMenuBack</b>(<i>mainMenu</i>) |
|
355 |
|
356 <p> |
|
357 Protected method used to add the VCS menu to all project browsers. |
|
358 </p> |
|
359 <dl> |
|
360 |
|
361 <dt><i>mainMenu</i></dt> |
|
362 <dd> |
|
363 reference to the menu to be amended |
|
364 </dd> |
|
365 </dl> |
|
366 <a NAME="HgProjectBrowserHelper._addVCSMenuDir" ID="HgProjectBrowserHelper._addVCSMenuDir"></a> |
|
367 <h4>HgProjectBrowserHelper._addVCSMenuDir</h4> |
|
368 <b>_addVCSMenuDir</b>(<i>mainMenu</i>) |
|
369 |
|
370 <p> |
|
371 Protected method used to add the VCS menu to all project browsers. |
|
372 </p> |
|
373 <dl> |
|
374 |
|
375 <dt><i>mainMenu</i></dt> |
|
376 <dd> |
|
377 reference to the menu to be amended |
|
378 </dd> |
|
379 </dl> |
|
380 <a NAME="HgProjectBrowserHelper._addVCSMenuDirMulti" ID="HgProjectBrowserHelper._addVCSMenuDirMulti"></a> |
|
381 <h4>HgProjectBrowserHelper._addVCSMenuDirMulti</h4> |
|
382 <b>_addVCSMenuDirMulti</b>(<i>mainMenu</i>) |
|
383 |
|
384 <p> |
|
385 Protected method used to add the VCS menu to all project browsers. |
|
386 </p> |
|
387 <dl> |
|
388 |
|
389 <dt><i>mainMenu</i></dt> |
|
390 <dd> |
|
391 reference to the menu to be amended |
|
392 </dd> |
|
393 </dl> |
|
394 <a NAME="HgProjectBrowserHelper._addVCSMenuMulti" ID="HgProjectBrowserHelper._addVCSMenuMulti"></a> |
|
395 <h4>HgProjectBrowserHelper._addVCSMenuMulti</h4> |
|
396 <b>_addVCSMenuMulti</b>(<i>mainMenu</i>) |
|
397 |
|
398 <p> |
|
399 Protected method used to add the VCS menu for multi selection to all |
|
400 project browsers. |
|
401 </p> |
|
402 <dl> |
|
403 |
|
404 <dt><i>mainMenu</i></dt> |
|
405 <dd> |
|
406 reference to the menu to be amended |
|
407 </dd> |
|
408 </dl> |
|
409 <a NAME="HgProjectBrowserHelper.showContextMenu" ID="HgProjectBrowserHelper.showContextMenu"></a> |
|
410 <h4>HgProjectBrowserHelper.showContextMenu</h4> |
|
411 <b>showContextMenu</b>(<i>menu, standardItems</i>) |
|
412 |
|
413 <p> |
|
414 Public slot called before the context menu is shown. |
|
415 </p> |
|
416 <p> |
|
417 It enables/disables the VCS menu entries depending on the overall |
|
418 VCS status and the file status. |
|
419 </p> |
|
420 <dl> |
|
421 |
|
422 <dt><i>menu</i></dt> |
|
423 <dd> |
|
424 reference to the menu to be shown |
|
425 </dd> |
|
426 <dt><i>standardItems</i></dt> |
|
427 <dd> |
|
428 array of standard items that need |
|
429 activation/deactivation depending on the overall VCS status |
|
430 </dd> |
|
431 </dl> |
|
432 <a NAME="HgProjectBrowserHelper.showContextMenuDir" ID="HgProjectBrowserHelper.showContextMenuDir"></a> |
|
433 <h4>HgProjectBrowserHelper.showContextMenuDir</h4> |
|
434 <b>showContextMenuDir</b>(<i>menu, standardItems</i>) |
|
435 |
|
436 <p> |
|
437 Public slot called before the context menu is shown. |
|
438 </p> |
|
439 <p> |
|
440 It enables/disables the VCS menu entries depending on the overall |
|
441 VCS status and the directory status. |
|
442 </p> |
|
443 <dl> |
|
444 |
|
445 <dt><i>menu</i></dt> |
|
446 <dd> |
|
447 reference to the menu to be shown |
|
448 </dd> |
|
449 <dt><i>standardItems</i></dt> |
|
450 <dd> |
|
451 array of standard items that need |
|
452 activation/deactivation depending on the overall VCS status |
|
453 </dd> |
|
454 </dl> |
|
455 <a NAME="HgProjectBrowserHelper.showContextMenuDirMulti" ID="HgProjectBrowserHelper.showContextMenuDirMulti"></a> |
|
456 <h4>HgProjectBrowserHelper.showContextMenuDirMulti</h4> |
|
457 <b>showContextMenuDirMulti</b>(<i>menu, standardItems</i>) |
|
458 |
|
459 <p> |
|
460 Public slot called before the context menu is shown. |
|
461 </p> |
|
462 <p> |
|
463 It enables/disables the VCS menu entries depending on the overall |
|
464 VCS status and the directory status. |
|
465 </p> |
|
466 <dl> |
|
467 |
|
468 <dt><i>menu</i></dt> |
|
469 <dd> |
|
470 reference to the menu to be shown |
|
471 </dd> |
|
472 <dt><i>standardItems</i></dt> |
|
473 <dd> |
|
474 array of standard items that need |
|
475 activation/deactivation depending on the overall VCS status |
|
476 </dd> |
|
477 </dl> |
|
478 <a NAME="HgProjectBrowserHelper.showContextMenuMulti" ID="HgProjectBrowserHelper.showContextMenuMulti"></a> |
|
479 <h4>HgProjectBrowserHelper.showContextMenuMulti</h4> |
|
480 <b>showContextMenuMulti</b>(<i>menu, standardItems</i>) |
|
481 |
|
482 <p> |
|
483 Public slot called before the context menu (multiple selections) is |
|
484 shown. |
|
485 </p> |
|
486 <p> |
|
487 It enables/disables the VCS menu entries depending on the overall |
|
488 VCS status and the files status. |
|
489 </p> |
|
490 <dl> |
|
491 |
|
492 <dt><i>menu</i></dt> |
|
493 <dd> |
|
494 reference to the menu to be shown |
|
495 </dd> |
|
496 <dt><i>standardItems</i></dt> |
|
497 <dd> |
|
498 array of standard items that need |
|
499 activation/deactivation depending on the overall VCS status |
|
500 </dd> |
|
501 </dl> |
|
502 <div align="right"><a href="#top">Up</a></div> |
|
503 <hr /> |
|
504 </body></html> |