|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric6.Plugins.VcsPlugins.vcsGit.GitStashBrowserDialog</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.GitStashBrowserDialog</h1> |
|
23 <p> |
|
24 Module implementing a dialog to show the stashes. |
|
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="#GitStashBrowserDialog">GitStashBrowserDialog</a></td> |
|
34 <td>Class implementing a dialog to show the stashes.</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="GitStashBrowserDialog" ID="GitStashBrowserDialog"></a> |
|
43 <h2>GitStashBrowserDialog</h2> |
|
44 <p> |
|
45 Class implementing a dialog to show the stashes. |
|
46 </p> |
|
47 <h3>Derived from</h3> |
|
48 QWidget, Ui_GitStashBrowserDialog |
|
49 <h3>Class Attributes</h3> |
|
50 <table> |
|
51 <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> |
|
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="#GitStashBrowserDialog.__init__">GitStashBrowserDialog</a></td> |
|
61 <td>Constructor</td> |
|
62 </tr><tr> |
|
63 <td><a href="#GitStashBrowserDialog.__apply">__apply</a></td> |
|
64 <td>Private slot to apply the selected stash but keep it.</td> |
|
65 </tr><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><tr> |
|
69 <td><a href="#GitStashBrowserDialog.__clear">__clear</a></td> |
|
70 <td>Private slot to delete all stashes.</td> |
|
71 </tr><tr> |
|
72 <td><a href="#GitStashBrowserDialog.__drop">__drop</a></td> |
|
73 <td>Private slot to delete the selected stash.</td> |
|
74 </tr><tr> |
|
75 <td><a href="#GitStashBrowserDialog.__finish">__finish</a></td> |
|
76 <td>Private slot called when the process finished or the user pressed the button.</td> |
|
77 </tr><tr> |
|
78 <td><a href="#GitStashBrowserDialog.__generateStashEntry">__generateStashEntry</a></td> |
|
79 <td>Private method to generate the stash items.</td> |
|
80 </tr><tr> |
|
81 <td><a href="#GitStashBrowserDialog.__getStashEntries">__getStashEntries</a></td> |
|
82 <td>Private method to retrieve the list of stashes.</td> |
|
83 </tr><tr> |
|
84 <td><a href="#GitStashBrowserDialog.__pop">__pop</a></td> |
|
85 <td>Private slot to apply the selected stash and delete it.</td> |
|
86 </tr><tr> |
|
87 <td><a href="#GitStashBrowserDialog.__procFinished">__procFinished</a></td> |
|
88 <td>Private slot connected to the finished signal.</td> |
|
89 </tr><tr> |
|
90 <td><a href="#GitStashBrowserDialog.__processBuffer">__processBuffer</a></td> |
|
91 <td>Private method to process the buffered output of the git stash command.</td> |
|
92 </tr><tr> |
|
93 <td><a href="#GitStashBrowserDialog.__readStderr">__readStderr</a></td> |
|
94 <td>Private slot to handle the readyReadStandardError signal.</td> |
|
95 </tr><tr> |
|
96 <td><a href="#GitStashBrowserDialog.__readStdout">__readStdout</a></td> |
|
97 <td>Private slot to handle the readyReadStandardOutput signal.</td> |
|
98 </tr><tr> |
|
99 <td><a href="#GitStashBrowserDialog.__resetUI">__resetUI</a></td> |
|
100 <td>Private method to reset the user interface.</td> |
|
101 </tr><tr> |
|
102 <td><a href="#GitStashBrowserDialog.__resizeColumnsStashes">__resizeColumnsStashes</a></td> |
|
103 <td>Private method to resize the shelve list columns.</td> |
|
104 </tr><tr> |
|
105 <td><a href="#GitStashBrowserDialog.__showPatch">__showPatch</a></td> |
|
106 <td>Private slot to show the contents of the selected stash.</td> |
|
107 </tr><tr> |
|
108 <td><a href="#GitStashBrowserDialog.closeEvent">closeEvent</a></td> |
|
109 <td>Protected slot implementing a close event handler.</td> |
|
110 </tr><tr> |
|
111 <td><a href="#GitStashBrowserDialog.keyPressEvent">keyPressEvent</a></td> |
|
112 <td>Protected slot to handle a key press event.</td> |
|
113 </tr><tr> |
|
114 <td><a href="#GitStashBrowserDialog.on_buttonBox_clicked">on_buttonBox_clicked</a></td> |
|
115 <td>Private slot called by a button of the button box clicked.</td> |
|
116 </tr><tr> |
|
117 <td><a href="#GitStashBrowserDialog.on_input_returnPressed">on_input_returnPressed</a></td> |
|
118 <td>Private slot to handle the press of the return key in the input field.</td> |
|
119 </tr><tr> |
|
120 <td><a href="#GitStashBrowserDialog.on_passwordCheckBox_toggled">on_passwordCheckBox_toggled</a></td> |
|
121 <td>Private slot to handle the password checkbox toggled.</td> |
|
122 </tr><tr> |
|
123 <td><a href="#GitStashBrowserDialog.on_refreshButton_clicked">on_refreshButton_clicked</a></td> |
|
124 <td>Private slot to refresh the list of shelves.</td> |
|
125 </tr><tr> |
|
126 <td><a href="#GitStashBrowserDialog.on_sendButton_clicked">on_sendButton_clicked</a></td> |
|
127 <td>Private slot to send the input to the git process.</td> |
|
128 </tr><tr> |
|
129 <td><a href="#GitStashBrowserDialog.on_stashList_currentItemChanged">on_stashList_currentItemChanged</a></td> |
|
130 <td>Private slot called, when the current item of the stash list changes.</td> |
|
131 </tr><tr> |
|
132 <td><a href="#GitStashBrowserDialog.on_stashList_customContextMenuRequested">on_stashList_customContextMenuRequested</a></td> |
|
133 <td>Private slot to show the context menu of the stash list.</td> |
|
134 </tr><tr> |
|
135 <td><a href="#GitStashBrowserDialog.show">show</a></td> |
|
136 <td>Public slot to show the dialog.</td> |
|
137 </tr><tr> |
|
138 <td><a href="#GitStashBrowserDialog.start">start</a></td> |
|
139 <td>Public slot to start the git stash command.</td> |
|
140 </tr> |
|
141 </table> |
|
142 <h3>Static Methods</h3> |
|
143 <table> |
|
144 <tr><td>None</td></tr> |
|
145 </table> |
|
146 <a NAME="GitStashBrowserDialog.__init__" ID="GitStashBrowserDialog.__init__"></a> |
|
147 <h4>GitStashBrowserDialog (Constructor)</h4> |
|
148 <b>GitStashBrowserDialog</b>(<i>vcs, parent=None</i>) |
|
149 <p> |
|
150 Constructor |
|
151 </p><dl> |
|
152 <dt><i>vcs</i></dt> |
|
153 <dd> |
|
154 reference to the vcs object |
|
155 </dd><dt><i>parent</i></dt> |
|
156 <dd> |
|
157 reference to the parent widget (QWidget) |
|
158 </dd> |
|
159 </dl><a NAME="GitStashBrowserDialog.__apply" ID="GitStashBrowserDialog.__apply"></a> |
|
160 <h4>GitStashBrowserDialog.__apply</h4> |
|
161 <b>__apply</b>(<i></i>) |
|
162 <p> |
|
163 Private slot to apply the selected stash but keep it. |
|
164 </p><a NAME="GitStashBrowserDialog.__branch" ID="GitStashBrowserDialog.__branch"></a> |
|
165 <h4>GitStashBrowserDialog.__branch</h4> |
|
166 <b>__branch</b>(<i></i>) |
|
167 <p> |
|
168 Private slot to create a branch from the selected stash. |
|
169 </p><a NAME="GitStashBrowserDialog.__clear" ID="GitStashBrowserDialog.__clear"></a> |
|
170 <h4>GitStashBrowserDialog.__clear</h4> |
|
171 <b>__clear</b>(<i></i>) |
|
172 <p> |
|
173 Private slot to delete all stashes. |
|
174 </p><a NAME="GitStashBrowserDialog.__drop" ID="GitStashBrowserDialog.__drop"></a> |
|
175 <h4>GitStashBrowserDialog.__drop</h4> |
|
176 <b>__drop</b>(<i></i>) |
|
177 <p> |
|
178 Private slot to delete the selected stash. |
|
179 </p><a NAME="GitStashBrowserDialog.__finish" ID="GitStashBrowserDialog.__finish"></a> |
|
180 <h4>GitStashBrowserDialog.__finish</h4> |
|
181 <b>__finish</b>(<i></i>) |
|
182 <p> |
|
183 Private slot called when the process finished or the user pressed |
|
184 the button. |
|
185 </p><a NAME="GitStashBrowserDialog.__generateStashEntry" ID="GitStashBrowserDialog.__generateStashEntry"></a> |
|
186 <h4>GitStashBrowserDialog.__generateStashEntry</h4> |
|
187 <b>__generateStashEntry</b>(<i>name, date, message</i>) |
|
188 <p> |
|
189 Private method to generate the stash items. |
|
190 </p><dl> |
|
191 <dt><i>name</i></dt> |
|
192 <dd> |
|
193 name of the stash (string) |
|
194 </dd><dt><i>date</i></dt> |
|
195 <dd> |
|
196 date the stash was created (string) |
|
197 </dd><dt><i>message</i></dt> |
|
198 <dd> |
|
199 stash message (string) |
|
200 </dd> |
|
201 </dl><a NAME="GitStashBrowserDialog.__getStashEntries" ID="GitStashBrowserDialog.__getStashEntries"></a> |
|
202 <h4>GitStashBrowserDialog.__getStashEntries</h4> |
|
203 <b>__getStashEntries</b>(<i></i>) |
|
204 <p> |
|
205 Private method to retrieve the list of stashes. |
|
206 </p><a NAME="GitStashBrowserDialog.__pop" ID="GitStashBrowserDialog.__pop"></a> |
|
207 <h4>GitStashBrowserDialog.__pop</h4> |
|
208 <b>__pop</b>(<i></i>) |
|
209 <p> |
|
210 Private slot to apply the selected stash and delete it. |
|
211 </p><a NAME="GitStashBrowserDialog.__procFinished" ID="GitStashBrowserDialog.__procFinished"></a> |
|
212 <h4>GitStashBrowserDialog.__procFinished</h4> |
|
213 <b>__procFinished</b>(<i>exitCode, exitStatus</i>) |
|
214 <p> |
|
215 Private slot connected to the finished signal. |
|
216 </p><dl> |
|
217 <dt><i>exitCode</i></dt> |
|
218 <dd> |
|
219 exit code of the process (integer) |
|
220 </dd><dt><i>exitStatus</i></dt> |
|
221 <dd> |
|
222 exit status of the process (QProcess.ExitStatus) |
|
223 </dd> |
|
224 </dl><a NAME="GitStashBrowserDialog.__processBuffer" ID="GitStashBrowserDialog.__processBuffer"></a> |
|
225 <h4>GitStashBrowserDialog.__processBuffer</h4> |
|
226 <b>__processBuffer</b>(<i></i>) |
|
227 <p> |
|
228 Private method to process the buffered output of the git stash command. |
|
229 </p><a NAME="GitStashBrowserDialog.__readStderr" ID="GitStashBrowserDialog.__readStderr"></a> |
|
230 <h4>GitStashBrowserDialog.__readStderr</h4> |
|
231 <b>__readStderr</b>(<i></i>) |
|
232 <p> |
|
233 Private slot to handle the readyReadStandardError signal. |
|
234 </p><p> |
|
235 It reads the error output of the process and inserts it into the |
|
236 error pane. |
|
237 </p><a NAME="GitStashBrowserDialog.__readStdout" ID="GitStashBrowserDialog.__readStdout"></a> |
|
238 <h4>GitStashBrowserDialog.__readStdout</h4> |
|
239 <b>__readStdout</b>(<i></i>) |
|
240 <p> |
|
241 Private slot to handle the readyReadStandardOutput signal. |
|
242 </p><p> |
|
243 It reads the output of the process and inserts it into a buffer. |
|
244 </p><a NAME="GitStashBrowserDialog.__resetUI" ID="GitStashBrowserDialog.__resetUI"></a> |
|
245 <h4>GitStashBrowserDialog.__resetUI</h4> |
|
246 <b>__resetUI</b>(<i></i>) |
|
247 <p> |
|
248 Private method to reset the user interface. |
|
249 </p><a NAME="GitStashBrowserDialog.__resizeColumnsStashes" ID="GitStashBrowserDialog.__resizeColumnsStashes"></a> |
|
250 <h4>GitStashBrowserDialog.__resizeColumnsStashes</h4> |
|
251 <b>__resizeColumnsStashes</b>(<i></i>) |
|
252 <p> |
|
253 Private method to resize the shelve list columns. |
|
254 </p><a NAME="GitStashBrowserDialog.__showPatch" ID="GitStashBrowserDialog.__showPatch"></a> |
|
255 <h4>GitStashBrowserDialog.__showPatch</h4> |
|
256 <b>__showPatch</b>(<i></i>) |
|
257 <p> |
|
258 Private slot to show the contents of the selected stash. |
|
259 </p><a NAME="GitStashBrowserDialog.closeEvent" ID="GitStashBrowserDialog.closeEvent"></a> |
|
260 <h4>GitStashBrowserDialog.closeEvent</h4> |
|
261 <b>closeEvent</b>(<i>e</i>) |
|
262 <p> |
|
263 Protected slot implementing a close event handler. |
|
264 </p><dl> |
|
265 <dt><i>e</i></dt> |
|
266 <dd> |
|
267 close event (QCloseEvent) |
|
268 </dd> |
|
269 </dl><a NAME="GitStashBrowserDialog.keyPressEvent" ID="GitStashBrowserDialog.keyPressEvent"></a> |
|
270 <h4>GitStashBrowserDialog.keyPressEvent</h4> |
|
271 <b>keyPressEvent</b>(<i>evt</i>) |
|
272 <p> |
|
273 Protected slot to handle a key press event. |
|
274 </p><dl> |
|
275 <dt><i>evt</i></dt> |
|
276 <dd> |
|
277 the key press event (QKeyEvent) |
|
278 </dd> |
|
279 </dl><a NAME="GitStashBrowserDialog.on_buttonBox_clicked" ID="GitStashBrowserDialog.on_buttonBox_clicked"></a> |
|
280 <h4>GitStashBrowserDialog.on_buttonBox_clicked</h4> |
|
281 <b>on_buttonBox_clicked</b>(<i>button</i>) |
|
282 <p> |
|
283 Private slot called by a button of the button box clicked. |
|
284 </p><dl> |
|
285 <dt><i>button</i></dt> |
|
286 <dd> |
|
287 button that was clicked (QAbstractButton) |
|
288 </dd> |
|
289 </dl><a NAME="GitStashBrowserDialog.on_input_returnPressed" ID="GitStashBrowserDialog.on_input_returnPressed"></a> |
|
290 <h4>GitStashBrowserDialog.on_input_returnPressed</h4> |
|
291 <b>on_input_returnPressed</b>(<i></i>) |
|
292 <p> |
|
293 Private slot to handle the press of the return key in the input field. |
|
294 </p><a NAME="GitStashBrowserDialog.on_passwordCheckBox_toggled" ID="GitStashBrowserDialog.on_passwordCheckBox_toggled"></a> |
|
295 <h4>GitStashBrowserDialog.on_passwordCheckBox_toggled</h4> |
|
296 <b>on_passwordCheckBox_toggled</b>(<i>checked</i>) |
|
297 <p> |
|
298 Private slot to handle the password checkbox toggled. |
|
299 </p><dl> |
|
300 <dt><i>checked</i></dt> |
|
301 <dd> |
|
302 flag indicating the status of the check box (boolean) |
|
303 </dd> |
|
304 </dl><a NAME="GitStashBrowserDialog.on_refreshButton_clicked" ID="GitStashBrowserDialog.on_refreshButton_clicked"></a> |
|
305 <h4>GitStashBrowserDialog.on_refreshButton_clicked</h4> |
|
306 <b>on_refreshButton_clicked</b>(<i></i>) |
|
307 <p> |
|
308 Private slot to refresh the list of shelves. |
|
309 </p><a NAME="GitStashBrowserDialog.on_sendButton_clicked" ID="GitStashBrowserDialog.on_sendButton_clicked"></a> |
|
310 <h4>GitStashBrowserDialog.on_sendButton_clicked</h4> |
|
311 <b>on_sendButton_clicked</b>(<i></i>) |
|
312 <p> |
|
313 Private slot to send the input to the git process. |
|
314 </p><a NAME="GitStashBrowserDialog.on_stashList_currentItemChanged" ID="GitStashBrowserDialog.on_stashList_currentItemChanged"></a> |
|
315 <h4>GitStashBrowserDialog.on_stashList_currentItemChanged</h4> |
|
316 <b>on_stashList_currentItemChanged</b>(<i>current, previous</i>) |
|
317 <p> |
|
318 Private slot called, when the current item of the stash list changes. |
|
319 </p><dl> |
|
320 <dt><i>current</i></dt> |
|
321 <dd> |
|
322 reference to the new current item (QTreeWidgetItem) |
|
323 </dd><dt><i>previous</i></dt> |
|
324 <dd> |
|
325 reference to the old current item (QTreeWidgetItem) |
|
326 </dd> |
|
327 </dl><a NAME="GitStashBrowserDialog.on_stashList_customContextMenuRequested" ID="GitStashBrowserDialog.on_stashList_customContextMenuRequested"></a> |
|
328 <h4>GitStashBrowserDialog.on_stashList_customContextMenuRequested</h4> |
|
329 <b>on_stashList_customContextMenuRequested</b>(<i>pos</i>) |
|
330 <p> |
|
331 Private slot to show the context menu of the stash list. |
|
332 </p><dl> |
|
333 <dt><i>pos</i></dt> |
|
334 <dd> |
|
335 position of the mouse pointer (QPoint) |
|
336 </dd> |
|
337 </dl><a NAME="GitStashBrowserDialog.show" ID="GitStashBrowserDialog.show"></a> |
|
338 <h4>GitStashBrowserDialog.show</h4> |
|
339 <b>show</b>(<i></i>) |
|
340 <p> |
|
341 Public slot to show the dialog. |
|
342 </p><a NAME="GitStashBrowserDialog.start" ID="GitStashBrowserDialog.start"></a> |
|
343 <h4>GitStashBrowserDialog.start</h4> |
|
344 <b>start</b>(<i>projectDir</i>) |
|
345 <p> |
|
346 Public slot to start the git stash command. |
|
347 </p><dl> |
|
348 <dt><i>projectDir</i></dt> |
|
349 <dd> |
|
350 name of the project directory (string) |
|
351 </dd> |
|
352 </dl> |
|
353 <div align="right"><a href="#top">Up</a></div> |
|
354 <hr /> |
|
355 </body></html> |