|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric7.Plugins.VcsPlugins.vcsGit.GitStashBrowserDialog</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.vcsGit.GitStashBrowserDialog</h1> |
|
10 |
|
11 <p> |
|
12 Module implementing a dialog to show the stashes. |
|
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="#GitStashBrowserDialog">GitStashBrowserDialog</a></td> |
|
25 <td>Class implementing a dialog to show the stashes.</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="GitStashBrowserDialog" ID="GitStashBrowserDialog"></a> |
|
36 <h2>GitStashBrowserDialog</h2> |
|
37 |
|
38 <p> |
|
39 Class implementing a dialog to show the stashes. |
|
40 </p> |
|
41 <h3>Derived from</h3> |
|
42 QWidget, Ui_GitStashBrowserDialog |
|
43 <h3>Class Attributes</h3> |
|
44 |
|
45 <table> |
|
46 <tr><td>DateColumn</td></tr><tr><td>FileStatisticsRole</td></tr><tr><td>MessageColumn</td></tr><tr><td>NameColumn</td></tr><tr><td>Separator</td></tr><tr><td>TotalStatisticsRole</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="#GitStashBrowserDialog.__init__">GitStashBrowserDialog</a></td> |
|
59 <td>Constructor</td> |
|
60 </tr> |
|
61 <tr> |
|
62 <td><a href="#GitStashBrowserDialog.__apply">__apply</a></td> |
|
63 <td>Private slot to apply the selected stash but keep it.</td> |
|
64 </tr> |
|
65 <tr> |
|
66 <td><a href="#GitStashBrowserDialog.__branch">__branch</a></td> |
|
67 <td>Private slot to create a branch from the selected stash.</td> |
|
68 </tr> |
|
69 <tr> |
|
70 <td><a href="#GitStashBrowserDialog.__clear">__clear</a></td> |
|
71 <td>Private slot to delete all stashes.</td> |
|
72 </tr> |
|
73 <tr> |
|
74 <td><a href="#GitStashBrowserDialog.__drop">__drop</a></td> |
|
75 <td>Private slot to delete the selected stash.</td> |
|
76 </tr> |
|
77 <tr> |
|
78 <td><a href="#GitStashBrowserDialog.__finish">__finish</a></td> |
|
79 <td>Private slot called when the process finished or the user pressed the button.</td> |
|
80 </tr> |
|
81 <tr> |
|
82 <td><a href="#GitStashBrowserDialog.__generateStashEntry">__generateStashEntry</a></td> |
|
83 <td>Private method to generate the stash items.</td> |
|
84 </tr> |
|
85 <tr> |
|
86 <td><a href="#GitStashBrowserDialog.__getStashEntries">__getStashEntries</a></td> |
|
87 <td>Private method to retrieve the list of stashes.</td> |
|
88 </tr> |
|
89 <tr> |
|
90 <td><a href="#GitStashBrowserDialog.__pop">__pop</a></td> |
|
91 <td>Private slot to apply the selected stash and delete it.</td> |
|
92 </tr> |
|
93 <tr> |
|
94 <td><a href="#GitStashBrowserDialog.__procFinished">__procFinished</a></td> |
|
95 <td>Private slot connected to the finished signal.</td> |
|
96 </tr> |
|
97 <tr> |
|
98 <td><a href="#GitStashBrowserDialog.__processBuffer">__processBuffer</a></td> |
|
99 <td>Private method to process the buffered output of the git stash command.</td> |
|
100 </tr> |
|
101 <tr> |
|
102 <td><a href="#GitStashBrowserDialog.__readStderr">__readStderr</a></td> |
|
103 <td>Private slot to handle the readyReadStandardError signal.</td> |
|
104 </tr> |
|
105 <tr> |
|
106 <td><a href="#GitStashBrowserDialog.__readStdout">__readStdout</a></td> |
|
107 <td>Private slot to handle the readyReadStandardOutput signal.</td> |
|
108 </tr> |
|
109 <tr> |
|
110 <td><a href="#GitStashBrowserDialog.__resetUI">__resetUI</a></td> |
|
111 <td>Private method to reset the user interface.</td> |
|
112 </tr> |
|
113 <tr> |
|
114 <td><a href="#GitStashBrowserDialog.__resizeColumnsStashes">__resizeColumnsStashes</a></td> |
|
115 <td>Private method to resize the shelve list columns.</td> |
|
116 </tr> |
|
117 <tr> |
|
118 <td><a href="#GitStashBrowserDialog.__showPatch">__showPatch</a></td> |
|
119 <td>Private slot to show the contents of the selected stash.</td> |
|
120 </tr> |
|
121 <tr> |
|
122 <td><a href="#GitStashBrowserDialog.closeEvent">closeEvent</a></td> |
|
123 <td>Protected slot implementing a close event handler.</td> |
|
124 </tr> |
|
125 <tr> |
|
126 <td><a href="#GitStashBrowserDialog.keyPressEvent">keyPressEvent</a></td> |
|
127 <td>Protected slot to handle a key press event.</td> |
|
128 </tr> |
|
129 <tr> |
|
130 <td><a href="#GitStashBrowserDialog.on_buttonBox_clicked">on_buttonBox_clicked</a></td> |
|
131 <td>Private slot called by a button of the button box clicked.</td> |
|
132 </tr> |
|
133 <tr> |
|
134 <td><a href="#GitStashBrowserDialog.on_input_returnPressed">on_input_returnPressed</a></td> |
|
135 <td>Private slot to handle the press of the return key in the input field.</td> |
|
136 </tr> |
|
137 <tr> |
|
138 <td><a href="#GitStashBrowserDialog.on_passwordCheckBox_toggled">on_passwordCheckBox_toggled</a></td> |
|
139 <td>Private slot to handle the password checkbox toggled.</td> |
|
140 </tr> |
|
141 <tr> |
|
142 <td><a href="#GitStashBrowserDialog.on_refreshButton_clicked">on_refreshButton_clicked</a></td> |
|
143 <td>Private slot to refresh the list of shelves.</td> |
|
144 </tr> |
|
145 <tr> |
|
146 <td><a href="#GitStashBrowserDialog.on_sendButton_clicked">on_sendButton_clicked</a></td> |
|
147 <td>Private slot to send the input to the git process.</td> |
|
148 </tr> |
|
149 <tr> |
|
150 <td><a href="#GitStashBrowserDialog.on_stashList_currentItemChanged">on_stashList_currentItemChanged</a></td> |
|
151 <td>Private slot called, when the current item of the stash list changes.</td> |
|
152 </tr> |
|
153 <tr> |
|
154 <td><a href="#GitStashBrowserDialog.on_stashList_customContextMenuRequested">on_stashList_customContextMenuRequested</a></td> |
|
155 <td>Private slot to show the context menu of the stash list.</td> |
|
156 </tr> |
|
157 <tr> |
|
158 <td><a href="#GitStashBrowserDialog.show">show</a></td> |
|
159 <td>Public slot to show the dialog.</td> |
|
160 </tr> |
|
161 <tr> |
|
162 <td><a href="#GitStashBrowserDialog.start">start</a></td> |
|
163 <td>Public slot to start the git stash command.</td> |
|
164 </tr> |
|
165 </table> |
|
166 <h3>Static Methods</h3> |
|
167 |
|
168 <table> |
|
169 <tr><td>None</td></tr> |
|
170 </table> |
|
171 |
|
172 <a NAME="GitStashBrowserDialog.__init__" ID="GitStashBrowserDialog.__init__"></a> |
|
173 <h4>GitStashBrowserDialog (Constructor)</h4> |
|
174 <b>GitStashBrowserDialog</b>(<i>vcs, parent=None</i>) |
|
175 |
|
176 <p> |
|
177 Constructor |
|
178 </p> |
|
179 <dl> |
|
180 |
|
181 <dt><i>vcs</i></dt> |
|
182 <dd> |
|
183 reference to the vcs object |
|
184 </dd> |
|
185 <dt><i>parent</i></dt> |
|
186 <dd> |
|
187 reference to the parent widget (QWidget) |
|
188 </dd> |
|
189 </dl> |
|
190 <a NAME="GitStashBrowserDialog.__apply" ID="GitStashBrowserDialog.__apply"></a> |
|
191 <h4>GitStashBrowserDialog.__apply</h4> |
|
192 <b>__apply</b>(<i></i>) |
|
193 |
|
194 <p> |
|
195 Private slot to apply the selected stash but keep it. |
|
196 </p> |
|
197 <a NAME="GitStashBrowserDialog.__branch" ID="GitStashBrowserDialog.__branch"></a> |
|
198 <h4>GitStashBrowserDialog.__branch</h4> |
|
199 <b>__branch</b>(<i></i>) |
|
200 |
|
201 <p> |
|
202 Private slot to create a branch from the selected stash. |
|
203 </p> |
|
204 <a NAME="GitStashBrowserDialog.__clear" ID="GitStashBrowserDialog.__clear"></a> |
|
205 <h4>GitStashBrowserDialog.__clear</h4> |
|
206 <b>__clear</b>(<i></i>) |
|
207 |
|
208 <p> |
|
209 Private slot to delete all stashes. |
|
210 </p> |
|
211 <a NAME="GitStashBrowserDialog.__drop" ID="GitStashBrowserDialog.__drop"></a> |
|
212 <h4>GitStashBrowserDialog.__drop</h4> |
|
213 <b>__drop</b>(<i></i>) |
|
214 |
|
215 <p> |
|
216 Private slot to delete the selected stash. |
|
217 </p> |
|
218 <a NAME="GitStashBrowserDialog.__finish" ID="GitStashBrowserDialog.__finish"></a> |
|
219 <h4>GitStashBrowserDialog.__finish</h4> |
|
220 <b>__finish</b>(<i></i>) |
|
221 |
|
222 <p> |
|
223 Private slot called when the process finished or the user pressed |
|
224 the button. |
|
225 </p> |
|
226 <a NAME="GitStashBrowserDialog.__generateStashEntry" ID="GitStashBrowserDialog.__generateStashEntry"></a> |
|
227 <h4>GitStashBrowserDialog.__generateStashEntry</h4> |
|
228 <b>__generateStashEntry</b>(<i>name, date, message</i>) |
|
229 |
|
230 <p> |
|
231 Private method to generate the stash items. |
|
232 </p> |
|
233 <dl> |
|
234 |
|
235 <dt><i>name</i></dt> |
|
236 <dd> |
|
237 name of the stash (string) |
|
238 </dd> |
|
239 <dt><i>date</i></dt> |
|
240 <dd> |
|
241 date the stash was created (string) |
|
242 </dd> |
|
243 <dt><i>message</i></dt> |
|
244 <dd> |
|
245 stash message (string) |
|
246 </dd> |
|
247 </dl> |
|
248 <a NAME="GitStashBrowserDialog.__getStashEntries" ID="GitStashBrowserDialog.__getStashEntries"></a> |
|
249 <h4>GitStashBrowserDialog.__getStashEntries</h4> |
|
250 <b>__getStashEntries</b>(<i></i>) |
|
251 |
|
252 <p> |
|
253 Private method to retrieve the list of stashes. |
|
254 </p> |
|
255 <a NAME="GitStashBrowserDialog.__pop" ID="GitStashBrowserDialog.__pop"></a> |
|
256 <h4>GitStashBrowserDialog.__pop</h4> |
|
257 <b>__pop</b>(<i></i>) |
|
258 |
|
259 <p> |
|
260 Private slot to apply the selected stash and delete it. |
|
261 </p> |
|
262 <a NAME="GitStashBrowserDialog.__procFinished" ID="GitStashBrowserDialog.__procFinished"></a> |
|
263 <h4>GitStashBrowserDialog.__procFinished</h4> |
|
264 <b>__procFinished</b>(<i>exitCode, exitStatus</i>) |
|
265 |
|
266 <p> |
|
267 Private slot connected to the finished signal. |
|
268 </p> |
|
269 <dl> |
|
270 |
|
271 <dt><i>exitCode</i></dt> |
|
272 <dd> |
|
273 exit code of the process (integer) |
|
274 </dd> |
|
275 <dt><i>exitStatus</i></dt> |
|
276 <dd> |
|
277 exit status of the process (QProcess.ExitStatus) |
|
278 </dd> |
|
279 </dl> |
|
280 <a NAME="GitStashBrowserDialog.__processBuffer" ID="GitStashBrowserDialog.__processBuffer"></a> |
|
281 <h4>GitStashBrowserDialog.__processBuffer</h4> |
|
282 <b>__processBuffer</b>(<i></i>) |
|
283 |
|
284 <p> |
|
285 Private method to process the buffered output of the git stash command. |
|
286 </p> |
|
287 <a NAME="GitStashBrowserDialog.__readStderr" ID="GitStashBrowserDialog.__readStderr"></a> |
|
288 <h4>GitStashBrowserDialog.__readStderr</h4> |
|
289 <b>__readStderr</b>(<i></i>) |
|
290 |
|
291 <p> |
|
292 Private slot to handle the readyReadStandardError signal. |
|
293 </p> |
|
294 <p> |
|
295 It reads the error output of the process and inserts it into the |
|
296 error pane. |
|
297 </p> |
|
298 <a NAME="GitStashBrowserDialog.__readStdout" ID="GitStashBrowserDialog.__readStdout"></a> |
|
299 <h4>GitStashBrowserDialog.__readStdout</h4> |
|
300 <b>__readStdout</b>(<i></i>) |
|
301 |
|
302 <p> |
|
303 Private slot to handle the readyReadStandardOutput signal. |
|
304 </p> |
|
305 <p> |
|
306 It reads the output of the process and inserts it into a buffer. |
|
307 </p> |
|
308 <a NAME="GitStashBrowserDialog.__resetUI" ID="GitStashBrowserDialog.__resetUI"></a> |
|
309 <h4>GitStashBrowserDialog.__resetUI</h4> |
|
310 <b>__resetUI</b>(<i></i>) |
|
311 |
|
312 <p> |
|
313 Private method to reset the user interface. |
|
314 </p> |
|
315 <a NAME="GitStashBrowserDialog.__resizeColumnsStashes" ID="GitStashBrowserDialog.__resizeColumnsStashes"></a> |
|
316 <h4>GitStashBrowserDialog.__resizeColumnsStashes</h4> |
|
317 <b>__resizeColumnsStashes</b>(<i></i>) |
|
318 |
|
319 <p> |
|
320 Private method to resize the shelve list columns. |
|
321 </p> |
|
322 <a NAME="GitStashBrowserDialog.__showPatch" ID="GitStashBrowserDialog.__showPatch"></a> |
|
323 <h4>GitStashBrowserDialog.__showPatch</h4> |
|
324 <b>__showPatch</b>(<i></i>) |
|
325 |
|
326 <p> |
|
327 Private slot to show the contents of the selected stash. |
|
328 </p> |
|
329 <a NAME="GitStashBrowserDialog.closeEvent" ID="GitStashBrowserDialog.closeEvent"></a> |
|
330 <h4>GitStashBrowserDialog.closeEvent</h4> |
|
331 <b>closeEvent</b>(<i>e</i>) |
|
332 |
|
333 <p> |
|
334 Protected slot implementing a close event handler. |
|
335 </p> |
|
336 <dl> |
|
337 |
|
338 <dt><i>e</i></dt> |
|
339 <dd> |
|
340 close event (QCloseEvent) |
|
341 </dd> |
|
342 </dl> |
|
343 <a NAME="GitStashBrowserDialog.keyPressEvent" ID="GitStashBrowserDialog.keyPressEvent"></a> |
|
344 <h4>GitStashBrowserDialog.keyPressEvent</h4> |
|
345 <b>keyPressEvent</b>(<i>evt</i>) |
|
346 |
|
347 <p> |
|
348 Protected slot to handle a key press event. |
|
349 </p> |
|
350 <dl> |
|
351 |
|
352 <dt><i>evt</i></dt> |
|
353 <dd> |
|
354 the key press event (QKeyEvent) |
|
355 </dd> |
|
356 </dl> |
|
357 <a NAME="GitStashBrowserDialog.on_buttonBox_clicked" ID="GitStashBrowserDialog.on_buttonBox_clicked"></a> |
|
358 <h4>GitStashBrowserDialog.on_buttonBox_clicked</h4> |
|
359 <b>on_buttonBox_clicked</b>(<i>button</i>) |
|
360 |
|
361 <p> |
|
362 Private slot called by a button of the button box clicked. |
|
363 </p> |
|
364 <dl> |
|
365 |
|
366 <dt><i>button</i></dt> |
|
367 <dd> |
|
368 button that was clicked (QAbstractButton) |
|
369 </dd> |
|
370 </dl> |
|
371 <a NAME="GitStashBrowserDialog.on_input_returnPressed" ID="GitStashBrowserDialog.on_input_returnPressed"></a> |
|
372 <h4>GitStashBrowserDialog.on_input_returnPressed</h4> |
|
373 <b>on_input_returnPressed</b>(<i></i>) |
|
374 |
|
375 <p> |
|
376 Private slot to handle the press of the return key in the input field. |
|
377 </p> |
|
378 <a NAME="GitStashBrowserDialog.on_passwordCheckBox_toggled" ID="GitStashBrowserDialog.on_passwordCheckBox_toggled"></a> |
|
379 <h4>GitStashBrowserDialog.on_passwordCheckBox_toggled</h4> |
|
380 <b>on_passwordCheckBox_toggled</b>(<i>checked</i>) |
|
381 |
|
382 <p> |
|
383 Private slot to handle the password checkbox toggled. |
|
384 </p> |
|
385 <dl> |
|
386 |
|
387 <dt><i>checked</i></dt> |
|
388 <dd> |
|
389 flag indicating the status of the check box (boolean) |
|
390 </dd> |
|
391 </dl> |
|
392 <a NAME="GitStashBrowserDialog.on_refreshButton_clicked" ID="GitStashBrowserDialog.on_refreshButton_clicked"></a> |
|
393 <h4>GitStashBrowserDialog.on_refreshButton_clicked</h4> |
|
394 <b>on_refreshButton_clicked</b>(<i></i>) |
|
395 |
|
396 <p> |
|
397 Private slot to refresh the list of shelves. |
|
398 </p> |
|
399 <a NAME="GitStashBrowserDialog.on_sendButton_clicked" ID="GitStashBrowserDialog.on_sendButton_clicked"></a> |
|
400 <h4>GitStashBrowserDialog.on_sendButton_clicked</h4> |
|
401 <b>on_sendButton_clicked</b>(<i></i>) |
|
402 |
|
403 <p> |
|
404 Private slot to send the input to the git process. |
|
405 </p> |
|
406 <a NAME="GitStashBrowserDialog.on_stashList_currentItemChanged" ID="GitStashBrowserDialog.on_stashList_currentItemChanged"></a> |
|
407 <h4>GitStashBrowserDialog.on_stashList_currentItemChanged</h4> |
|
408 <b>on_stashList_currentItemChanged</b>(<i>current, previous</i>) |
|
409 |
|
410 <p> |
|
411 Private slot called, when the current item of the stash list changes. |
|
412 </p> |
|
413 <dl> |
|
414 |
|
415 <dt><i>current</i></dt> |
|
416 <dd> |
|
417 reference to the new current item (QTreeWidgetItem) |
|
418 </dd> |
|
419 <dt><i>previous</i></dt> |
|
420 <dd> |
|
421 reference to the old current item (QTreeWidgetItem) |
|
422 </dd> |
|
423 </dl> |
|
424 <a NAME="GitStashBrowserDialog.on_stashList_customContextMenuRequested" ID="GitStashBrowserDialog.on_stashList_customContextMenuRequested"></a> |
|
425 <h4>GitStashBrowserDialog.on_stashList_customContextMenuRequested</h4> |
|
426 <b>on_stashList_customContextMenuRequested</b>(<i>pos</i>) |
|
427 |
|
428 <p> |
|
429 Private slot to show the context menu of the stash list. |
|
430 </p> |
|
431 <dl> |
|
432 |
|
433 <dt><i>pos</i></dt> |
|
434 <dd> |
|
435 position of the mouse pointer (QPoint) |
|
436 </dd> |
|
437 </dl> |
|
438 <a NAME="GitStashBrowserDialog.show" ID="GitStashBrowserDialog.show"></a> |
|
439 <h4>GitStashBrowserDialog.show</h4> |
|
440 <b>show</b>(<i></i>) |
|
441 |
|
442 <p> |
|
443 Public slot to show the dialog. |
|
444 </p> |
|
445 <a NAME="GitStashBrowserDialog.start" ID="GitStashBrowserDialog.start"></a> |
|
446 <h4>GitStashBrowserDialog.start</h4> |
|
447 <b>start</b>(<i>projectDir</i>) |
|
448 |
|
449 <p> |
|
450 Public slot to start the git stash command. |
|
451 </p> |
|
452 <dl> |
|
453 |
|
454 <dt><i>projectDir</i></dt> |
|
455 <dd> |
|
456 name of the project directory (string) |
|
457 </dd> |
|
458 </dl> |
|
459 <div align="right"><a href="#top">Up</a></div> |
|
460 <hr /> |
|
461 </body></html> |