|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric7.Project.ProjectBaseBrowser</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.Project.ProjectBaseBrowser</h1> |
|
10 |
|
11 <p> |
|
12 Module implementing the baseclass for the various project browsers. |
|
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="#ProjectBaseBrowser">ProjectBaseBrowser</a></td> |
|
25 <td>Baseclass implementing common functionality for the various project browsers.</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="ProjectBaseBrowser" ID="ProjectBaseBrowser"></a> |
|
36 <h2>ProjectBaseBrowser</h2> |
|
37 |
|
38 <p> |
|
39 Baseclass implementing common functionality for the various project |
|
40 browsers. |
|
41 </p> |
|
42 <h3>Signals</h3> |
|
43 <dl> |
|
44 |
|
45 <dt>closeSourceWindow(str)</dt> |
|
46 <dd> |
|
47 emitted to close a source file |
|
48 </dd> |
|
49 </dl> |
|
50 <h3>Derived from</h3> |
|
51 Browser |
|
52 <h3>Class Attributes</h3> |
|
53 |
|
54 <table> |
|
55 <tr><td>None</td></tr> |
|
56 </table> |
|
57 <h3>Class Methods</h3> |
|
58 |
|
59 <table> |
|
60 <tr><td>None</td></tr> |
|
61 </table> |
|
62 <h3>Methods</h3> |
|
63 |
|
64 <table> |
|
65 |
|
66 <tr> |
|
67 <td><a href="#ProjectBaseBrowser.__init__">ProjectBaseBrowser</a></td> |
|
68 <td>Constructor</td> |
|
69 </tr> |
|
70 <tr> |
|
71 <td><a href="#ProjectBaseBrowser.__checkHookKey">__checkHookKey</a></td> |
|
72 <td>Private method to check a hook key.</td> |
|
73 </tr> |
|
74 <tr> |
|
75 <td><a href="#ProjectBaseBrowser.__modelRowsInserted">__modelRowsInserted</a></td> |
|
76 <td>Private slot called after rows have been inserted into the model.</td> |
|
77 </tr> |
|
78 <tr> |
|
79 <td><a href="#ProjectBaseBrowser._collapseAllDirs">_collapseAllDirs</a></td> |
|
80 <td>Protected slot to handle the 'Collapse all directories' menu action.</td> |
|
81 </tr> |
|
82 <tr> |
|
83 <td><a href="#ProjectBaseBrowser._completeRepopulateItem">_completeRepopulateItem</a></td> |
|
84 <td>Protected slot to handle the completeRepopulateItem signal.</td> |
|
85 </tr> |
|
86 <tr> |
|
87 <td><a href="#ProjectBaseBrowser._configure">_configure</a></td> |
|
88 <td>Protected method to open the configuration dialog.</td> |
|
89 </tr> |
|
90 <tr> |
|
91 <td><a href="#ProjectBaseBrowser._connectExpandedCollapsed">_connectExpandedCollapsed</a></td> |
|
92 <td>Protected method to connect the expanded and collapsed signals.</td> |
|
93 </tr> |
|
94 <tr> |
|
95 <td><a href="#ProjectBaseBrowser._contextMenuRequested">_contextMenuRequested</a></td> |
|
96 <td>Protected slot to show the context menu.</td> |
|
97 </tr> |
|
98 <tr> |
|
99 <td><a href="#ProjectBaseBrowser._copyToClipboard">_copyToClipboard</a></td> |
|
100 <td>Protected method to copy the path of an entry to the clipboard.</td> |
|
101 </tr> |
|
102 <tr> |
|
103 <td><a href="#ProjectBaseBrowser._createPopupMenus">_createPopupMenus</a></td> |
|
104 <td>Protected overloaded method to generate the popup menus.</td> |
|
105 </tr> |
|
106 <tr> |
|
107 <td><a href="#ProjectBaseBrowser._deleteDirectory">_deleteDirectory</a></td> |
|
108 <td>Protected method to delete the selected directory from the project data area.</td> |
|
109 </tr> |
|
110 <tr> |
|
111 <td><a href="#ProjectBaseBrowser._disconnectExpandedCollapsed">_disconnectExpandedCollapsed</a></td> |
|
112 <td>Protected method to disconnect the expanded and collapsed signals.</td> |
|
113 </tr> |
|
114 <tr> |
|
115 <td><a href="#ProjectBaseBrowser._expandAllDirs">_expandAllDirs</a></td> |
|
116 <td>Protected slot to handle the 'Expand all directories' menu action.</td> |
|
117 </tr> |
|
118 <tr> |
|
119 <td><a href="#ProjectBaseBrowser._initHookMethods">_initHookMethods</a></td> |
|
120 <td>Protected method to initialize the hooks dictionary.</td> |
|
121 </tr> |
|
122 <tr> |
|
123 <td><a href="#ProjectBaseBrowser._initMenusAndVcs">_initMenusAndVcs</a></td> |
|
124 <td>Protected slot to initialize the menus and the Vcs interface.</td> |
|
125 </tr> |
|
126 <tr> |
|
127 <td><a href="#ProjectBaseBrowser._keyboardSearchType">_keyboardSearchType</a></td> |
|
128 <td>Protected method to check, if the item is of the correct type.</td> |
|
129 </tr> |
|
130 <tr> |
|
131 <td><a href="#ProjectBaseBrowser._newProject">_newProject</a></td> |
|
132 <td>Protected slot to handle the newProject signal.</td> |
|
133 </tr> |
|
134 <tr> |
|
135 <td><a href="#ProjectBaseBrowser._prepareRepopulateItem">_prepareRepopulateItem</a></td> |
|
136 <td>Protected slot to handle the prepareRepopulateItem signal.</td> |
|
137 </tr> |
|
138 <tr> |
|
139 <td><a href="#ProjectBaseBrowser._projectClosed">_projectClosed</a></td> |
|
140 <td>Protected slot to handle the projectClosed signal.</td> |
|
141 </tr> |
|
142 <tr> |
|
143 <td><a href="#ProjectBaseBrowser._projectOpened">_projectOpened</a></td> |
|
144 <td>Protected slot to handle the projectOpened signal.</td> |
|
145 </tr> |
|
146 <tr> |
|
147 <td><a href="#ProjectBaseBrowser._removeDir">_removeDir</a></td> |
|
148 <td>Protected method to remove a (single) directory from the project.</td> |
|
149 </tr> |
|
150 <tr> |
|
151 <td><a href="#ProjectBaseBrowser._removeFile">_removeFile</a></td> |
|
152 <td>Protected method to remove a file or files from the project.</td> |
|
153 </tr> |
|
154 <tr> |
|
155 <td><a href="#ProjectBaseBrowser._renameFile">_renameFile</a></td> |
|
156 <td>Protected method to rename a file of the project.</td> |
|
157 </tr> |
|
158 <tr> |
|
159 <td><a href="#ProjectBaseBrowser._selectEntries">_selectEntries</a></td> |
|
160 <td>Protected method to select entries based on their VCS status.</td> |
|
161 </tr> |
|
162 <tr> |
|
163 <td><a href="#ProjectBaseBrowser._selectSingleItem">_selectSingleItem</a></td> |
|
164 <td>Protected method to select a single item.</td> |
|
165 </tr> |
|
166 <tr> |
|
167 <td><a href="#ProjectBaseBrowser._setItemRangeSelected">_setItemRangeSelected</a></td> |
|
168 <td>Protected method to set the selection status of a range of items.</td> |
|
169 </tr> |
|
170 <tr> |
|
171 <td><a href="#ProjectBaseBrowser._setItemSelected">_setItemSelected</a></td> |
|
172 <td>Protected method to set the selection status of an item.</td> |
|
173 </tr> |
|
174 <tr> |
|
175 <td><a href="#ProjectBaseBrowser._showContextMenu">_showContextMenu</a></td> |
|
176 <td>Protected slot called before the context menu is shown.</td> |
|
177 </tr> |
|
178 <tr> |
|
179 <td><a href="#ProjectBaseBrowser._showContextMenuBack">_showContextMenuBack</a></td> |
|
180 <td>Protected slot called before the context menu is shown.</td> |
|
181 </tr> |
|
182 <tr> |
|
183 <td><a href="#ProjectBaseBrowser._showContextMenuDir">_showContextMenuDir</a></td> |
|
184 <td>Protected slot called before the context menu is shown.</td> |
|
185 </tr> |
|
186 <tr> |
|
187 <td><a href="#ProjectBaseBrowser._showContextMenuDirMulti">_showContextMenuDirMulti</a></td> |
|
188 <td>Protected slot called before the context menu is shown.</td> |
|
189 </tr> |
|
190 <tr> |
|
191 <td><a href="#ProjectBaseBrowser._showContextMenuMulti">_showContextMenuMulti</a></td> |
|
192 <td>Protected slot called before the context menu (multiple selections) is shown.</td> |
|
193 </tr> |
|
194 <tr> |
|
195 <td><a href="#ProjectBaseBrowser.addHookMethod">addHookMethod</a></td> |
|
196 <td>Public method to add a hook method to the dictionary.</td> |
|
197 </tr> |
|
198 <tr> |
|
199 <td><a href="#ProjectBaseBrowser.addHookMethodAndMenuEntry">addHookMethodAndMenuEntry</a></td> |
|
200 <td>Public method to add a hook method to the dictionary.</td> |
|
201 </tr> |
|
202 <tr> |
|
203 <td><a href="#ProjectBaseBrowser.currentItem">currentItem</a></td> |
|
204 <td>Public method to get a reference to the current item.</td> |
|
205 </tr> |
|
206 <tr> |
|
207 <td><a href="#ProjectBaseBrowser.expandItemsByName">expandItemsByName</a></td> |
|
208 <td>Public method to expand items given their names.</td> |
|
209 </tr> |
|
210 <tr> |
|
211 <td><a href="#ProjectBaseBrowser.getExpandedItemNames">getExpandedItemNames</a></td> |
|
212 <td>Public method to get the file/directory names of all expanded items.</td> |
|
213 </tr> |
|
214 <tr> |
|
215 <td><a href="#ProjectBaseBrowser.removeHookMethod">removeHookMethod</a></td> |
|
216 <td>Public method to remove a hook method from the dictionary.</td> |
|
217 </tr> |
|
218 <tr> |
|
219 <td><a href="#ProjectBaseBrowser.selectFile">selectFile</a></td> |
|
220 <td>Public method to highlight a node given its filename.</td> |
|
221 </tr> |
|
222 <tr> |
|
223 <td><a href="#ProjectBaseBrowser.selectFileLine">selectFileLine</a></td> |
|
224 <td>Public method to highlight a node given its filename.</td> |
|
225 </tr> |
|
226 <tr> |
|
227 <td><a href="#ProjectBaseBrowser.selectLocalDirEntries">selectLocalDirEntries</a></td> |
|
228 <td>Public slot to handle the select local directories context menu entries.</td> |
|
229 </tr> |
|
230 <tr> |
|
231 <td><a href="#ProjectBaseBrowser.selectLocalEntries">selectLocalEntries</a></td> |
|
232 <td>Public slot to handle the select local files context menu entries.</td> |
|
233 </tr> |
|
234 <tr> |
|
235 <td><a href="#ProjectBaseBrowser.selectVCSDirEntries">selectVCSDirEntries</a></td> |
|
236 <td>Public slot to handle the select VCS directories context menu entries.</td> |
|
237 </tr> |
|
238 <tr> |
|
239 <td><a href="#ProjectBaseBrowser.selectVCSEntries">selectVCSEntries</a></td> |
|
240 <td>Public slot to handle the select VCS files context menu entries.</td> |
|
241 </tr> |
|
242 </table> |
|
243 <h3>Static Methods</h3> |
|
244 |
|
245 <table> |
|
246 <tr><td>None</td></tr> |
|
247 </table> |
|
248 |
|
249 <a NAME="ProjectBaseBrowser.__init__" ID="ProjectBaseBrowser.__init__"></a> |
|
250 <h4>ProjectBaseBrowser (Constructor)</h4> |
|
251 <b>ProjectBaseBrowser</b>(<i>project, type_, parent=None</i>) |
|
252 |
|
253 <p> |
|
254 Constructor |
|
255 </p> |
|
256 <dl> |
|
257 |
|
258 <dt><i>project</i></dt> |
|
259 <dd> |
|
260 reference to the project object |
|
261 </dd> |
|
262 <dt><i>type_</i></dt> |
|
263 <dd> |
|
264 project browser type (string) |
|
265 </dd> |
|
266 <dt><i>parent</i></dt> |
|
267 <dd> |
|
268 parent widget of this browser |
|
269 </dd> |
|
270 </dl> |
|
271 <a NAME="ProjectBaseBrowser.__checkHookKey" ID="ProjectBaseBrowser.__checkHookKey"></a> |
|
272 <h4>ProjectBaseBrowser.__checkHookKey</h4> |
|
273 <b>__checkHookKey</b>(<i>key</i>) |
|
274 |
|
275 <p> |
|
276 Private method to check a hook key. |
|
277 </p> |
|
278 <dl> |
|
279 |
|
280 <dt><i>key</i></dt> |
|
281 <dd> |
|
282 key of the hook to check (string) |
|
283 </dd> |
|
284 </dl> |
|
285 <dl> |
|
286 |
|
287 <dt>Raises <b>KeyError</b>:</dt> |
|
288 <dd> |
|
289 raised to indicate an invalid hook |
|
290 </dd> |
|
291 </dl> |
|
292 <a NAME="ProjectBaseBrowser.__modelRowsInserted" ID="ProjectBaseBrowser.__modelRowsInserted"></a> |
|
293 <h4>ProjectBaseBrowser.__modelRowsInserted</h4> |
|
294 <b>__modelRowsInserted</b>(<i>parent, start, end</i>) |
|
295 |
|
296 <p> |
|
297 Private slot called after rows have been inserted into the model. |
|
298 </p> |
|
299 <dl> |
|
300 |
|
301 <dt><i>parent</i></dt> |
|
302 <dd> |
|
303 parent index of inserted rows (QModelIndex) |
|
304 </dd> |
|
305 <dt><i>start</i></dt> |
|
306 <dd> |
|
307 start row number (integer) |
|
308 </dd> |
|
309 <dt><i>end</i></dt> |
|
310 <dd> |
|
311 end row number (integer) |
|
312 </dd> |
|
313 </dl> |
|
314 <a NAME="ProjectBaseBrowser._collapseAllDirs" ID="ProjectBaseBrowser._collapseAllDirs"></a> |
|
315 <h4>ProjectBaseBrowser._collapseAllDirs</h4> |
|
316 <b>_collapseAllDirs</b>(<i></i>) |
|
317 |
|
318 <p> |
|
319 Protected slot to handle the 'Collapse all directories' menu action. |
|
320 </p> |
|
321 <a NAME="ProjectBaseBrowser._completeRepopulateItem" ID="ProjectBaseBrowser._completeRepopulateItem"></a> |
|
322 <h4>ProjectBaseBrowser._completeRepopulateItem</h4> |
|
323 <b>_completeRepopulateItem</b>(<i>name</i>) |
|
324 |
|
325 <p> |
|
326 Protected slot to handle the completeRepopulateItem signal. |
|
327 </p> |
|
328 <dl> |
|
329 |
|
330 <dt><i>name</i></dt> |
|
331 <dd> |
|
332 relative name of file item to be repopulated (string) |
|
333 </dd> |
|
334 </dl> |
|
335 <a NAME="ProjectBaseBrowser._configure" ID="ProjectBaseBrowser._configure"></a> |
|
336 <h4>ProjectBaseBrowser._configure</h4> |
|
337 <b>_configure</b>(<i></i>) |
|
338 |
|
339 <p> |
|
340 Protected method to open the configuration dialog. |
|
341 </p> |
|
342 <a NAME="ProjectBaseBrowser._connectExpandedCollapsed" ID="ProjectBaseBrowser._connectExpandedCollapsed"></a> |
|
343 <h4>ProjectBaseBrowser._connectExpandedCollapsed</h4> |
|
344 <b>_connectExpandedCollapsed</b>(<i></i>) |
|
345 |
|
346 <p> |
|
347 Protected method to connect the expanded and collapsed signals. |
|
348 </p> |
|
349 <a NAME="ProjectBaseBrowser._contextMenuRequested" ID="ProjectBaseBrowser._contextMenuRequested"></a> |
|
350 <h4>ProjectBaseBrowser._contextMenuRequested</h4> |
|
351 <b>_contextMenuRequested</b>(<i>coord</i>) |
|
352 |
|
353 <p> |
|
354 Protected slot to show the context menu. |
|
355 </p> |
|
356 <dl> |
|
357 |
|
358 <dt><i>coord</i></dt> |
|
359 <dd> |
|
360 the position of the mouse pointer (QPoint) |
|
361 </dd> |
|
362 </dl> |
|
363 <a NAME="ProjectBaseBrowser._copyToClipboard" ID="ProjectBaseBrowser._copyToClipboard"></a> |
|
364 <h4>ProjectBaseBrowser._copyToClipboard</h4> |
|
365 <b>_copyToClipboard</b>(<i></i>) |
|
366 |
|
367 <p> |
|
368 Protected method to copy the path of an entry to the clipboard. |
|
369 </p> |
|
370 <a NAME="ProjectBaseBrowser._createPopupMenus" ID="ProjectBaseBrowser._createPopupMenus"></a> |
|
371 <h4>ProjectBaseBrowser._createPopupMenus</h4> |
|
372 <b>_createPopupMenus</b>(<i></i>) |
|
373 |
|
374 <p> |
|
375 Protected overloaded method to generate the popup menus. |
|
376 </p> |
|
377 <a NAME="ProjectBaseBrowser._deleteDirectory" ID="ProjectBaseBrowser._deleteDirectory"></a> |
|
378 <h4>ProjectBaseBrowser._deleteDirectory</h4> |
|
379 <b>_deleteDirectory</b>(<i></i>) |
|
380 |
|
381 <p> |
|
382 Protected method to delete the selected directory from the project |
|
383 data area. |
|
384 </p> |
|
385 <a NAME="ProjectBaseBrowser._disconnectExpandedCollapsed" ID="ProjectBaseBrowser._disconnectExpandedCollapsed"></a> |
|
386 <h4>ProjectBaseBrowser._disconnectExpandedCollapsed</h4> |
|
387 <b>_disconnectExpandedCollapsed</b>(<i></i>) |
|
388 |
|
389 <p> |
|
390 Protected method to disconnect the expanded and collapsed signals. |
|
391 </p> |
|
392 <a NAME="ProjectBaseBrowser._expandAllDirs" ID="ProjectBaseBrowser._expandAllDirs"></a> |
|
393 <h4>ProjectBaseBrowser._expandAllDirs</h4> |
|
394 <b>_expandAllDirs</b>(<i></i>) |
|
395 |
|
396 <p> |
|
397 Protected slot to handle the 'Expand all directories' menu action. |
|
398 </p> |
|
399 <a NAME="ProjectBaseBrowser._initHookMethods" ID="ProjectBaseBrowser._initHookMethods"></a> |
|
400 <h4>ProjectBaseBrowser._initHookMethods</h4> |
|
401 <b>_initHookMethods</b>(<i></i>) |
|
402 |
|
403 <p> |
|
404 Protected method to initialize the hooks dictionary. |
|
405 </p> |
|
406 <p> |
|
407 This method should be overridden by subclasses. All supported |
|
408 hook methods should be initialized with a None value. The keys |
|
409 must be strings. |
|
410 </p> |
|
411 <a NAME="ProjectBaseBrowser._initMenusAndVcs" ID="ProjectBaseBrowser._initMenusAndVcs"></a> |
|
412 <h4>ProjectBaseBrowser._initMenusAndVcs</h4> |
|
413 <b>_initMenusAndVcs</b>(<i></i>) |
|
414 |
|
415 <p> |
|
416 Protected slot to initialize the menus and the Vcs interface. |
|
417 </p> |
|
418 <a NAME="ProjectBaseBrowser._keyboardSearchType" ID="ProjectBaseBrowser._keyboardSearchType"></a> |
|
419 <h4>ProjectBaseBrowser._keyboardSearchType</h4> |
|
420 <b>_keyboardSearchType</b>(<i>item</i>) |
|
421 |
|
422 <p> |
|
423 Protected method to check, if the item is of the correct type. |
|
424 </p> |
|
425 <dl> |
|
426 |
|
427 <dt><i>item</i> (BrowserItem)</dt> |
|
428 <dd> |
|
429 reference to the item |
|
430 </dd> |
|
431 </dl> |
|
432 <dl> |
|
433 <dt>Return:</dt> |
|
434 <dd> |
|
435 flag indicating a correct type |
|
436 </dd> |
|
437 </dl> |
|
438 <dl> |
|
439 <dt>Return Type:</dt> |
|
440 <dd> |
|
441 bool |
|
442 </dd> |
|
443 </dl> |
|
444 <a NAME="ProjectBaseBrowser._newProject" ID="ProjectBaseBrowser._newProject"></a> |
|
445 <h4>ProjectBaseBrowser._newProject</h4> |
|
446 <b>_newProject</b>(<i></i>) |
|
447 |
|
448 <p> |
|
449 Protected slot to handle the newProject signal. |
|
450 </p> |
|
451 <a NAME="ProjectBaseBrowser._prepareRepopulateItem" ID="ProjectBaseBrowser._prepareRepopulateItem"></a> |
|
452 <h4>ProjectBaseBrowser._prepareRepopulateItem</h4> |
|
453 <b>_prepareRepopulateItem</b>(<i>name</i>) |
|
454 |
|
455 <p> |
|
456 Protected slot to handle the prepareRepopulateItem signal. |
|
457 </p> |
|
458 <dl> |
|
459 |
|
460 <dt><i>name</i></dt> |
|
461 <dd> |
|
462 relative name of file item to be repopulated (string) |
|
463 </dd> |
|
464 </dl> |
|
465 <a NAME="ProjectBaseBrowser._projectClosed" ID="ProjectBaseBrowser._projectClosed"></a> |
|
466 <h4>ProjectBaseBrowser._projectClosed</h4> |
|
467 <b>_projectClosed</b>(<i></i>) |
|
468 |
|
469 <p> |
|
470 Protected slot to handle the projectClosed signal. |
|
471 </p> |
|
472 <a NAME="ProjectBaseBrowser._projectOpened" ID="ProjectBaseBrowser._projectOpened"></a> |
|
473 <h4>ProjectBaseBrowser._projectOpened</h4> |
|
474 <b>_projectOpened</b>(<i></i>) |
|
475 |
|
476 <p> |
|
477 Protected slot to handle the projectOpened signal. |
|
478 </p> |
|
479 <a NAME="ProjectBaseBrowser._removeDir" ID="ProjectBaseBrowser._removeDir"></a> |
|
480 <h4>ProjectBaseBrowser._removeDir</h4> |
|
481 <b>_removeDir</b>(<i></i>) |
|
482 |
|
483 <p> |
|
484 Protected method to remove a (single) directory from the project. |
|
485 </p> |
|
486 <a NAME="ProjectBaseBrowser._removeFile" ID="ProjectBaseBrowser._removeFile"></a> |
|
487 <h4>ProjectBaseBrowser._removeFile</h4> |
|
488 <b>_removeFile</b>(<i></i>) |
|
489 |
|
490 <p> |
|
491 Protected method to remove a file or files from the project. |
|
492 </p> |
|
493 <a NAME="ProjectBaseBrowser._renameFile" ID="ProjectBaseBrowser._renameFile"></a> |
|
494 <h4>ProjectBaseBrowser._renameFile</h4> |
|
495 <b>_renameFile</b>(<i></i>) |
|
496 |
|
497 <p> |
|
498 Protected method to rename a file of the project. |
|
499 </p> |
|
500 <a NAME="ProjectBaseBrowser._selectEntries" ID="ProjectBaseBrowser._selectEntries"></a> |
|
501 <h4>ProjectBaseBrowser._selectEntries</h4> |
|
502 <b>_selectEntries</b>(<i>local=True, filterList=None</i>) |
|
503 |
|
504 <p> |
|
505 Protected method to select entries based on their VCS status. |
|
506 </p> |
|
507 <dl> |
|
508 |
|
509 <dt><i>local</i></dt> |
|
510 <dd> |
|
511 flag indicating local (i.e. non VCS controlled) |
|
512 file/directory entries should be selected (boolean) |
|
513 </dd> |
|
514 <dt><i>filterList</i></dt> |
|
515 <dd> |
|
516 list of classes to check against |
|
517 </dd> |
|
518 </dl> |
|
519 <a NAME="ProjectBaseBrowser._selectSingleItem" ID="ProjectBaseBrowser._selectSingleItem"></a> |
|
520 <h4>ProjectBaseBrowser._selectSingleItem</h4> |
|
521 <b>_selectSingleItem</b>(<i>index</i>) |
|
522 |
|
523 <p> |
|
524 Protected method to select a single item. |
|
525 </p> |
|
526 <dl> |
|
527 |
|
528 <dt><i>index</i></dt> |
|
529 <dd> |
|
530 index of item to be selected (QModelIndex) |
|
531 </dd> |
|
532 </dl> |
|
533 <a NAME="ProjectBaseBrowser._setItemRangeSelected" ID="ProjectBaseBrowser._setItemRangeSelected"></a> |
|
534 <h4>ProjectBaseBrowser._setItemRangeSelected</h4> |
|
535 <b>_setItemRangeSelected</b>(<i>startIndex, endIndex, selected</i>) |
|
536 |
|
537 <p> |
|
538 Protected method to set the selection status of a range of items. |
|
539 </p> |
|
540 <dl> |
|
541 |
|
542 <dt><i>startIndex</i></dt> |
|
543 <dd> |
|
544 start index of range of items to set (QModelIndex) |
|
545 </dd> |
|
546 <dt><i>endIndex</i></dt> |
|
547 <dd> |
|
548 end index of range of items to set (QModelIndex) |
|
549 </dd> |
|
550 <dt><i>selected</i></dt> |
|
551 <dd> |
|
552 flag giving the new selection status (boolean) |
|
553 </dd> |
|
554 </dl> |
|
555 <a NAME="ProjectBaseBrowser._setItemSelected" ID="ProjectBaseBrowser._setItemSelected"></a> |
|
556 <h4>ProjectBaseBrowser._setItemSelected</h4> |
|
557 <b>_setItemSelected</b>(<i>index, selected</i>) |
|
558 |
|
559 <p> |
|
560 Protected method to set the selection status of an item. |
|
561 </p> |
|
562 <dl> |
|
563 |
|
564 <dt><i>index</i></dt> |
|
565 <dd> |
|
566 index of item to set (QModelIndex) |
|
567 </dd> |
|
568 <dt><i>selected</i></dt> |
|
569 <dd> |
|
570 flag giving the new selection status (boolean) |
|
571 </dd> |
|
572 </dl> |
|
573 <a NAME="ProjectBaseBrowser._showContextMenu" ID="ProjectBaseBrowser._showContextMenu"></a> |
|
574 <h4>ProjectBaseBrowser._showContextMenu</h4> |
|
575 <b>_showContextMenu</b>(<i>menu</i>) |
|
576 |
|
577 <p> |
|
578 Protected slot called before the context menu is shown. |
|
579 </p> |
|
580 <p> |
|
581 It enables/disables the VCS menu entries depending on the overall |
|
582 VCS status and the file status. |
|
583 </p> |
|
584 <dl> |
|
585 |
|
586 <dt><i>menu</i></dt> |
|
587 <dd> |
|
588 reference to the menu to be shown (QMenu) |
|
589 </dd> |
|
590 </dl> |
|
591 <a NAME="ProjectBaseBrowser._showContextMenuBack" ID="ProjectBaseBrowser._showContextMenuBack"></a> |
|
592 <h4>ProjectBaseBrowser._showContextMenuBack</h4> |
|
593 <b>_showContextMenuBack</b>(<i>menu</i>) |
|
594 |
|
595 <p> |
|
596 Protected slot called before the context menu is shown. |
|
597 </p> |
|
598 <dl> |
|
599 |
|
600 <dt><i>menu</i></dt> |
|
601 <dd> |
|
602 reference to the menu to be shown (QMenu) |
|
603 </dd> |
|
604 </dl> |
|
605 <a NAME="ProjectBaseBrowser._showContextMenuDir" ID="ProjectBaseBrowser._showContextMenuDir"></a> |
|
606 <h4>ProjectBaseBrowser._showContextMenuDir</h4> |
|
607 <b>_showContextMenuDir</b>(<i>menu</i>) |
|
608 |
|
609 <p> |
|
610 Protected slot called before the context menu is shown. |
|
611 </p> |
|
612 <p> |
|
613 It enables/disables the VCS menu entries depending on the overall |
|
614 VCS status and the directory status. |
|
615 </p> |
|
616 <dl> |
|
617 |
|
618 <dt><i>menu</i></dt> |
|
619 <dd> |
|
620 reference to the menu to be shown (QMenu) |
|
621 </dd> |
|
622 </dl> |
|
623 <a NAME="ProjectBaseBrowser._showContextMenuDirMulti" ID="ProjectBaseBrowser._showContextMenuDirMulti"></a> |
|
624 <h4>ProjectBaseBrowser._showContextMenuDirMulti</h4> |
|
625 <b>_showContextMenuDirMulti</b>(<i>menu</i>) |
|
626 |
|
627 <p> |
|
628 Protected slot called before the context menu is shown. |
|
629 </p> |
|
630 <p> |
|
631 It enables/disables the VCS menu entries depending on the overall |
|
632 VCS status and the directory status. |
|
633 </p> |
|
634 <dl> |
|
635 |
|
636 <dt><i>menu</i></dt> |
|
637 <dd> |
|
638 reference to the menu to be shown (QMenu) |
|
639 </dd> |
|
640 </dl> |
|
641 <a NAME="ProjectBaseBrowser._showContextMenuMulti" ID="ProjectBaseBrowser._showContextMenuMulti"></a> |
|
642 <h4>ProjectBaseBrowser._showContextMenuMulti</h4> |
|
643 <b>_showContextMenuMulti</b>(<i>menu</i>) |
|
644 |
|
645 <p> |
|
646 Protected slot called before the context menu (multiple selections) is |
|
647 shown. |
|
648 </p> |
|
649 <p> |
|
650 It enables/disables the VCS menu entries depending on the overall |
|
651 VCS status and the files status. |
|
652 </p> |
|
653 <dl> |
|
654 |
|
655 <dt><i>menu</i></dt> |
|
656 <dd> |
|
657 reference to the menu to be shown (QMenu) |
|
658 </dd> |
|
659 </dl> |
|
660 <a NAME="ProjectBaseBrowser.addHookMethod" ID="ProjectBaseBrowser.addHookMethod"></a> |
|
661 <h4>ProjectBaseBrowser.addHookMethod</h4> |
|
662 <b>addHookMethod</b>(<i>key, method</i>) |
|
663 |
|
664 <p> |
|
665 Public method to add a hook method to the dictionary. |
|
666 </p> |
|
667 <dl> |
|
668 |
|
669 <dt><i>key</i></dt> |
|
670 <dd> |
|
671 for the hook method (string) |
|
672 </dd> |
|
673 <dt><i>method</i></dt> |
|
674 <dd> |
|
675 reference to the hook method (method object) |
|
676 </dd> |
|
677 </dl> |
|
678 <a NAME="ProjectBaseBrowser.addHookMethodAndMenuEntry" ID="ProjectBaseBrowser.addHookMethodAndMenuEntry"></a> |
|
679 <h4>ProjectBaseBrowser.addHookMethodAndMenuEntry</h4> |
|
680 <b>addHookMethodAndMenuEntry</b>(<i>key, method, menuEntry</i>) |
|
681 |
|
682 <p> |
|
683 Public method to add a hook method to the dictionary. |
|
684 </p> |
|
685 <dl> |
|
686 |
|
687 <dt><i>key</i></dt> |
|
688 <dd> |
|
689 for the hook method (string) |
|
690 </dd> |
|
691 <dt><i>method</i></dt> |
|
692 <dd> |
|
693 reference to the hook method (method object) |
|
694 </dd> |
|
695 <dt><i>menuEntry</i></dt> |
|
696 <dd> |
|
697 entry to be shown in the context menu (string) |
|
698 </dd> |
|
699 </dl> |
|
700 <a NAME="ProjectBaseBrowser.currentItem" ID="ProjectBaseBrowser.currentItem"></a> |
|
701 <h4>ProjectBaseBrowser.currentItem</h4> |
|
702 <b>currentItem</b>(<i></i>) |
|
703 |
|
704 <p> |
|
705 Public method to get a reference to the current item. |
|
706 </p> |
|
707 <dl> |
|
708 <dt>Return:</dt> |
|
709 <dd> |
|
710 reference to the current item |
|
711 </dd> |
|
712 </dl> |
|
713 <a NAME="ProjectBaseBrowser.expandItemsByName" ID="ProjectBaseBrowser.expandItemsByName"></a> |
|
714 <h4>ProjectBaseBrowser.expandItemsByName</h4> |
|
715 <b>expandItemsByName</b>(<i>names</i>) |
|
716 |
|
717 <p> |
|
718 Public method to expand items given their names. |
|
719 </p> |
|
720 <dl> |
|
721 |
|
722 <dt><i>names</i></dt> |
|
723 <dd> |
|
724 list of item names to be expanded (list of string) |
|
725 </dd> |
|
726 </dl> |
|
727 <a NAME="ProjectBaseBrowser.getExpandedItemNames" ID="ProjectBaseBrowser.getExpandedItemNames"></a> |
|
728 <h4>ProjectBaseBrowser.getExpandedItemNames</h4> |
|
729 <b>getExpandedItemNames</b>(<i></i>) |
|
730 |
|
731 <p> |
|
732 Public method to get the file/directory names of all expanded items. |
|
733 </p> |
|
734 <dl> |
|
735 <dt>Return:</dt> |
|
736 <dd> |
|
737 list of expanded items names (list of string) |
|
738 </dd> |
|
739 </dl> |
|
740 <a NAME="ProjectBaseBrowser.removeHookMethod" ID="ProjectBaseBrowser.removeHookMethod"></a> |
|
741 <h4>ProjectBaseBrowser.removeHookMethod</h4> |
|
742 <b>removeHookMethod</b>(<i>key</i>) |
|
743 |
|
744 <p> |
|
745 Public method to remove a hook method from the dictionary. |
|
746 </p> |
|
747 <dl> |
|
748 |
|
749 <dt><i>key</i></dt> |
|
750 <dd> |
|
751 for the hook method (string) |
|
752 </dd> |
|
753 </dl> |
|
754 <a NAME="ProjectBaseBrowser.selectFile" ID="ProjectBaseBrowser.selectFile"></a> |
|
755 <h4>ProjectBaseBrowser.selectFile</h4> |
|
756 <b>selectFile</b>(<i>fn</i>) |
|
757 |
|
758 <p> |
|
759 Public method to highlight a node given its filename. |
|
760 </p> |
|
761 <dl> |
|
762 |
|
763 <dt><i>fn</i></dt> |
|
764 <dd> |
|
765 filename of file to be highlighted (string) |
|
766 </dd> |
|
767 </dl> |
|
768 <a NAME="ProjectBaseBrowser.selectFileLine" ID="ProjectBaseBrowser.selectFileLine"></a> |
|
769 <h4>ProjectBaseBrowser.selectFileLine</h4> |
|
770 <b>selectFileLine</b>(<i>fn, lineno</i>) |
|
771 |
|
772 <p> |
|
773 Public method to highlight a node given its filename. |
|
774 </p> |
|
775 <dl> |
|
776 |
|
777 <dt><i>fn</i></dt> |
|
778 <dd> |
|
779 filename of file to be highlighted (string) |
|
780 </dd> |
|
781 <dt><i>lineno</i></dt> |
|
782 <dd> |
|
783 one based line number of the item (integer) |
|
784 </dd> |
|
785 </dl> |
|
786 <a NAME="ProjectBaseBrowser.selectLocalDirEntries" ID="ProjectBaseBrowser.selectLocalDirEntries"></a> |
|
787 <h4>ProjectBaseBrowser.selectLocalDirEntries</h4> |
|
788 <b>selectLocalDirEntries</b>(<i></i>) |
|
789 |
|
790 <p> |
|
791 Public slot to handle the select local directories context menu |
|
792 entries. |
|
793 </p> |
|
794 <a NAME="ProjectBaseBrowser.selectLocalEntries" ID="ProjectBaseBrowser.selectLocalEntries"></a> |
|
795 <h4>ProjectBaseBrowser.selectLocalEntries</h4> |
|
796 <b>selectLocalEntries</b>(<i></i>) |
|
797 |
|
798 <p> |
|
799 Public slot to handle the select local files context menu entries. |
|
800 </p> |
|
801 <a NAME="ProjectBaseBrowser.selectVCSDirEntries" ID="ProjectBaseBrowser.selectVCSDirEntries"></a> |
|
802 <h4>ProjectBaseBrowser.selectVCSDirEntries</h4> |
|
803 <b>selectVCSDirEntries</b>(<i></i>) |
|
804 |
|
805 <p> |
|
806 Public slot to handle the select VCS directories context menu entries. |
|
807 </p> |
|
808 <a NAME="ProjectBaseBrowser.selectVCSEntries" ID="ProjectBaseBrowser.selectVCSEntries"></a> |
|
809 <h4>ProjectBaseBrowser.selectVCSEntries</h4> |
|
810 <b>selectVCSEntries</b>(<i></i>) |
|
811 |
|
812 <p> |
|
813 Public slot to handle the select VCS files context menu entries. |
|
814 </p> |
|
815 <div align="right"><a href="#top">Up</a></div> |
|
816 <hr /> |
|
817 </body></html> |