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