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