|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric7.VCS.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.VCS.ProjectBrowserHelper</h1> |
|
24 |
|
25 <p> |
|
26 Module implementing the base class of the VCS project browser helper. |
|
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="#VcsProjectBrowserHelper">VcsProjectBrowserHelper</a></td> |
|
39 <td>Class implementing the base class of the VCS project browser helper.</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="VcsProjectBrowserHelper" ID="VcsProjectBrowserHelper"></a> |
|
50 <h2>VcsProjectBrowserHelper</h2> |
|
51 |
|
52 <p> |
|
53 Class implementing the base class of the VCS project browser helper. |
|
54 </p> |
|
55 <h3>Derived from</h3> |
|
56 QObject |
|
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="#VcsProjectBrowserHelper.__init__">VcsProjectBrowserHelper</a></td> |
|
73 <td>Constructor</td> |
|
74 </tr> |
|
75 <tr> |
|
76 <td><a href="#VcsProjectBrowserHelper._VCSAdd">_VCSAdd</a></td> |
|
77 <td>Protected slot called by the context menu to add the selected file to the VCS repository.</td> |
|
78 </tr> |
|
79 <tr> |
|
80 <td><a href="#VcsProjectBrowserHelper._VCSAddTree">_VCSAddTree</a></td> |
|
81 <td>Protected slot called by the context menu.</td> |
|
82 </tr> |
|
83 <tr> |
|
84 <td><a href="#VcsProjectBrowserHelper._VCSCommit">_VCSCommit</a></td> |
|
85 <td>Protected slot called by the context menu to commit the changes to the VCS repository.</td> |
|
86 </tr> |
|
87 <tr> |
|
88 <td><a href="#VcsProjectBrowserHelper._VCSDiff">_VCSDiff</a></td> |
|
89 <td>Protected slot called by the context menu to show the difference of a file/directory to the repository.</td> |
|
90 </tr> |
|
91 <tr> |
|
92 <td><a href="#VcsProjectBrowserHelper._VCSInfoDisplay">_VCSInfoDisplay</a></td> |
|
93 <td>Protected slot called to show some vcs information.</td> |
|
94 </tr> |
|
95 <tr> |
|
96 <td><a href="#VcsProjectBrowserHelper._VCSLog">_VCSLog</a></td> |
|
97 <td>Protected slot called by the context menu to show the VCS log of a file/directory.</td> |
|
98 </tr> |
|
99 <tr> |
|
100 <td><a href="#VcsProjectBrowserHelper._VCSLogBrowser">_VCSLogBrowser</a></td> |
|
101 <td>Protected slot called by the context menu to show the log browser for a file.</td> |
|
102 </tr> |
|
103 <tr> |
|
104 <td><a href="#VcsProjectBrowserHelper._VCSMerge">_VCSMerge</a></td> |
|
105 <td>Protected slot called by the context menu to merge changes into to a file.</td> |
|
106 </tr> |
|
107 <tr> |
|
108 <td><a href="#VcsProjectBrowserHelper._VCSRemove">_VCSRemove</a></td> |
|
109 <td>Protected slot called by the context menu to remove the selected file from the VCS repository.</td> |
|
110 </tr> |
|
111 <tr> |
|
112 <td><a href="#VcsProjectBrowserHelper._VCSRevert">_VCSRevert</a></td> |
|
113 <td>Protected slot called by the context menu to revert changes made to a file.</td> |
|
114 </tr> |
|
115 <tr> |
|
116 <td><a href="#VcsProjectBrowserHelper._VCSStatus">_VCSStatus</a></td> |
|
117 <td>Protected slot called by the context menu to show the status of a file.</td> |
|
118 </tr> |
|
119 <tr> |
|
120 <td><a href="#VcsProjectBrowserHelper._VCSUpdate">_VCSUpdate</a></td> |
|
121 <td>Protected slot called by the context menu to update a file from the VCS repository.</td> |
|
122 </tr> |
|
123 <tr> |
|
124 <td><a href="#VcsProjectBrowserHelper._updateVCSStatus">_updateVCSStatus</a></td> |
|
125 <td>Protected method to update the VCS status of an item.</td> |
|
126 </tr> |
|
127 <tr> |
|
128 <td><a href="#VcsProjectBrowserHelper.addVCSMenus">addVCSMenus</a></td> |
|
129 <td>Public method to add the VCS entries to the various project browser menus.</td> |
|
130 </tr> |
|
131 <tr> |
|
132 <td><a href="#VcsProjectBrowserHelper.showContextMenu">showContextMenu</a></td> |
|
133 <td>Public slot called before the context menu is shown.</td> |
|
134 </tr> |
|
135 <tr> |
|
136 <td><a href="#VcsProjectBrowserHelper.showContextMenuDir">showContextMenuDir</a></td> |
|
137 <td>Public slot called before the context menu is shown.</td> |
|
138 </tr> |
|
139 <tr> |
|
140 <td><a href="#VcsProjectBrowserHelper.showContextMenuDirMulti">showContextMenuDirMulti</a></td> |
|
141 <td>Public slot called before the context menu is shown.</td> |
|
142 </tr> |
|
143 <tr> |
|
144 <td><a href="#VcsProjectBrowserHelper.showContextMenuMulti">showContextMenuMulti</a></td> |
|
145 <td>Public slot called before the context menu (multiple selections) is shown.</td> |
|
146 </tr> |
|
147 </table> |
|
148 <h3>Static Methods</h3> |
|
149 |
|
150 <table> |
|
151 <tr><td>None</td></tr> |
|
152 </table> |
|
153 |
|
154 <a NAME="VcsProjectBrowserHelper.__init__" ID="VcsProjectBrowserHelper.__init__"></a> |
|
155 <h4>VcsProjectBrowserHelper (Constructor)</h4> |
|
156 <b>VcsProjectBrowserHelper</b>(<i>vcsObject, browserObject, projectObject, isTranslationsBrowser, parent=None, name=None</i>) |
|
157 |
|
158 <p> |
|
159 Constructor |
|
160 </p> |
|
161 <dl> |
|
162 |
|
163 <dt><i>vcsObject</i></dt> |
|
164 <dd> |
|
165 reference to the vcs object |
|
166 </dd> |
|
167 <dt><i>browserObject</i></dt> |
|
168 <dd> |
|
169 reference to the project browser object |
|
170 </dd> |
|
171 <dt><i>projectObject</i></dt> |
|
172 <dd> |
|
173 reference to the project object |
|
174 </dd> |
|
175 <dt><i>isTranslationsBrowser</i></dt> |
|
176 <dd> |
|
177 flag indicating, the helper is requested |
|
178 for the translations browser (this needs some special treatment) |
|
179 </dd> |
|
180 <dt><i>parent</i></dt> |
|
181 <dd> |
|
182 parent widget (QWidget) |
|
183 </dd> |
|
184 <dt><i>name</i></dt> |
|
185 <dd> |
|
186 name of this object (string) |
|
187 </dd> |
|
188 </dl> |
|
189 <a NAME="VcsProjectBrowserHelper._VCSAdd" ID="VcsProjectBrowserHelper._VCSAdd"></a> |
|
190 <h4>VcsProjectBrowserHelper._VCSAdd</h4> |
|
191 <b>_VCSAdd</b>(<i></i>) |
|
192 |
|
193 <p> |
|
194 Protected slot called by the context menu to add the selected file to |
|
195 the VCS repository. |
|
196 </p> |
|
197 <a NAME="VcsProjectBrowserHelper._VCSAddTree" ID="VcsProjectBrowserHelper._VCSAddTree"></a> |
|
198 <h4>VcsProjectBrowserHelper._VCSAddTree</h4> |
|
199 <b>_VCSAddTree</b>(<i></i>) |
|
200 |
|
201 <p> |
|
202 Protected slot called by the context menu. |
|
203 </p> |
|
204 <p> |
|
205 It is used to add the selected |
|
206 directory tree to the VCS repository. |
|
207 </p> |
|
208 <a NAME="VcsProjectBrowserHelper._VCSCommit" ID="VcsProjectBrowserHelper._VCSCommit"></a> |
|
209 <h4>VcsProjectBrowserHelper._VCSCommit</h4> |
|
210 <b>_VCSCommit</b>(<i></i>) |
|
211 |
|
212 <p> |
|
213 Protected slot called by the context menu to commit the changes to the |
|
214 VCS repository. |
|
215 </p> |
|
216 <a NAME="VcsProjectBrowserHelper._VCSDiff" ID="VcsProjectBrowserHelper._VCSDiff"></a> |
|
217 <h4>VcsProjectBrowserHelper._VCSDiff</h4> |
|
218 <b>_VCSDiff</b>(<i></i>) |
|
219 |
|
220 <p> |
|
221 Protected slot called by the context menu to show the difference of a |
|
222 file/directory to the repository. |
|
223 </p> |
|
224 <a NAME="VcsProjectBrowserHelper._VCSInfoDisplay" ID="VcsProjectBrowserHelper._VCSInfoDisplay"></a> |
|
225 <h4>VcsProjectBrowserHelper._VCSInfoDisplay</h4> |
|
226 <b>_VCSInfoDisplay</b>(<i></i>) |
|
227 |
|
228 <p> |
|
229 Protected slot called to show some vcs information. |
|
230 </p> |
|
231 <a NAME="VcsProjectBrowserHelper._VCSLog" ID="VcsProjectBrowserHelper._VCSLog"></a> |
|
232 <h4>VcsProjectBrowserHelper._VCSLog</h4> |
|
233 <b>_VCSLog</b>(<i></i>) |
|
234 |
|
235 <p> |
|
236 Protected slot called by the context menu to show the VCS log of a |
|
237 file/directory. |
|
238 </p> |
|
239 <a NAME="VcsProjectBrowserHelper._VCSLogBrowser" ID="VcsProjectBrowserHelper._VCSLogBrowser"></a> |
|
240 <h4>VcsProjectBrowserHelper._VCSLogBrowser</h4> |
|
241 <b>_VCSLogBrowser</b>(<i></i>) |
|
242 |
|
243 <p> |
|
244 Protected slot called by the context menu to show the log browser for a |
|
245 file. |
|
246 </p> |
|
247 <a NAME="VcsProjectBrowserHelper._VCSMerge" ID="VcsProjectBrowserHelper._VCSMerge"></a> |
|
248 <h4>VcsProjectBrowserHelper._VCSMerge</h4> |
|
249 <b>_VCSMerge</b>(<i></i>) |
|
250 |
|
251 <p> |
|
252 Protected slot called by the context menu to merge changes into to a |
|
253 file. |
|
254 </p> |
|
255 <a NAME="VcsProjectBrowserHelper._VCSRemove" ID="VcsProjectBrowserHelper._VCSRemove"></a> |
|
256 <h4>VcsProjectBrowserHelper._VCSRemove</h4> |
|
257 <b>_VCSRemove</b>(<i></i>) |
|
258 |
|
259 <p> |
|
260 Protected slot called by the context menu to remove the selected file |
|
261 from the VCS repository. |
|
262 </p> |
|
263 <a NAME="VcsProjectBrowserHelper._VCSRevert" ID="VcsProjectBrowserHelper._VCSRevert"></a> |
|
264 <h4>VcsProjectBrowserHelper._VCSRevert</h4> |
|
265 <b>_VCSRevert</b>(<i></i>) |
|
266 |
|
267 <p> |
|
268 Protected slot called by the context menu to revert changes made to a |
|
269 file. |
|
270 </p> |
|
271 <a NAME="VcsProjectBrowserHelper._VCSStatus" ID="VcsProjectBrowserHelper._VCSStatus"></a> |
|
272 <h4>VcsProjectBrowserHelper._VCSStatus</h4> |
|
273 <b>_VCSStatus</b>(<i></i>) |
|
274 |
|
275 <p> |
|
276 Protected slot called by the context menu to show the status of a file. |
|
277 </p> |
|
278 <a NAME="VcsProjectBrowserHelper._VCSUpdate" ID="VcsProjectBrowserHelper._VCSUpdate"></a> |
|
279 <h4>VcsProjectBrowserHelper._VCSUpdate</h4> |
|
280 <b>_VCSUpdate</b>(<i></i>) |
|
281 |
|
282 <p> |
|
283 Protected slot called by the context menu to update a file from the |
|
284 VCS repository. |
|
285 </p> |
|
286 <a NAME="VcsProjectBrowserHelper._updateVCSStatus" ID="VcsProjectBrowserHelper._updateVCSStatus"></a> |
|
287 <h4>VcsProjectBrowserHelper._updateVCSStatus</h4> |
|
288 <b>_updateVCSStatus</b>(<i>name</i>) |
|
289 |
|
290 <p> |
|
291 Protected method to update the VCS status of an item. |
|
292 </p> |
|
293 <dl> |
|
294 |
|
295 <dt><i>name</i></dt> |
|
296 <dd> |
|
297 filename or directoryname of the item to be updated |
|
298 (string) |
|
299 </dd> |
|
300 </dl> |
|
301 <a NAME="VcsProjectBrowserHelper.addVCSMenus" ID="VcsProjectBrowserHelper.addVCSMenus"></a> |
|
302 <h4>VcsProjectBrowserHelper.addVCSMenus</h4> |
|
303 <b>addVCSMenus</b>(<i>mainMenu, multiMenu, backMenu, dirMenu, dirMultiMenu</i>) |
|
304 |
|
305 <p> |
|
306 Public method to add the VCS entries to the various project browser |
|
307 menus. |
|
308 </p> |
|
309 <dl> |
|
310 |
|
311 <dt><i>mainMenu</i></dt> |
|
312 <dd> |
|
313 reference to the main menu (QPopupMenu) |
|
314 </dd> |
|
315 <dt><i>multiMenu</i></dt> |
|
316 <dd> |
|
317 reference to the multiple selection menu (QPopupMenu) |
|
318 </dd> |
|
319 <dt><i>backMenu</i></dt> |
|
320 <dd> |
|
321 reference to the background menu (QPopupMenu) |
|
322 </dd> |
|
323 <dt><i>dirMenu</i></dt> |
|
324 <dd> |
|
325 reference to the directory menu (QPopupMenu) |
|
326 </dd> |
|
327 <dt><i>dirMultiMenu</i></dt> |
|
328 <dd> |
|
329 reference to the multiple selection directory |
|
330 menu (QPopupMenu) |
|
331 </dd> |
|
332 </dl> |
|
333 <a NAME="VcsProjectBrowserHelper.showContextMenu" ID="VcsProjectBrowserHelper.showContextMenu"></a> |
|
334 <h4>VcsProjectBrowserHelper.showContextMenu</h4> |
|
335 <b>showContextMenu</b>(<i>menu, standardItems</i>) |
|
336 |
|
337 <p> |
|
338 Public slot called before the context menu is shown. |
|
339 </p> |
|
340 <p> |
|
341 It enables/disables the VCS menu entries depending on the overall |
|
342 VCS status and the file status. |
|
343 </p> |
|
344 <dl> |
|
345 |
|
346 <dt><i>menu</i></dt> |
|
347 <dd> |
|
348 reference to the menu to be shown |
|
349 </dd> |
|
350 <dt><i>standardItems</i></dt> |
|
351 <dd> |
|
352 array of standard items that need |
|
353 activation/deactivation depending on the overall VCS status |
|
354 </dd> |
|
355 </dl> |
|
356 <dl> |
|
357 |
|
358 <dt>Raises <b>RuntimeError</b>:</dt> |
|
359 <dd> |
|
360 to indicate that this method must be |
|
361 implemented by a subclass |
|
362 </dd> |
|
363 </dl> |
|
364 <a NAME="VcsProjectBrowserHelper.showContextMenuDir" ID="VcsProjectBrowserHelper.showContextMenuDir"></a> |
|
365 <h4>VcsProjectBrowserHelper.showContextMenuDir</h4> |
|
366 <b>showContextMenuDir</b>(<i>menu, standardItems</i>) |
|
367 |
|
368 <p> |
|
369 Public slot called before the context menu is shown. |
|
370 </p> |
|
371 <p> |
|
372 It enables/disables the VCS menu entries depending on the overall |
|
373 VCS status and the directory status. |
|
374 </p> |
|
375 <dl> |
|
376 |
|
377 <dt><i>menu</i></dt> |
|
378 <dd> |
|
379 reference to the menu to be shown |
|
380 </dd> |
|
381 <dt><i>standardItems</i></dt> |
|
382 <dd> |
|
383 array of standard items that |
|
384 need activation/deactivation depending on the overall VCS status |
|
385 </dd> |
|
386 </dl> |
|
387 <dl> |
|
388 |
|
389 <dt>Raises <b>RuntimeError</b>:</dt> |
|
390 <dd> |
|
391 to indicate that this method must be |
|
392 implemented by a subclass |
|
393 </dd> |
|
394 </dl> |
|
395 <a NAME="VcsProjectBrowserHelper.showContextMenuDirMulti" ID="VcsProjectBrowserHelper.showContextMenuDirMulti"></a> |
|
396 <h4>VcsProjectBrowserHelper.showContextMenuDirMulti</h4> |
|
397 <b>showContextMenuDirMulti</b>(<i>menu, standardItems</i>) |
|
398 |
|
399 <p> |
|
400 Public slot called before the context menu is shown. |
|
401 </p> |
|
402 <p> |
|
403 It enables/disables the VCS menu entries depending on the overall |
|
404 VCS status and the directory status. |
|
405 </p> |
|
406 <dl> |
|
407 |
|
408 <dt><i>menu</i></dt> |
|
409 <dd> |
|
410 reference to the menu to be shown |
|
411 </dd> |
|
412 <dt><i>standardItems</i></dt> |
|
413 <dd> |
|
414 array of standard items that need |
|
415 activation/deactivation depending on the overall VCS status |
|
416 </dd> |
|
417 </dl> |
|
418 <dl> |
|
419 |
|
420 <dt>Raises <b>RuntimeError</b>:</dt> |
|
421 <dd> |
|
422 to indicate that this method must be |
|
423 implemented by a subclass |
|
424 </dd> |
|
425 </dl> |
|
426 <a NAME="VcsProjectBrowserHelper.showContextMenuMulti" ID="VcsProjectBrowserHelper.showContextMenuMulti"></a> |
|
427 <h4>VcsProjectBrowserHelper.showContextMenuMulti</h4> |
|
428 <b>showContextMenuMulti</b>(<i>menu, standardItems</i>) |
|
429 |
|
430 <p> |
|
431 Public slot called before the context menu (multiple selections) is |
|
432 shown. |
|
433 </p> |
|
434 <p> |
|
435 It enables/disables the VCS menu entries depending on the overall |
|
436 VCS status and the files status. |
|
437 </p> |
|
438 <dl> |
|
439 |
|
440 <dt><i>menu</i></dt> |
|
441 <dd> |
|
442 reference to the menu to be shown |
|
443 </dd> |
|
444 <dt><i>standardItems</i></dt> |
|
445 <dd> |
|
446 array of standard items that need |
|
447 activation/deactivation depending on the overall VCS status |
|
448 </dd> |
|
449 </dl> |
|
450 <dl> |
|
451 |
|
452 <dt>Raises <b>RuntimeError</b>:</dt> |
|
453 <dd> |
|
454 to indicate that this method must be |
|
455 implemented by a subclass |
|
456 </dd> |
|
457 </dl> |
|
458 <div align="right"><a href="#top">Up</a></div> |
|
459 <hr /> |
|
460 </body></html> |