Documentation/Source/eric4.Project.ProjectBrowserModel.html

changeset 3
0d9daebf5b8c
child 7
c679fb30c8f3
equal deleted inserted replaced
2:bc6196164237 3:0d9daebf5b8c
1 <?xml version="1.0" encoding="utf-8"?>
2 <!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN'
3 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
4 <html><head>
5 <title>eric4.Project.ProjectBrowserModel</title>
6 <style>
7 body {
8 background:white;
9 margin: 0em 1em 10em 1em;
10 color: black;
11 }
12
13 h1 { color: white; background: #4FA4FF; }
14 h2 { color: white; background: #4FA4FF; }
15 h3 { color: white; background: #00557F; }
16 h4 { color: white; background: #00557F; }
17
18 a { color: #AA5500; }
19
20 </style>
21 </head>
22 <body><a NAME="top" ID="top"></a>
23 <h1>eric4.Project.ProjectBrowserModel</h1>
24 <p>
25 Module implementing the browser model.
26 </p>
27 <h3>Global Attributes</h3>
28 <table>
29 <tr><td>ProjectBrowserFormType</td></tr><tr><td>ProjectBrowserInterfaceType</td></tr><tr><td>ProjectBrowserItemDirectory</td></tr><tr><td>ProjectBrowserItemFile</td></tr><tr><td>ProjectBrowserItemSimpleDirectory</td></tr><tr><td>ProjectBrowserNoType</td></tr><tr><td>ProjectBrowserOthersType</td></tr><tr><td>ProjectBrowserResourceType</td></tr><tr><td>ProjectBrowserSourceType</td></tr><tr><td>ProjectBrowserTranslationType</td></tr>
30 </table>
31 <h3>Classes</h3>
32 <table>
33 <tr>
34 <td><a href="#ProjectBrowserDirectoryItem">ProjectBrowserDirectoryItem</a></td>
35 <td>Class implementing the data structure for project browser directory items.</td>
36 </tr><tr>
37 <td><a href="#ProjectBrowserFileItem">ProjectBrowserFileItem</a></td>
38 <td>Class implementing the data structure for project browser file items.</td>
39 </tr><tr>
40 <td><a href="#ProjectBrowserItemMixin">ProjectBrowserItemMixin</a></td>
41 <td>Class implementing common methods of project browser items.</td>
42 </tr><tr>
43 <td><a href="#ProjectBrowserModel">ProjectBrowserModel</a></td>
44 <td>Class implementing the project browser model.</td>
45 </tr><tr>
46 <td><a href="#ProjectBrowserSimpleDirectoryItem">ProjectBrowserSimpleDirectoryItem</a></td>
47 <td>Class implementing the data structure for project browser simple directory items.</td>
48 </tr>
49 </table>
50 <h3>Functions</h3>
51 <table>
52 <tr><td>None</td></tr>
53 </table>
54 <hr /><hr />
55 <a NAME="ProjectBrowserDirectoryItem" ID="ProjectBrowserDirectoryItem"></a>
56 <h2>ProjectBrowserDirectoryItem</h2>
57 <p>
58 Class implementing the data structure for project browser directory items.
59 </p>
60 <h3>Derived from</h3>
61 BrowserDirectoryItem, ProjectBrowserItemMixin
62 <h3>Class Attributes</h3>
63 <table>
64 <tr><td>None</td></tr>
65 </table>
66 <h3>Methods</h3>
67 <table>
68 <tr>
69 <td><a href="#ProjectBrowserDirectoryItem.__init__">ProjectBrowserDirectoryItem</a></td>
70 <td>Constructor</td>
71 </tr>
72 </table>
73 <a NAME="ProjectBrowserDirectoryItem.__init__" ID="ProjectBrowserDirectoryItem.__init__"></a>
74 <h4>ProjectBrowserDirectoryItem (Constructor)</h4>
75 <b>ProjectBrowserDirectoryItem</b>(<i>parent, dinfo, projectType, full = True, bold = False</i>)
76 <p>
77 Constructor
78 </p><dl>
79 <dt><i>parent</i></dt>
80 <dd>
81 parent item
82 </dd><dt><i>dinfo</i></dt>
83 <dd>
84 dinfo is the string for the directory (string)
85 </dd><dt><i>projectType</i></dt>
86 <dd>
87 type of file/directory in the project
88 </dd><dt><i>full</i></dt>
89 <dd>
90 flag indicating full pathname should be displayed (boolean)
91 </dd><dt><i>bold</i></dt>
92 <dd>
93 flag indicating a highlighted font (boolean)
94 </dd>
95 </dl>
96 <div align="right"><a href="#top">Up</a></div>
97 <hr /><hr />
98 <a NAME="ProjectBrowserFileItem" ID="ProjectBrowserFileItem"></a>
99 <h2>ProjectBrowserFileItem</h2>
100 <p>
101 Class implementing the data structure for project browser file items.
102 </p>
103 <h3>Derived from</h3>
104 BrowserFileItem, ProjectBrowserItemMixin
105 <h3>Class Attributes</h3>
106 <table>
107 <tr><td>None</td></tr>
108 </table>
109 <h3>Methods</h3>
110 <table>
111 <tr>
112 <td><a href="#ProjectBrowserFileItem.__init__">ProjectBrowserFileItem</a></td>
113 <td>Constructor</td>
114 </tr>
115 </table>
116 <a NAME="ProjectBrowserFileItem.__init__" ID="ProjectBrowserFileItem.__init__"></a>
117 <h4>ProjectBrowserFileItem (Constructor)</h4>
118 <b>ProjectBrowserFileItem</b>(<i>parent, finfo, projectType, full = True, bold = False, sourceLanguage = ""</i>)
119 <p>
120 Constructor
121 </p><dl>
122 <dt><i>parent</i></dt>
123 <dd>
124 parent item
125 </dd><dt><i>finfo</i></dt>
126 <dd>
127 the string for the file (string)
128 </dd><dt><i>projectType</i></dt>
129 <dd>
130 type of file/directory in the project
131 </dd><dt><i>full</i></dt>
132 <dd>
133 flag indicating full pathname should be displayed (boolean)
134 </dd><dt><i>bold</i></dt>
135 <dd>
136 flag indicating a highlighted font (boolean)
137 </dd><dt><i>sourceLanguage</i></dt>
138 <dd>
139 source code language of the project (string)
140 </dd>
141 </dl>
142 <div align="right"><a href="#top">Up</a></div>
143 <hr /><hr />
144 <a NAME="ProjectBrowserItemMixin" ID="ProjectBrowserItemMixin"></a>
145 <h2>ProjectBrowserItemMixin</h2>
146 <p>
147 Class implementing common methods of project browser items.
148 </p><p>
149 It is meant to be used as a mixin class.
150 </p>
151 <h3>Derived from</h3>
152 object
153 <h3>Class Attributes</h3>
154 <table>
155 <tr><td>None</td></tr>
156 </table>
157 <h3>Methods</h3>
158 <table>
159 <tr>
160 <td><a href="#ProjectBrowserItemMixin.__init__">ProjectBrowserItemMixin</a></td>
161 <td>Constructor</td>
162 </tr><tr>
163 <td><a href="#ProjectBrowserItemMixin.addProjectType">addProjectType</a></td>
164 <td>Public method to add a type to the list.</td>
165 </tr><tr>
166 <td><a href="#ProjectBrowserItemMixin.addVcsStatus">addVcsStatus</a></td>
167 <td>Public method to add the VCS status.</td>
168 </tr><tr>
169 <td><a href="#ProjectBrowserItemMixin.getProjectTypes">getProjectTypes</a></td>
170 <td>Public method to get the project type.</td>
171 </tr><tr>
172 <td><a href="#ProjectBrowserItemMixin.getTextColor">getTextColor</a></td>
173 <td>Public method to get the items text color.</td>
174 </tr><tr>
175 <td><a href="#ProjectBrowserItemMixin.setVcsState">setVcsState</a></td>
176 <td>Public method to set the items VCS state.</td>
177 </tr><tr>
178 <td><a href="#ProjectBrowserItemMixin.setVcsStatus">setVcsStatus</a></td>
179 <td>Public method to set the VCS status.</td>
180 </tr>
181 </table>
182 <a NAME="ProjectBrowserItemMixin.__init__" ID="ProjectBrowserItemMixin.__init__"></a>
183 <h4>ProjectBrowserItemMixin (Constructor)</h4>
184 <b>ProjectBrowserItemMixin</b>(<i>type_, bold = False</i>)
185 <p>
186 Constructor
187 </p><dl>
188 <dt><i>type_</i></dt>
189 <dd>
190 type of file/directory in the project
191 </dd><dt><i>bold</i></dt>
192 <dd>
193 flag indicating a highlighted font
194 </dd>
195 </dl><a NAME="ProjectBrowserItemMixin.addProjectType" ID="ProjectBrowserItemMixin.addProjectType"></a>
196 <h4>ProjectBrowserItemMixin.addProjectType</h4>
197 <b>addProjectType</b>(<i>type_</i>)
198 <p>
199 Public method to add a type to the list.
200 </p><dl>
201 <dt><i>type_</i></dt>
202 <dd>
203 type to add to the list
204 </dd>
205 </dl><a NAME="ProjectBrowserItemMixin.addVcsStatus" ID="ProjectBrowserItemMixin.addVcsStatus"></a>
206 <h4>ProjectBrowserItemMixin.addVcsStatus</h4>
207 <b>addVcsStatus</b>(<i>vcsStatus</i>)
208 <p>
209 Public method to add the VCS status.
210 </p><dl>
211 <dt><i>vcsStatus</i></dt>
212 <dd>
213 VCS status text (string)
214 </dd>
215 </dl><a NAME="ProjectBrowserItemMixin.getProjectTypes" ID="ProjectBrowserItemMixin.getProjectTypes"></a>
216 <h4>ProjectBrowserItemMixin.getProjectTypes</h4>
217 <b>getProjectTypes</b>(<i></i>)
218 <p>
219 Public method to get the project type.
220 </p><dl>
221 <dt>Returns:</dt>
222 <dd>
223 project type
224 </dd>
225 </dl><a NAME="ProjectBrowserItemMixin.getTextColor" ID="ProjectBrowserItemMixin.getTextColor"></a>
226 <h4>ProjectBrowserItemMixin.getTextColor</h4>
227 <b>getTextColor</b>(<i></i>)
228 <p>
229 Public method to get the items text color.
230 </p><dl>
231 <dt>Returns:</dt>
232 <dd>
233 text color (QVariant(QColor))
234 </dd>
235 </dl><a NAME="ProjectBrowserItemMixin.setVcsState" ID="ProjectBrowserItemMixin.setVcsState"></a>
236 <h4>ProjectBrowserItemMixin.setVcsState</h4>
237 <b>setVcsState</b>(<i>state</i>)
238 <p>
239 Public method to set the items VCS state.
240 </p><dl>
241 <dt><i>state</i></dt>
242 <dd>
243 VCS state (one of A, C, M, U or " ") (string)
244 </dd>
245 </dl><a NAME="ProjectBrowserItemMixin.setVcsStatus" ID="ProjectBrowserItemMixin.setVcsStatus"></a>
246 <h4>ProjectBrowserItemMixin.setVcsStatus</h4>
247 <b>setVcsStatus</b>(<i>vcsStatus</i>)
248 <p>
249 Public method to set the VCS status.
250 </p><dl>
251 <dt><i>vcsStatus</i></dt>
252 <dd>
253 VCS status text (string)
254 </dd>
255 </dl>
256 <div align="right"><a href="#top">Up</a></div>
257 <hr /><hr />
258 <a NAME="ProjectBrowserModel" ID="ProjectBrowserModel"></a>
259 <h2>ProjectBrowserModel</h2>
260 <p>
261 Class implementing the project browser model.
262 </p><h4>Signals</h4>
263 <dl>
264 <dt>vcsStateChanged(QString)</dt>
265 <dd>
266 emitted after the VCS state has changed
267 </dd>
268 </dl>
269 <h3>Derived from</h3>
270 BrowserModel
271 <h3>Class Attributes</h3>
272 <table>
273 <tr><td>None</td></tr>
274 </table>
275 <h3>Methods</h3>
276 <table>
277 <tr>
278 <td><a href="#ProjectBrowserModel.__init__">ProjectBrowserModel</a></td>
279 <td>Constructor</td>
280 </tr><tr>
281 <td><a href="#ProjectBrowserModel.__addVCSStatus">__addVCSStatus</a></td>
282 <td>Private method used to set the vcs status of a node.</td>
283 </tr><tr>
284 <td><a href="#ProjectBrowserModel.__changeParentsVCSState">__changeParentsVCSState</a></td>
285 <td>Private method to recursively change the parents VCS state.</td>
286 </tr><tr>
287 <td><a href="#ProjectBrowserModel.__updateVCSStatus">__updateVCSStatus</a></td>
288 <td>Private method used to update the vcs status of a node.</td>
289 </tr><tr>
290 <td><a href="#ProjectBrowserModel.addNewItem">addNewItem</a></td>
291 <td>Public method to add a new item to the model.</td>
292 </tr><tr>
293 <td><a href="#ProjectBrowserModel.changeVCSStates">changeVCSStates</a></td>
294 <td>Public slot to record the (non normal) VCS states.</td>
295 </tr><tr>
296 <td><a href="#ProjectBrowserModel.data">data</a></td>
297 <td>Public method to get data of an item.</td>
298 </tr><tr>
299 <td><a href="#ProjectBrowserModel.findChildItem">findChildItem</a></td>
300 <td>Public method to find a child item given some text.</td>
301 </tr><tr>
302 <td><a href="#ProjectBrowserModel.findItem">findItem</a></td>
303 <td>Public method to find an item given it's name.</td>
304 </tr><tr>
305 <td><a href="#ProjectBrowserModel.findParentItemByName">findParentItemByName</a></td>
306 <td>Public method to find an item given it's name.</td>
307 </tr><tr>
308 <td><a href="#ProjectBrowserModel.itemIndexByName">itemIndexByName</a></td>
309 <td>Public method to find an item's index given it's name.</td>
310 </tr><tr>
311 <td><a href="#ProjectBrowserModel.populateItem">populateItem</a></td>
312 <td>Public method to populate an item's subtree.</td>
313 </tr><tr>
314 <td><a href="#ProjectBrowserModel.populateProjectDirectoryItem">populateProjectDirectoryItem</a></td>
315 <td>Public method to populate a directory item's subtree.</td>
316 </tr><tr>
317 <td><a href="#ProjectBrowserModel.preferencesChanged">preferencesChanged</a></td>
318 <td>Public method used to handle a change in preferences.</td>
319 </tr><tr>
320 <td><a href="#ProjectBrowserModel.projectClosed">projectClosed</a></td>
321 <td>Public method called after a project has been closed.</td>
322 </tr><tr>
323 <td><a href="#ProjectBrowserModel.projectOpened">projectOpened</a></td>
324 <td>Public method used to populate the model after a project has been opened.</td>
325 </tr><tr>
326 <td><a href="#ProjectBrowserModel.projectPropertiesChanged">projectPropertiesChanged</a></td>
327 <td>Public method to react on a change of the project properties.</td>
328 </tr><tr>
329 <td><a href="#ProjectBrowserModel.removeItem">removeItem</a></td>
330 <td>Public method to remove a named item.</td>
331 </tr><tr>
332 <td><a href="#ProjectBrowserModel.renameItem">renameItem</a></td>
333 <td>Public method to rename an item.</td>
334 </tr><tr>
335 <td><a href="#ProjectBrowserModel.repopulateItem">repopulateItem</a></td>
336 <td>Public method to repopulate an item.</td>
337 </tr><tr>
338 <td><a href="#ProjectBrowserModel.updateVCSStatus">updateVCSStatus</a></td>
339 <td>Public method used to update the vcs status of a node.</td>
340 </tr>
341 </table>
342 <a NAME="ProjectBrowserModel.__init__" ID="ProjectBrowserModel.__init__"></a>
343 <h4>ProjectBrowserModel (Constructor)</h4>
344 <b>ProjectBrowserModel</b>(<i>parent</i>)
345 <p>
346 Constructor
347 </p><dl>
348 <dt><i>parent</i></dt>
349 <dd>
350 reference to parent object (Project.Project)
351 </dd>
352 </dl><a NAME="ProjectBrowserModel.__addVCSStatus" ID="ProjectBrowserModel.__addVCSStatus"></a>
353 <h4>ProjectBrowserModel.__addVCSStatus</h4>
354 <b>__addVCSStatus</b>(<i>item, name</i>)
355 <p>
356 Private method used to set the vcs status of a node.
357 </p><dl>
358 <dt><i>item</i></dt>
359 <dd>
360 item to work on
361 </dd><dt><i>name</i></dt>
362 <dd>
363 filename belonging to this item (string)
364 </dd>
365 </dl><a NAME="ProjectBrowserModel.__changeParentsVCSState" ID="ProjectBrowserModel.__changeParentsVCSState"></a>
366 <h4>ProjectBrowserModel.__changeParentsVCSState</h4>
367 <b>__changeParentsVCSState</b>(<i>path, itemCache</i>)
368 <p>
369 Private method to recursively change the parents VCS state.
370 </p><dl>
371 <dt><i>path</i></dt>
372 <dd>
373 pathname of parent item (string)
374 </dd><dt><i>itemCache</i></dt>
375 <dd>
376 reference to the item cache used to store
377 references to named items
378 </dd>
379 </dl><a NAME="ProjectBrowserModel.__updateVCSStatus" ID="ProjectBrowserModel.__updateVCSStatus"></a>
380 <h4>ProjectBrowserModel.__updateVCSStatus</h4>
381 <b>__updateVCSStatus</b>(<i>item, name, recursive = True</i>)
382 <p>
383 Private method used to update the vcs status of a node.
384 </p><dl>
385 <dt><i>item</i></dt>
386 <dd>
387 item to work on
388 </dd><dt><i>name</i></dt>
389 <dd>
390 filename belonging to this item (string)
391 </dd><dt><i>recursive</i></dt>
392 <dd>
393 flag indicating a recursive update (boolean)
394 </dd>
395 </dl><a NAME="ProjectBrowserModel.addNewItem" ID="ProjectBrowserModel.addNewItem"></a>
396 <h4>ProjectBrowserModel.addNewItem</h4>
397 <b>addNewItem</b>(<i>typeString, name, additionalTypeStrings = []</i>)
398 <p>
399 Public method to add a new item to the model.
400 </p><dl>
401 <dt><i>typeString</i></dt>
402 <dd>
403 string denoting the type of the new item (string)
404 </dd><dt><i>name</i></dt>
405 <dd>
406 name of the new item (string)
407 </dd><dt><i>additionalTypeStrings</i></dt>
408 <dd>
409 names of additional types (list of string)
410 </dd>
411 </dl><a NAME="ProjectBrowserModel.changeVCSStates" ID="ProjectBrowserModel.changeVCSStates"></a>
412 <h4>ProjectBrowserModel.changeVCSStates</h4>
413 <b>changeVCSStates</b>(<i>statesList</i>)
414 <p>
415 Public slot to record the (non normal) VCS states.
416 </p><dl>
417 <dt><i>statesList</i></dt>
418 <dd>
419 list of VCS state entries (list of strings) giving the
420 states in the first column and the path relative to the project
421 directory starting with the third column. The allowed status flags
422 are:
423 <ul>
424 <li>"A" path was added but not yet comitted</li>
425 <li>"M" path has local changes</li>
426 <li>"R" path was deleted and then re-added</li>
427 <li>"U" path needs an update</li>
428 <li>"Z" path contains a conflict</li>
429 <li>" " path is back at normal</li>
430 </ul>
431 </dd>
432 </dl><a NAME="ProjectBrowserModel.data" ID="ProjectBrowserModel.data"></a>
433 <h4>ProjectBrowserModel.data</h4>
434 <b>data</b>(<i>index, role</i>)
435 <p>
436 Public method to get data of an item.
437 </p><dl>
438 <dt><i>index</i></dt>
439 <dd>
440 index of the data to retrieve (QModelIndex)
441 </dd><dt><i>role</i></dt>
442 <dd>
443 role of data (Qt.ItemDataRole)
444 </dd>
445 </dl><dl>
446 <dt>Returns:</dt>
447 <dd>
448 requested data (QVariant)
449 </dd>
450 </dl><a NAME="ProjectBrowserModel.findChildItem" ID="ProjectBrowserModel.findChildItem"></a>
451 <h4>ProjectBrowserModel.findChildItem</h4>
452 <b>findChildItem</b>(<i>text, column, parentItem = None</i>)
453 <p>
454 Public method to find a child item given some text.
455 </p><dl>
456 <dt><i>text</i></dt>
457 <dd>
458 text to search for (string)
459 </dd><dt><i>column</i></dt>
460 <dd>
461 column to search in (integer)
462 </dd><dt><i>parentItem</i></dt>
463 <dd>
464 reference to parent item
465 </dd>
466 </dl><dl>
467 <dt>Returns:</dt>
468 <dd>
469 reference to the item found
470 </dd>
471 </dl><a NAME="ProjectBrowserModel.findItem" ID="ProjectBrowserModel.findItem"></a>
472 <h4>ProjectBrowserModel.findItem</h4>
473 <b>findItem</b>(<i>name</i>)
474 <p>
475 Public method to find an item given it's name.
476 </p><dl>
477 <dt><i>name</i></dt>
478 <dd>
479 name of the item (string)
480 </dd>
481 </dl><dl>
482 <dt>Returns:</dt>
483 <dd>
484 reference to the item found
485 </dd>
486 </dl><a NAME="ProjectBrowserModel.findParentItemByName" ID="ProjectBrowserModel.findParentItemByName"></a>
487 <h4>ProjectBrowserModel.findParentItemByName</h4>
488 <b>findParentItemByName</b>(<i>type_, name, dontSplit = False</i>)
489 <p>
490 Public method to find an item given it's name.
491 </p><p>
492 <b>Note</b>: This method creates all necessary parent items, if they
493 don't exist.
494 </p><dl>
495 <dt><i>type_</i></dt>
496 <dd>
497 type of the item
498 </dd><dt><i>name</i></dt>
499 <dd>
500 name of the item (string)
501 </dd><dt><i>dontSplit</i></dt>
502 <dd>
503 flag indicating the name should not be split (boolean)
504 </dd>
505 </dl><dl>
506 <dt>Returns:</dt>
507 <dd>
508 reference to the item found and the new display name (string)
509 </dd>
510 </dl><a NAME="ProjectBrowserModel.itemIndexByName" ID="ProjectBrowserModel.itemIndexByName"></a>
511 <h4>ProjectBrowserModel.itemIndexByName</h4>
512 <b>itemIndexByName</b>(<i>name</i>)
513 <p>
514 Public method to find an item's index given it's name.
515 </p><dl>
516 <dt><i>name</i></dt>
517 <dd>
518 name of the item (string)
519 </dd>
520 </dl><dl>
521 <dt>Returns:</dt>
522 <dd>
523 index of the item found (QModelIndex)
524 </dd>
525 </dl><a NAME="ProjectBrowserModel.populateItem" ID="ProjectBrowserModel.populateItem"></a>
526 <h4>ProjectBrowserModel.populateItem</h4>
527 <b>populateItem</b>(<i>parentItem, repopulate = False</i>)
528 <p>
529 Public method to populate an item's subtree.
530 </p><dl>
531 <dt><i>parentItem</i></dt>
532 <dd>
533 reference to the item to be populated
534 </dd><dt><i>repopulate</i></dt>
535 <dd>
536 flag indicating a repopulation (boolean)
537 </dd>
538 </dl><a NAME="ProjectBrowserModel.populateProjectDirectoryItem" ID="ProjectBrowserModel.populateProjectDirectoryItem"></a>
539 <h4>ProjectBrowserModel.populateProjectDirectoryItem</h4>
540 <b>populateProjectDirectoryItem</b>(<i>parentItem, repopulate = False</i>)
541 <p>
542 Public method to populate a directory item's subtree.
543 </p><dl>
544 <dt><i>parentItem</i></dt>
545 <dd>
546 reference to the directory item to be populated
547 </dd><dt><i>repopulate</i></dt>
548 <dd>
549 flag indicating a repopulation (boolean)
550 </dd>
551 </dl><a NAME="ProjectBrowserModel.preferencesChanged" ID="ProjectBrowserModel.preferencesChanged"></a>
552 <h4>ProjectBrowserModel.preferencesChanged</h4>
553 <b>preferencesChanged</b>(<i></i>)
554 <p>
555 Public method used to handle a change in preferences.
556 </p><a NAME="ProjectBrowserModel.projectClosed" ID="ProjectBrowserModel.projectClosed"></a>
557 <h4>ProjectBrowserModel.projectClosed</h4>
558 <b>projectClosed</b>(<i></i>)
559 <p>
560 Public method called after a project has been closed.
561 </p><a NAME="ProjectBrowserModel.projectOpened" ID="ProjectBrowserModel.projectOpened"></a>
562 <h4>ProjectBrowserModel.projectOpened</h4>
563 <b>projectOpened</b>(<i></i>)
564 <p>
565 Public method used to populate the model after a project has been opened.
566 </p><a NAME="ProjectBrowserModel.projectPropertiesChanged" ID="ProjectBrowserModel.projectPropertiesChanged"></a>
567 <h4>ProjectBrowserModel.projectPropertiesChanged</h4>
568 <b>projectPropertiesChanged</b>(<i></i>)
569 <p>
570 Public method to react on a change of the project properties.
571 </p><a NAME="ProjectBrowserModel.removeItem" ID="ProjectBrowserModel.removeItem"></a>
572 <h4>ProjectBrowserModel.removeItem</h4>
573 <b>removeItem</b>(<i>name</i>)
574 <p>
575 Public method to remove a named item.
576 </p><dl>
577 <dt><i>name</i></dt>
578 <dd>
579 file or directory name of the item (string).
580 </dd>
581 </dl><a NAME="ProjectBrowserModel.renameItem" ID="ProjectBrowserModel.renameItem"></a>
582 <h4>ProjectBrowserModel.renameItem</h4>
583 <b>renameItem</b>(<i>name, newFilename</i>)
584 <p>
585 Public method to rename an item.
586 </p><dl>
587 <dt><i>name</i></dt>
588 <dd>
589 the old display name (string)
590 </dd><dt><i>newFilename</i></dt>
591 <dd>
592 new filename of the item (string)
593 </dd>
594 </dl><a NAME="ProjectBrowserModel.repopulateItem" ID="ProjectBrowserModel.repopulateItem"></a>
595 <h4>ProjectBrowserModel.repopulateItem</h4>
596 <b>repopulateItem</b>(<i>name</i>)
597 <p>
598 Public method to repopulate an item.
599 </p><dl>
600 <dt><i>name</i></dt>
601 <dd>
602 name of the file relative to the project root (string)
603 </dd>
604 </dl><a NAME="ProjectBrowserModel.updateVCSStatus" ID="ProjectBrowserModel.updateVCSStatus"></a>
605 <h4>ProjectBrowserModel.updateVCSStatus</h4>
606 <b>updateVCSStatus</b>(<i>name, recursive = True</i>)
607 <p>
608 Public method used to update the vcs status of a node.
609 </p><dl>
610 <dt><i>name</i></dt>
611 <dd>
612 filename belonging to this item (string)
613 </dd><dt><i>recursive</i></dt>
614 <dd>
615 flag indicating a recursive update (boolean)
616 </dd>
617 </dl>
618 <div align="right"><a href="#top">Up</a></div>
619 <hr /><hr />
620 <a NAME="ProjectBrowserSimpleDirectoryItem" ID="ProjectBrowserSimpleDirectoryItem"></a>
621 <h2>ProjectBrowserSimpleDirectoryItem</h2>
622 <p>
623 Class implementing the data structure for project browser simple directory items.
624 </p>
625 <h3>Derived from</h3>
626 BrowserItem, ProjectBrowserItemMixin
627 <h3>Class Attributes</h3>
628 <table>
629 <tr><td>None</td></tr>
630 </table>
631 <h3>Methods</h3>
632 <table>
633 <tr>
634 <td><a href="#ProjectBrowserSimpleDirectoryItem.__init__">ProjectBrowserSimpleDirectoryItem</a></td>
635 <td>Constructor</td>
636 </tr><tr>
637 <td><a href="#ProjectBrowserSimpleDirectoryItem.dirName">dirName</a></td>
638 <td>Public method returning the directory name.</td>
639 </tr><tr>
640 <td><a href="#ProjectBrowserSimpleDirectoryItem.lessThan">lessThan</a></td>
641 <td>Public method to check, if the item is less than the other one.</td>
642 </tr>
643 </table>
644 <a NAME="ProjectBrowserSimpleDirectoryItem.__init__" ID="ProjectBrowserSimpleDirectoryItem.__init__"></a>
645 <h4>ProjectBrowserSimpleDirectoryItem (Constructor)</h4>
646 <b>ProjectBrowserSimpleDirectoryItem</b>(<i>parent, projectType, text, path = ""</i>)
647 <p>
648 Constructor
649 </p><dl>
650 <dt><i>parent</i></dt>
651 <dd>
652 parent item
653 </dd><dt><i>projectType</i></dt>
654 <dd>
655 type of file/directory in the project
656 </dd><dt><i>text</i></dt>
657 <dd>
658 text to be displayed (string)
659 </dd><dt><i>path</i></dt>
660 <dd>
661 path of the directory (string)
662 </dd>
663 </dl><a NAME="ProjectBrowserSimpleDirectoryItem.dirName" ID="ProjectBrowserSimpleDirectoryItem.dirName"></a>
664 <h4>ProjectBrowserSimpleDirectoryItem.dirName</h4>
665 <b>dirName</b>(<i></i>)
666 <p>
667 Public method returning the directory name.
668 </p><dl>
669 <dt>Returns:</dt>
670 <dd>
671 directory name (string)
672 </dd>
673 </dl><a NAME="ProjectBrowserSimpleDirectoryItem.lessThan" ID="ProjectBrowserSimpleDirectoryItem.lessThan"></a>
674 <h4>ProjectBrowserSimpleDirectoryItem.lessThan</h4>
675 <b>lessThan</b>(<i>other, column, order</i>)
676 <p>
677 Public method to check, if the item is less than the other one.
678 </p><dl>
679 <dt><i>other</i></dt>
680 <dd>
681 reference to item to compare against (BrowserItem)
682 </dd><dt><i>column</i></dt>
683 <dd>
684 column number to use for the comparison (integer)
685 </dd><dt><i>order</i></dt>
686 <dd>
687 sort order (Qt.SortOrder) (for special sorting)
688 </dd>
689 </dl><dl>
690 <dt>Returns:</dt>
691 <dd>
692 true, if this item is less than other (boolean)
693 </dd>
694 </dl>
695 <div align="right"><a href="#top">Up</a></div>
696 <hr />
697 </body></html>

eric ide

mercurial