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