|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric7.Project.ProjectBrowserModel</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.ProjectBrowserModel</h1> |
|
10 |
|
11 <p> |
|
12 Module implementing the browser model. |
|
13 </p> |
|
14 <h3>Global Attributes</h3> |
|
15 |
|
16 <table> |
|
17 <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>ProjectBrowserProtocolsType</td></tr><tr><td>ProjectBrowserResourceType</td></tr><tr><td>ProjectBrowserSourceType</td></tr><tr><td>ProjectBrowserTranslationType</td></tr> |
|
18 </table> |
|
19 <h3>Classes</h3> |
|
20 |
|
21 <table> |
|
22 |
|
23 <tr> |
|
24 <td><a href="#ProjectBrowserDirectoryItem">ProjectBrowserDirectoryItem</a></td> |
|
25 <td>Class implementing the data structure for project browser directory items.</td> |
|
26 </tr> |
|
27 <tr> |
|
28 <td><a href="#ProjectBrowserFileItem">ProjectBrowserFileItem</a></td> |
|
29 <td>Class implementing the data structure for project browser file items.</td> |
|
30 </tr> |
|
31 <tr> |
|
32 <td><a href="#ProjectBrowserItemMixin">ProjectBrowserItemMixin</a></td> |
|
33 <td>Class implementing common methods of project browser items.</td> |
|
34 </tr> |
|
35 <tr> |
|
36 <td><a href="#ProjectBrowserModel">ProjectBrowserModel</a></td> |
|
37 <td>Class implementing the project browser model.</td> |
|
38 </tr> |
|
39 <tr> |
|
40 <td><a href="#ProjectBrowserSimpleDirectoryItem">ProjectBrowserSimpleDirectoryItem</a></td> |
|
41 <td>Class implementing the data structure for project browser simple directory items.</td> |
|
42 </tr> |
|
43 </table> |
|
44 <h3>Functions</h3> |
|
45 |
|
46 <table> |
|
47 <tr><td>None</td></tr> |
|
48 </table> |
|
49 <hr /> |
|
50 <hr /> |
|
51 <a NAME="ProjectBrowserDirectoryItem" ID="ProjectBrowserDirectoryItem"></a> |
|
52 <h2>ProjectBrowserDirectoryItem</h2> |
|
53 |
|
54 <p> |
|
55 Class implementing the data structure for project browser directory items. |
|
56 </p> |
|
57 <h3>Derived from</h3> |
|
58 BrowserDirectoryItem, ProjectBrowserItemMixin |
|
59 <h3>Class Attributes</h3> |
|
60 |
|
61 <table> |
|
62 <tr><td>None</td></tr> |
|
63 </table> |
|
64 <h3>Class Methods</h3> |
|
65 |
|
66 <table> |
|
67 <tr><td>None</td></tr> |
|
68 </table> |
|
69 <h3>Methods</h3> |
|
70 |
|
71 <table> |
|
72 |
|
73 <tr> |
|
74 <td><a href="#ProjectBrowserDirectoryItem.__init__">ProjectBrowserDirectoryItem</a></td> |
|
75 <td>Constructor</td> |
|
76 </tr> |
|
77 </table> |
|
78 <h3>Static Methods</h3> |
|
79 |
|
80 <table> |
|
81 <tr><td>None</td></tr> |
|
82 </table> |
|
83 |
|
84 <a NAME="ProjectBrowserDirectoryItem.__init__" ID="ProjectBrowserDirectoryItem.__init__"></a> |
|
85 <h4>ProjectBrowserDirectoryItem (Constructor)</h4> |
|
86 <b>ProjectBrowserDirectoryItem</b>(<i>parent, dinfo, projectType, full=True, bold=False</i>) |
|
87 |
|
88 <p> |
|
89 Constructor |
|
90 </p> |
|
91 <dl> |
|
92 |
|
93 <dt><i>parent</i></dt> |
|
94 <dd> |
|
95 parent item |
|
96 </dd> |
|
97 <dt><i>dinfo</i></dt> |
|
98 <dd> |
|
99 dinfo is the string for the directory (string) |
|
100 </dd> |
|
101 <dt><i>projectType</i></dt> |
|
102 <dd> |
|
103 type of file/directory in the project |
|
104 </dd> |
|
105 <dt><i>full</i></dt> |
|
106 <dd> |
|
107 flag indicating full pathname should be displayed (boolean) |
|
108 </dd> |
|
109 <dt><i>bold</i></dt> |
|
110 <dd> |
|
111 flag indicating a highlighted font (boolean) |
|
112 </dd> |
|
113 </dl> |
|
114 <div align="right"><a href="#top">Up</a></div> |
|
115 <hr /> |
|
116 <hr /> |
|
117 <a NAME="ProjectBrowserFileItem" ID="ProjectBrowserFileItem"></a> |
|
118 <h2>ProjectBrowserFileItem</h2> |
|
119 |
|
120 <p> |
|
121 Class implementing the data structure for project browser file items. |
|
122 </p> |
|
123 <h3>Derived from</h3> |
|
124 BrowserFileItem, ProjectBrowserItemMixin |
|
125 <h3>Class Attributes</h3> |
|
126 |
|
127 <table> |
|
128 <tr><td>None</td></tr> |
|
129 </table> |
|
130 <h3>Class Methods</h3> |
|
131 |
|
132 <table> |
|
133 <tr><td>None</td></tr> |
|
134 </table> |
|
135 <h3>Methods</h3> |
|
136 |
|
137 <table> |
|
138 |
|
139 <tr> |
|
140 <td><a href="#ProjectBrowserFileItem.__init__">ProjectBrowserFileItem</a></td> |
|
141 <td>Constructor</td> |
|
142 </tr> |
|
143 </table> |
|
144 <h3>Static Methods</h3> |
|
145 |
|
146 <table> |
|
147 <tr><td>None</td></tr> |
|
148 </table> |
|
149 |
|
150 <a NAME="ProjectBrowserFileItem.__init__" ID="ProjectBrowserFileItem.__init__"></a> |
|
151 <h4>ProjectBrowserFileItem (Constructor)</h4> |
|
152 <b>ProjectBrowserFileItem</b>(<i>parent, finfo, projectType, full=True, bold=False, sourceLanguage=""</i>) |
|
153 |
|
154 <p> |
|
155 Constructor |
|
156 </p> |
|
157 <dl> |
|
158 |
|
159 <dt><i>parent</i></dt> |
|
160 <dd> |
|
161 parent item |
|
162 </dd> |
|
163 <dt><i>finfo</i></dt> |
|
164 <dd> |
|
165 the string for the file (string) |
|
166 </dd> |
|
167 <dt><i>projectType</i></dt> |
|
168 <dd> |
|
169 type of file/directory in the project |
|
170 </dd> |
|
171 <dt><i>full</i></dt> |
|
172 <dd> |
|
173 flag indicating full pathname should be displayed (boolean) |
|
174 </dd> |
|
175 <dt><i>bold</i></dt> |
|
176 <dd> |
|
177 flag indicating a highlighted font (boolean) |
|
178 </dd> |
|
179 <dt><i>sourceLanguage</i></dt> |
|
180 <dd> |
|
181 source code language of the project (string) |
|
182 </dd> |
|
183 </dl> |
|
184 <div align="right"><a href="#top">Up</a></div> |
|
185 <hr /> |
|
186 <hr /> |
|
187 <a NAME="ProjectBrowserItemMixin" ID="ProjectBrowserItemMixin"></a> |
|
188 <h2>ProjectBrowserItemMixin</h2> |
|
189 |
|
190 <p> |
|
191 Class implementing common methods of project browser items. |
|
192 </p> |
|
193 <p> |
|
194 It is meant to be used as a mixin class. |
|
195 </p> |
|
196 <h3>Derived from</h3> |
|
197 None |
|
198 <h3>Class Attributes</h3> |
|
199 |
|
200 <table> |
|
201 <tr><td>None</td></tr> |
|
202 </table> |
|
203 <h3>Class Methods</h3> |
|
204 |
|
205 <table> |
|
206 <tr><td>None</td></tr> |
|
207 </table> |
|
208 <h3>Methods</h3> |
|
209 |
|
210 <table> |
|
211 |
|
212 <tr> |
|
213 <td><a href="#ProjectBrowserItemMixin.__init__">ProjectBrowserItemMixin</a></td> |
|
214 <td>Constructor</td> |
|
215 </tr> |
|
216 <tr> |
|
217 <td><a href="#ProjectBrowserItemMixin.addProjectType">addProjectType</a></td> |
|
218 <td>Public method to add a type to the list.</td> |
|
219 </tr> |
|
220 <tr> |
|
221 <td><a href="#ProjectBrowserItemMixin.addVcsStatus">addVcsStatus</a></td> |
|
222 <td>Public method to add the VCS status.</td> |
|
223 </tr> |
|
224 <tr> |
|
225 <td><a href="#ProjectBrowserItemMixin.getProjectTypes">getProjectTypes</a></td> |
|
226 <td>Public method to get the project type.</td> |
|
227 </tr> |
|
228 <tr> |
|
229 <td><a href="#ProjectBrowserItemMixin.getTextColor">getTextColor</a></td> |
|
230 <td>Public method to get the items text color.</td> |
|
231 </tr> |
|
232 <tr> |
|
233 <td><a href="#ProjectBrowserItemMixin.setVcsState">setVcsState</a></td> |
|
234 <td>Public method to set the items VCS state.</td> |
|
235 </tr> |
|
236 <tr> |
|
237 <td><a href="#ProjectBrowserItemMixin.setVcsStatus">setVcsStatus</a></td> |
|
238 <td>Public method to set the VCS status.</td> |
|
239 </tr> |
|
240 </table> |
|
241 <h3>Static Methods</h3> |
|
242 |
|
243 <table> |
|
244 <tr><td>None</td></tr> |
|
245 </table> |
|
246 |
|
247 <a NAME="ProjectBrowserItemMixin.__init__" ID="ProjectBrowserItemMixin.__init__"></a> |
|
248 <h4>ProjectBrowserItemMixin (Constructor)</h4> |
|
249 <b>ProjectBrowserItemMixin</b>(<i>type_, bold=False</i>) |
|
250 |
|
251 <p> |
|
252 Constructor |
|
253 </p> |
|
254 <dl> |
|
255 |
|
256 <dt><i>type_</i></dt> |
|
257 <dd> |
|
258 type of file/directory in the project |
|
259 </dd> |
|
260 <dt><i>bold</i></dt> |
|
261 <dd> |
|
262 flag indicating a highlighted font |
|
263 </dd> |
|
264 </dl> |
|
265 <a NAME="ProjectBrowserItemMixin.addProjectType" ID="ProjectBrowserItemMixin.addProjectType"></a> |
|
266 <h4>ProjectBrowserItemMixin.addProjectType</h4> |
|
267 <b>addProjectType</b>(<i>type_</i>) |
|
268 |
|
269 <p> |
|
270 Public method to add a type to the list. |
|
271 </p> |
|
272 <dl> |
|
273 |
|
274 <dt><i>type_</i></dt> |
|
275 <dd> |
|
276 type to add to the list |
|
277 </dd> |
|
278 </dl> |
|
279 <a NAME="ProjectBrowserItemMixin.addVcsStatus" ID="ProjectBrowserItemMixin.addVcsStatus"></a> |
|
280 <h4>ProjectBrowserItemMixin.addVcsStatus</h4> |
|
281 <b>addVcsStatus</b>(<i>vcsStatus</i>) |
|
282 |
|
283 <p> |
|
284 Public method to add the VCS status. |
|
285 </p> |
|
286 <dl> |
|
287 |
|
288 <dt><i>vcsStatus</i></dt> |
|
289 <dd> |
|
290 VCS status text (string) |
|
291 </dd> |
|
292 </dl> |
|
293 <a NAME="ProjectBrowserItemMixin.getProjectTypes" ID="ProjectBrowserItemMixin.getProjectTypes"></a> |
|
294 <h4>ProjectBrowserItemMixin.getProjectTypes</h4> |
|
295 <b>getProjectTypes</b>(<i></i>) |
|
296 |
|
297 <p> |
|
298 Public method to get the project type. |
|
299 </p> |
|
300 <dl> |
|
301 <dt>Return:</dt> |
|
302 <dd> |
|
303 project type |
|
304 </dd> |
|
305 </dl> |
|
306 <a NAME="ProjectBrowserItemMixin.getTextColor" ID="ProjectBrowserItemMixin.getTextColor"></a> |
|
307 <h4>ProjectBrowserItemMixin.getTextColor</h4> |
|
308 <b>getTextColor</b>(<i></i>) |
|
309 |
|
310 <p> |
|
311 Public method to get the items text color. |
|
312 </p> |
|
313 <dl> |
|
314 <dt>Return:</dt> |
|
315 <dd> |
|
316 text color (QColor) |
|
317 </dd> |
|
318 </dl> |
|
319 <a NAME="ProjectBrowserItemMixin.setVcsState" ID="ProjectBrowserItemMixin.setVcsState"></a> |
|
320 <h4>ProjectBrowserItemMixin.setVcsState</h4> |
|
321 <b>setVcsState</b>(<i>state</i>) |
|
322 |
|
323 <p> |
|
324 Public method to set the items VCS state. |
|
325 </p> |
|
326 <dl> |
|
327 |
|
328 <dt><i>state</i></dt> |
|
329 <dd> |
|
330 VCS state (one of A, C, M, U or " ") (string) |
|
331 </dd> |
|
332 </dl> |
|
333 <a NAME="ProjectBrowserItemMixin.setVcsStatus" ID="ProjectBrowserItemMixin.setVcsStatus"></a> |
|
334 <h4>ProjectBrowserItemMixin.setVcsStatus</h4> |
|
335 <b>setVcsStatus</b>(<i>vcsStatus</i>) |
|
336 |
|
337 <p> |
|
338 Public method to set the VCS status. |
|
339 </p> |
|
340 <dl> |
|
341 |
|
342 <dt><i>vcsStatus</i></dt> |
|
343 <dd> |
|
344 VCS status text (string) |
|
345 </dd> |
|
346 </dl> |
|
347 <div align="right"><a href="#top">Up</a></div> |
|
348 <hr /> |
|
349 <hr /> |
|
350 <a NAME="ProjectBrowserModel" ID="ProjectBrowserModel"></a> |
|
351 <h2>ProjectBrowserModel</h2> |
|
352 |
|
353 <p> |
|
354 Class implementing the project browser model. |
|
355 </p> |
|
356 <h3>Signals</h3> |
|
357 <dl> |
|
358 |
|
359 <dt>vcsStateChanged(str)</dt> |
|
360 <dd> |
|
361 emitted after the VCS state has changed |
|
362 </dd> |
|
363 </dl> |
|
364 <h3>Derived from</h3> |
|
365 BrowserModel |
|
366 <h3>Class Attributes</h3> |
|
367 |
|
368 <table> |
|
369 <tr><td>None</td></tr> |
|
370 </table> |
|
371 <h3>Class Methods</h3> |
|
372 |
|
373 <table> |
|
374 <tr><td>None</td></tr> |
|
375 </table> |
|
376 <h3>Methods</h3> |
|
377 |
|
378 <table> |
|
379 |
|
380 <tr> |
|
381 <td><a href="#ProjectBrowserModel.__init__">ProjectBrowserModel</a></td> |
|
382 <td>Constructor</td> |
|
383 </tr> |
|
384 <tr> |
|
385 <td><a href="#ProjectBrowserModel.__addVCSStatus">__addVCSStatus</a></td> |
|
386 <td>Private method used to set the vcs status of a node.</td> |
|
387 </tr> |
|
388 <tr> |
|
389 <td><a href="#ProjectBrowserModel.__changeParentsVCSState">__changeParentsVCSState</a></td> |
|
390 <td>Private method to recursively change the parents VCS state.</td> |
|
391 </tr> |
|
392 <tr> |
|
393 <td><a href="#ProjectBrowserModel.__updateVCSStatus">__updateVCSStatus</a></td> |
|
394 <td>Private method used to update the vcs status of a node.</td> |
|
395 </tr> |
|
396 <tr> |
|
397 <td><a href="#ProjectBrowserModel.addNewItem">addNewItem</a></td> |
|
398 <td>Public method to add a new item to the model.</td> |
|
399 </tr> |
|
400 <tr> |
|
401 <td><a href="#ProjectBrowserModel.changeVCSStates">changeVCSStates</a></td> |
|
402 <td>Public slot to record the (non normal) VCS states.</td> |
|
403 </tr> |
|
404 <tr> |
|
405 <td><a href="#ProjectBrowserModel.data">data</a></td> |
|
406 <td>Public method to get data of an item.</td> |
|
407 </tr> |
|
408 <tr> |
|
409 <td><a href="#ProjectBrowserModel.directoryChanged">directoryChanged</a></td> |
|
410 <td>Public slot to handle the directoryChanged signal of the watcher.</td> |
|
411 </tr> |
|
412 <tr> |
|
413 <td><a href="#ProjectBrowserModel.findChildItem">findChildItem</a></td> |
|
414 <td>Public method to find a child item given some text.</td> |
|
415 </tr> |
|
416 <tr> |
|
417 <td><a href="#ProjectBrowserModel.findItem">findItem</a></td> |
|
418 <td>Public method to find an item given its name.</td> |
|
419 </tr> |
|
420 <tr> |
|
421 <td><a href="#ProjectBrowserModel.findParentItemByName">findParentItemByName</a></td> |
|
422 <td>Public method to find an item given its name.</td> |
|
423 </tr> |
|
424 <tr> |
|
425 <td><a href="#ProjectBrowserModel.itemIndexByName">itemIndexByName</a></td> |
|
426 <td>Public method to find an item's index given its name.</td> |
|
427 </tr> |
|
428 <tr> |
|
429 <td><a href="#ProjectBrowserModel.itemIndexByNameAndLine">itemIndexByNameAndLine</a></td> |
|
430 <td>Public method to find an item's index given its name.</td> |
|
431 </tr> |
|
432 <tr> |
|
433 <td><a href="#ProjectBrowserModel.populateItem">populateItem</a></td> |
|
434 <td>Public method to populate an item's subtree.</td> |
|
435 </tr> |
|
436 <tr> |
|
437 <td><a href="#ProjectBrowserModel.populateProjectDirectoryItem">populateProjectDirectoryItem</a></td> |
|
438 <td>Public method to populate a directory item's subtree.</td> |
|
439 </tr> |
|
440 <tr> |
|
441 <td><a href="#ProjectBrowserModel.preferencesChanged">preferencesChanged</a></td> |
|
442 <td>Public method used to handle a change in preferences.</td> |
|
443 </tr> |
|
444 <tr> |
|
445 <td><a href="#ProjectBrowserModel.projectClosed">projectClosed</a></td> |
|
446 <td>Public method called after a project has been closed.</td> |
|
447 </tr> |
|
448 <tr> |
|
449 <td><a href="#ProjectBrowserModel.projectOpened">projectOpened</a></td> |
|
450 <td>Public method used to populate the model after a project has been opened.</td> |
|
451 </tr> |
|
452 <tr> |
|
453 <td><a href="#ProjectBrowserModel.projectPropertiesChanged">projectPropertiesChanged</a></td> |
|
454 <td>Public method to react on a change of the project properties.</td> |
|
455 </tr> |
|
456 <tr> |
|
457 <td><a href="#ProjectBrowserModel.removeItem">removeItem</a></td> |
|
458 <td>Public method to remove a named item.</td> |
|
459 </tr> |
|
460 <tr> |
|
461 <td><a href="#ProjectBrowserModel.renameItem">renameItem</a></td> |
|
462 <td>Public method to rename an item.</td> |
|
463 </tr> |
|
464 <tr> |
|
465 <td><a href="#ProjectBrowserModel.repopulateItem">repopulateItem</a></td> |
|
466 <td>Public method to repopulate an item.</td> |
|
467 </tr> |
|
468 <tr> |
|
469 <td><a href="#ProjectBrowserModel.startFileSystemMonitoring">startFileSystemMonitoring</a></td> |
|
470 <td>Public method to (re)start monitoring the project file system.</td> |
|
471 </tr> |
|
472 <tr> |
|
473 <td><a href="#ProjectBrowserModel.stopFileSystemMonitoring">stopFileSystemMonitoring</a></td> |
|
474 <td>Public method to stop monitoring the project file system.</td> |
|
475 </tr> |
|
476 <tr> |
|
477 <td><a href="#ProjectBrowserModel.updateVCSStatus">updateVCSStatus</a></td> |
|
478 <td>Public method used to update the vcs status of a node.</td> |
|
479 </tr> |
|
480 </table> |
|
481 <h3>Static Methods</h3> |
|
482 |
|
483 <table> |
|
484 <tr><td>None</td></tr> |
|
485 </table> |
|
486 |
|
487 <a NAME="ProjectBrowserModel.__init__" ID="ProjectBrowserModel.__init__"></a> |
|
488 <h4>ProjectBrowserModel (Constructor)</h4> |
|
489 <b>ProjectBrowserModel</b>(<i>parent</i>) |
|
490 |
|
491 <p> |
|
492 Constructor |
|
493 </p> |
|
494 <dl> |
|
495 |
|
496 <dt><i>parent</i></dt> |
|
497 <dd> |
|
498 reference to parent object (Project.Project) |
|
499 </dd> |
|
500 </dl> |
|
501 <a NAME="ProjectBrowserModel.__addVCSStatus" ID="ProjectBrowserModel.__addVCSStatus"></a> |
|
502 <h4>ProjectBrowserModel.__addVCSStatus</h4> |
|
503 <b>__addVCSStatus</b>(<i>item, name</i>) |
|
504 |
|
505 <p> |
|
506 Private method used to set the vcs status of a node. |
|
507 </p> |
|
508 <dl> |
|
509 |
|
510 <dt><i>item</i></dt> |
|
511 <dd> |
|
512 item to work on |
|
513 </dd> |
|
514 <dt><i>name</i></dt> |
|
515 <dd> |
|
516 filename belonging to this item (string) |
|
517 </dd> |
|
518 </dl> |
|
519 <a NAME="ProjectBrowserModel.__changeParentsVCSState" ID="ProjectBrowserModel.__changeParentsVCSState"></a> |
|
520 <h4>ProjectBrowserModel.__changeParentsVCSState</h4> |
|
521 <b>__changeParentsVCSState</b>(<i>path, itemCache</i>) |
|
522 |
|
523 <p> |
|
524 Private method to recursively change the parents VCS state. |
|
525 </p> |
|
526 <dl> |
|
527 |
|
528 <dt><i>path</i></dt> |
|
529 <dd> |
|
530 pathname of parent item (string) |
|
531 </dd> |
|
532 <dt><i>itemCache</i></dt> |
|
533 <dd> |
|
534 reference to the item cache used to store |
|
535 references to named items |
|
536 </dd> |
|
537 </dl> |
|
538 <a NAME="ProjectBrowserModel.__updateVCSStatus" ID="ProjectBrowserModel.__updateVCSStatus"></a> |
|
539 <h4>ProjectBrowserModel.__updateVCSStatus</h4> |
|
540 <b>__updateVCSStatus</b>(<i>item, name, recursive=True</i>) |
|
541 |
|
542 <p> |
|
543 Private method used to update the vcs status of a node. |
|
544 </p> |
|
545 <dl> |
|
546 |
|
547 <dt><i>item</i></dt> |
|
548 <dd> |
|
549 item to work on |
|
550 </dd> |
|
551 <dt><i>name</i></dt> |
|
552 <dd> |
|
553 filename belonging to this item (string) |
|
554 </dd> |
|
555 <dt><i>recursive</i></dt> |
|
556 <dd> |
|
557 flag indicating a recursive update (boolean) |
|
558 </dd> |
|
559 </dl> |
|
560 <a NAME="ProjectBrowserModel.addNewItem" ID="ProjectBrowserModel.addNewItem"></a> |
|
561 <h4>ProjectBrowserModel.addNewItem</h4> |
|
562 <b>addNewItem</b>(<i>typeString, name, additionalTypeStrings=None</i>) |
|
563 |
|
564 <p> |
|
565 Public method to add a new item to the model. |
|
566 </p> |
|
567 <dl> |
|
568 |
|
569 <dt><i>typeString</i></dt> |
|
570 <dd> |
|
571 string denoting the type of the new item (string) |
|
572 </dd> |
|
573 <dt><i>name</i></dt> |
|
574 <dd> |
|
575 name of the new item (string) |
|
576 </dd> |
|
577 <dt><i>additionalTypeStrings</i></dt> |
|
578 <dd> |
|
579 names of additional types (list of string) |
|
580 </dd> |
|
581 </dl> |
|
582 <a NAME="ProjectBrowserModel.changeVCSStates" ID="ProjectBrowserModel.changeVCSStates"></a> |
|
583 <h4>ProjectBrowserModel.changeVCSStates</h4> |
|
584 <b>changeVCSStates</b>(<i>statesList</i>) |
|
585 |
|
586 <p> |
|
587 Public slot to record the (non normal) VCS states. |
|
588 </p> |
|
589 <dl> |
|
590 |
|
591 <dt><i>statesList</i></dt> |
|
592 <dd> |
|
593 list of VCS state entries (list of strings) giving |
|
594 the states in the first column and the path relative to the project |
|
595 directory starting with the third column. The allowed status flags |
|
596 are: |
|
597 <ul> |
|
598 <li>"A" path was added but not yet comitted</li> |
|
599 <li>"M" path has local changes</li> |
|
600 <li>"O" path was removed</li> |
|
601 <li>"R" path was deleted and then re-added</li> |
|
602 <li>"U" path needs an update</li> |
|
603 <li>"Z" path contains a conflict</li> |
|
604 <li>" " path is back at normal</li> |
|
605 </ul> |
|
606 </dd> |
|
607 </dl> |
|
608 <a NAME="ProjectBrowserModel.data" ID="ProjectBrowserModel.data"></a> |
|
609 <h4>ProjectBrowserModel.data</h4> |
|
610 <b>data</b>(<i>index, role</i>) |
|
611 |
|
612 <p> |
|
613 Public method to get data of an item. |
|
614 </p> |
|
615 <dl> |
|
616 |
|
617 <dt><i>index</i></dt> |
|
618 <dd> |
|
619 index of the data to retrieve (QModelIndex) |
|
620 </dd> |
|
621 <dt><i>role</i></dt> |
|
622 <dd> |
|
623 role of data (Qt.ItemDataRole) |
|
624 </dd> |
|
625 </dl> |
|
626 <dl> |
|
627 <dt>Return:</dt> |
|
628 <dd> |
|
629 requested data |
|
630 </dd> |
|
631 </dl> |
|
632 <a NAME="ProjectBrowserModel.directoryChanged" ID="ProjectBrowserModel.directoryChanged"></a> |
|
633 <h4>ProjectBrowserModel.directoryChanged</h4> |
|
634 <b>directoryChanged</b>(<i>path</i>) |
|
635 |
|
636 <p> |
|
637 Public slot to handle the directoryChanged signal of the watcher. |
|
638 </p> |
|
639 <dl> |
|
640 |
|
641 <dt><i>path</i></dt> |
|
642 <dd> |
|
643 path of the directory (string) |
|
644 </dd> |
|
645 </dl> |
|
646 <a NAME="ProjectBrowserModel.findChildItem" ID="ProjectBrowserModel.findChildItem"></a> |
|
647 <h4>ProjectBrowserModel.findChildItem</h4> |
|
648 <b>findChildItem</b>(<i>text, column, parentItem=None</i>) |
|
649 |
|
650 <p> |
|
651 Public method to find a child item given some text. |
|
652 </p> |
|
653 <dl> |
|
654 |
|
655 <dt><i>text</i></dt> |
|
656 <dd> |
|
657 text to search for (string) |
|
658 </dd> |
|
659 <dt><i>column</i></dt> |
|
660 <dd> |
|
661 column to search in (integer) |
|
662 </dd> |
|
663 <dt><i>parentItem</i></dt> |
|
664 <dd> |
|
665 reference to parent item |
|
666 </dd> |
|
667 </dl> |
|
668 <dl> |
|
669 <dt>Return:</dt> |
|
670 <dd> |
|
671 reference to the item found |
|
672 </dd> |
|
673 </dl> |
|
674 <a NAME="ProjectBrowserModel.findItem" ID="ProjectBrowserModel.findItem"></a> |
|
675 <h4>ProjectBrowserModel.findItem</h4> |
|
676 <b>findItem</b>(<i>name</i>) |
|
677 |
|
678 <p> |
|
679 Public method to find an item given its name. |
|
680 </p> |
|
681 <dl> |
|
682 |
|
683 <dt><i>name</i></dt> |
|
684 <dd> |
|
685 name of the item (string) |
|
686 </dd> |
|
687 </dl> |
|
688 <dl> |
|
689 <dt>Return:</dt> |
|
690 <dd> |
|
691 reference to the item found |
|
692 </dd> |
|
693 </dl> |
|
694 <a NAME="ProjectBrowserModel.findParentItemByName" ID="ProjectBrowserModel.findParentItemByName"></a> |
|
695 <h4>ProjectBrowserModel.findParentItemByName</h4> |
|
696 <b>findParentItemByName</b>(<i>type_, name, dontSplit=False</i>) |
|
697 |
|
698 <p> |
|
699 Public method to find an item given its name. |
|
700 </p> |
|
701 <p> |
|
702 <b>Note</b>: This method creates all necessary parent items, if they |
|
703 don't exist. |
|
704 </p> |
|
705 <dl> |
|
706 |
|
707 <dt><i>type_</i></dt> |
|
708 <dd> |
|
709 type of the item |
|
710 </dd> |
|
711 <dt><i>name</i></dt> |
|
712 <dd> |
|
713 name of the item (string) |
|
714 </dd> |
|
715 <dt><i>dontSplit</i></dt> |
|
716 <dd> |
|
717 flag indicating the name should not be split (boolean) |
|
718 </dd> |
|
719 </dl> |
|
720 <dl> |
|
721 <dt>Return:</dt> |
|
722 <dd> |
|
723 reference to the item found and the new display name (string) |
|
724 </dd> |
|
725 </dl> |
|
726 <a NAME="ProjectBrowserModel.itemIndexByName" ID="ProjectBrowserModel.itemIndexByName"></a> |
|
727 <h4>ProjectBrowserModel.itemIndexByName</h4> |
|
728 <b>itemIndexByName</b>(<i>name</i>) |
|
729 |
|
730 <p> |
|
731 Public method to find an item's index given its name. |
|
732 </p> |
|
733 <dl> |
|
734 |
|
735 <dt><i>name</i></dt> |
|
736 <dd> |
|
737 name of the item (string) |
|
738 </dd> |
|
739 </dl> |
|
740 <dl> |
|
741 <dt>Return:</dt> |
|
742 <dd> |
|
743 index of the item found (QModelIndex) |
|
744 </dd> |
|
745 </dl> |
|
746 <a NAME="ProjectBrowserModel.itemIndexByNameAndLine" ID="ProjectBrowserModel.itemIndexByNameAndLine"></a> |
|
747 <h4>ProjectBrowserModel.itemIndexByNameAndLine</h4> |
|
748 <b>itemIndexByNameAndLine</b>(<i>name, lineno</i>) |
|
749 |
|
750 <p> |
|
751 Public method to find an item's index given its name. |
|
752 </p> |
|
753 <dl> |
|
754 |
|
755 <dt><i>name</i></dt> |
|
756 <dd> |
|
757 name of the item (string) |
|
758 </dd> |
|
759 <dt><i>lineno</i></dt> |
|
760 <dd> |
|
761 one based line number of the item (integer) |
|
762 </dd> |
|
763 </dl> |
|
764 <dl> |
|
765 <dt>Return:</dt> |
|
766 <dd> |
|
767 index of the item found (QModelIndex) |
|
768 </dd> |
|
769 </dl> |
|
770 <a NAME="ProjectBrowserModel.populateItem" ID="ProjectBrowserModel.populateItem"></a> |
|
771 <h4>ProjectBrowserModel.populateItem</h4> |
|
772 <b>populateItem</b>(<i>parentItem, repopulate=False</i>) |
|
773 |
|
774 <p> |
|
775 Public method to populate an item's subtree. |
|
776 </p> |
|
777 <dl> |
|
778 |
|
779 <dt><i>parentItem</i></dt> |
|
780 <dd> |
|
781 reference to the item to be populated |
|
782 </dd> |
|
783 <dt><i>repopulate</i></dt> |
|
784 <dd> |
|
785 flag indicating a repopulation (boolean) |
|
786 </dd> |
|
787 </dl> |
|
788 <a NAME="ProjectBrowserModel.populateProjectDirectoryItem" ID="ProjectBrowserModel.populateProjectDirectoryItem"></a> |
|
789 <h4>ProjectBrowserModel.populateProjectDirectoryItem</h4> |
|
790 <b>populateProjectDirectoryItem</b>(<i>parentItem, repopulate=False</i>) |
|
791 |
|
792 <p> |
|
793 Public method to populate a directory item's subtree. |
|
794 </p> |
|
795 <dl> |
|
796 |
|
797 <dt><i>parentItem</i></dt> |
|
798 <dd> |
|
799 reference to the directory item to be populated |
|
800 </dd> |
|
801 <dt><i>repopulate</i></dt> |
|
802 <dd> |
|
803 flag indicating a repopulation (boolean) |
|
804 </dd> |
|
805 </dl> |
|
806 <a NAME="ProjectBrowserModel.preferencesChanged" ID="ProjectBrowserModel.preferencesChanged"></a> |
|
807 <h4>ProjectBrowserModel.preferencesChanged</h4> |
|
808 <b>preferencesChanged</b>(<i></i>) |
|
809 |
|
810 <p> |
|
811 Public method used to handle a change in preferences. |
|
812 </p> |
|
813 <a NAME="ProjectBrowserModel.projectClosed" ID="ProjectBrowserModel.projectClosed"></a> |
|
814 <h4>ProjectBrowserModel.projectClosed</h4> |
|
815 <b>projectClosed</b>(<i></i>) |
|
816 |
|
817 <p> |
|
818 Public method called after a project has been closed. |
|
819 </p> |
|
820 <a NAME="ProjectBrowserModel.projectOpened" ID="ProjectBrowserModel.projectOpened"></a> |
|
821 <h4>ProjectBrowserModel.projectOpened</h4> |
|
822 <b>projectOpened</b>(<i></i>) |
|
823 |
|
824 <p> |
|
825 Public method used to populate the model after a project has been |
|
826 opened. |
|
827 </p> |
|
828 <a NAME="ProjectBrowserModel.projectPropertiesChanged" ID="ProjectBrowserModel.projectPropertiesChanged"></a> |
|
829 <h4>ProjectBrowserModel.projectPropertiesChanged</h4> |
|
830 <b>projectPropertiesChanged</b>(<i></i>) |
|
831 |
|
832 <p> |
|
833 Public method to react on a change of the project properties. |
|
834 </p> |
|
835 <a NAME="ProjectBrowserModel.removeItem" ID="ProjectBrowserModel.removeItem"></a> |
|
836 <h4>ProjectBrowserModel.removeItem</h4> |
|
837 <b>removeItem</b>(<i>name</i>) |
|
838 |
|
839 <p> |
|
840 Public method to remove a named item. |
|
841 </p> |
|
842 <dl> |
|
843 |
|
844 <dt><i>name</i></dt> |
|
845 <dd> |
|
846 file or directory name of the item (string). |
|
847 </dd> |
|
848 </dl> |
|
849 <a NAME="ProjectBrowserModel.renameItem" ID="ProjectBrowserModel.renameItem"></a> |
|
850 <h4>ProjectBrowserModel.renameItem</h4> |
|
851 <b>renameItem</b>(<i>name, newFilename</i>) |
|
852 |
|
853 <p> |
|
854 Public method to rename an item. |
|
855 </p> |
|
856 <dl> |
|
857 |
|
858 <dt><i>name</i></dt> |
|
859 <dd> |
|
860 the old display name (string) |
|
861 </dd> |
|
862 <dt><i>newFilename</i></dt> |
|
863 <dd> |
|
864 new filename of the item (string) |
|
865 </dd> |
|
866 </dl> |
|
867 <a NAME="ProjectBrowserModel.repopulateItem" ID="ProjectBrowserModel.repopulateItem"></a> |
|
868 <h4>ProjectBrowserModel.repopulateItem</h4> |
|
869 <b>repopulateItem</b>(<i>name</i>) |
|
870 |
|
871 <p> |
|
872 Public method to repopulate an item. |
|
873 </p> |
|
874 <dl> |
|
875 |
|
876 <dt><i>name</i></dt> |
|
877 <dd> |
|
878 name of the file relative to the project root (string) |
|
879 </dd> |
|
880 </dl> |
|
881 <a NAME="ProjectBrowserModel.startFileSystemMonitoring" ID="ProjectBrowserModel.startFileSystemMonitoring"></a> |
|
882 <h4>ProjectBrowserModel.startFileSystemMonitoring</h4> |
|
883 <b>startFileSystemMonitoring</b>(<i></i>) |
|
884 |
|
885 <p> |
|
886 Public method to (re)start monitoring the project file system. |
|
887 </p> |
|
888 <a NAME="ProjectBrowserModel.stopFileSystemMonitoring" ID="ProjectBrowserModel.stopFileSystemMonitoring"></a> |
|
889 <h4>ProjectBrowserModel.stopFileSystemMonitoring</h4> |
|
890 <b>stopFileSystemMonitoring</b>(<i></i>) |
|
891 |
|
892 <p> |
|
893 Public method to stop monitoring the project file system. |
|
894 </p> |
|
895 <a NAME="ProjectBrowserModel.updateVCSStatus" ID="ProjectBrowserModel.updateVCSStatus"></a> |
|
896 <h4>ProjectBrowserModel.updateVCSStatus</h4> |
|
897 <b>updateVCSStatus</b>(<i>name, recursive=True</i>) |
|
898 |
|
899 <p> |
|
900 Public method used to update the vcs status of a node. |
|
901 </p> |
|
902 <dl> |
|
903 |
|
904 <dt><i>name</i></dt> |
|
905 <dd> |
|
906 filename belonging to this item (string) |
|
907 </dd> |
|
908 <dt><i>recursive</i></dt> |
|
909 <dd> |
|
910 flag indicating a recursive update (boolean) |
|
911 </dd> |
|
912 </dl> |
|
913 <div align="right"><a href="#top">Up</a></div> |
|
914 <hr /> |
|
915 <hr /> |
|
916 <a NAME="ProjectBrowserSimpleDirectoryItem" ID="ProjectBrowserSimpleDirectoryItem"></a> |
|
917 <h2>ProjectBrowserSimpleDirectoryItem</h2> |
|
918 |
|
919 <p> |
|
920 Class implementing the data structure for project browser simple directory |
|
921 items. |
|
922 </p> |
|
923 <h3>Derived from</h3> |
|
924 BrowserItem, ProjectBrowserItemMixin |
|
925 <h3>Class Attributes</h3> |
|
926 |
|
927 <table> |
|
928 <tr><td>None</td></tr> |
|
929 </table> |
|
930 <h3>Class Methods</h3> |
|
931 |
|
932 <table> |
|
933 <tr><td>None</td></tr> |
|
934 </table> |
|
935 <h3>Methods</h3> |
|
936 |
|
937 <table> |
|
938 |
|
939 <tr> |
|
940 <td><a href="#ProjectBrowserSimpleDirectoryItem.__init__">ProjectBrowserSimpleDirectoryItem</a></td> |
|
941 <td>Constructor</td> |
|
942 </tr> |
|
943 <tr> |
|
944 <td><a href="#ProjectBrowserSimpleDirectoryItem.dirName">dirName</a></td> |
|
945 <td>Public method returning the directory name.</td> |
|
946 </tr> |
|
947 <tr> |
|
948 <td><a href="#ProjectBrowserSimpleDirectoryItem.lessThan">lessThan</a></td> |
|
949 <td>Public method to check, if the item is less than the other one.</td> |
|
950 </tr> |
|
951 <tr> |
|
952 <td><a href="#ProjectBrowserSimpleDirectoryItem.name">name</a></td> |
|
953 <td>Public method to return the name of the item.</td> |
|
954 </tr> |
|
955 <tr> |
|
956 <td><a href="#ProjectBrowserSimpleDirectoryItem.setName">setName</a></td> |
|
957 <td>Public method to set the directory name.</td> |
|
958 </tr> |
|
959 </table> |
|
960 <h3>Static Methods</h3> |
|
961 |
|
962 <table> |
|
963 <tr><td>None</td></tr> |
|
964 </table> |
|
965 |
|
966 <a NAME="ProjectBrowserSimpleDirectoryItem.__init__" ID="ProjectBrowserSimpleDirectoryItem.__init__"></a> |
|
967 <h4>ProjectBrowserSimpleDirectoryItem (Constructor)</h4> |
|
968 <b>ProjectBrowserSimpleDirectoryItem</b>(<i>parent, projectType, text, path=""</i>) |
|
969 |
|
970 <p> |
|
971 Constructor |
|
972 </p> |
|
973 <dl> |
|
974 |
|
975 <dt><i>parent</i></dt> |
|
976 <dd> |
|
977 parent item |
|
978 </dd> |
|
979 <dt><i>projectType</i></dt> |
|
980 <dd> |
|
981 type of file/directory in the project |
|
982 </dd> |
|
983 <dt><i>text</i></dt> |
|
984 <dd> |
|
985 text to be displayed (string) |
|
986 </dd> |
|
987 <dt><i>path</i></dt> |
|
988 <dd> |
|
989 path of the directory (string) |
|
990 </dd> |
|
991 </dl> |
|
992 <a NAME="ProjectBrowserSimpleDirectoryItem.dirName" ID="ProjectBrowserSimpleDirectoryItem.dirName"></a> |
|
993 <h4>ProjectBrowserSimpleDirectoryItem.dirName</h4> |
|
994 <b>dirName</b>(<i></i>) |
|
995 |
|
996 <p> |
|
997 Public method returning the directory name. |
|
998 </p> |
|
999 <dl> |
|
1000 <dt>Return:</dt> |
|
1001 <dd> |
|
1002 directory name (string) |
|
1003 </dd> |
|
1004 </dl> |
|
1005 <a NAME="ProjectBrowserSimpleDirectoryItem.lessThan" ID="ProjectBrowserSimpleDirectoryItem.lessThan"></a> |
|
1006 <h4>ProjectBrowserSimpleDirectoryItem.lessThan</h4> |
|
1007 <b>lessThan</b>(<i>other, column, order</i>) |
|
1008 |
|
1009 <p> |
|
1010 Public method to check, if the item is less than the other one. |
|
1011 </p> |
|
1012 <dl> |
|
1013 |
|
1014 <dt><i>other</i></dt> |
|
1015 <dd> |
|
1016 reference to item to compare against (BrowserItem) |
|
1017 </dd> |
|
1018 <dt><i>column</i></dt> |
|
1019 <dd> |
|
1020 column number to use for the comparison (integer) |
|
1021 </dd> |
|
1022 <dt><i>order</i></dt> |
|
1023 <dd> |
|
1024 sort order (Qt.SortOrder) (for special sorting) |
|
1025 </dd> |
|
1026 </dl> |
|
1027 <dl> |
|
1028 <dt>Return:</dt> |
|
1029 <dd> |
|
1030 true, if this item is less than other (boolean) |
|
1031 </dd> |
|
1032 </dl> |
|
1033 <a NAME="ProjectBrowserSimpleDirectoryItem.name" ID="ProjectBrowserSimpleDirectoryItem.name"></a> |
|
1034 <h4>ProjectBrowserSimpleDirectoryItem.name</h4> |
|
1035 <b>name</b>(<i></i>) |
|
1036 |
|
1037 <p> |
|
1038 Public method to return the name of the item. |
|
1039 </p> |
|
1040 <dl> |
|
1041 <dt>Return:</dt> |
|
1042 <dd> |
|
1043 name of the item (string) |
|
1044 </dd> |
|
1045 </dl> |
|
1046 <a NAME="ProjectBrowserSimpleDirectoryItem.setName" ID="ProjectBrowserSimpleDirectoryItem.setName"></a> |
|
1047 <h4>ProjectBrowserSimpleDirectoryItem.setName</h4> |
|
1048 <b>setName</b>(<i>dinfo, full=True</i>) |
|
1049 |
|
1050 <p> |
|
1051 Public method to set the directory name. |
|
1052 </p> |
|
1053 <dl> |
|
1054 |
|
1055 <dt><i>dinfo</i></dt> |
|
1056 <dd> |
|
1057 dinfo is the string for the directory (string) |
|
1058 </dd> |
|
1059 <dt><i>full</i></dt> |
|
1060 <dd> |
|
1061 flag indicating full pathname should be displayed (boolean) |
|
1062 </dd> |
|
1063 </dl> |
|
1064 <div align="right"><a href="#top">Up</a></div> |
|
1065 <hr /> |
|
1066 </body></html> |