|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric7.MultiProject.MultiProjectBrowser</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> |
|
22 <a NAME="top" ID="top"></a> |
|
23 <h1>eric7.MultiProject.MultiProjectBrowser</h1> |
|
24 |
|
25 <p> |
|
26 Module implementing the multi project browser. |
|
27 </p> |
|
28 <h3>Global Attributes</h3> |
|
29 |
|
30 <table> |
|
31 <tr><td>None</td></tr> |
|
32 </table> |
|
33 <h3>Classes</h3> |
|
34 |
|
35 <table> |
|
36 |
|
37 <tr> |
|
38 <td><a href="#MultiProjectBrowser">MultiProjectBrowser</a></td> |
|
39 <td>Class implementing the multi project browser.</td> |
|
40 </tr> |
|
41 </table> |
|
42 <h3>Functions</h3> |
|
43 |
|
44 <table> |
|
45 <tr><td>None</td></tr> |
|
46 </table> |
|
47 <hr /> |
|
48 <hr /> |
|
49 <a NAME="MultiProjectBrowser" ID="MultiProjectBrowser"></a> |
|
50 <h2>MultiProjectBrowser</h2> |
|
51 |
|
52 <p> |
|
53 Class implementing the multi project browser. |
|
54 </p> |
|
55 <h3>Derived from</h3> |
|
56 QTreeWidget |
|
57 <h3>Class Attributes</h3> |
|
58 |
|
59 <table> |
|
60 <tr><td>ProjectFileNameRole</td></tr><tr><td>ProjectUidRole</td></tr> |
|
61 </table> |
|
62 <h3>Class Methods</h3> |
|
63 |
|
64 <table> |
|
65 <tr><td>None</td></tr> |
|
66 </table> |
|
67 <h3>Methods</h3> |
|
68 |
|
69 <table> |
|
70 |
|
71 <tr> |
|
72 <td><a href="#MultiProjectBrowser.__init__">MultiProjectBrowser</a></td> |
|
73 <td>Constructor</td> |
|
74 </tr> |
|
75 <tr> |
|
76 <td><a href="#MultiProjectBrowser.__addNewProject">__addNewProject</a></td> |
|
77 <td>Private method to add a new project entry.</td> |
|
78 </tr> |
|
79 <tr> |
|
80 <td><a href="#MultiProjectBrowser.__addProject">__addProject</a></td> |
|
81 <td>Private method to add a project to the list.</td> |
|
82 </tr> |
|
83 <tr> |
|
84 <td><a href="#MultiProjectBrowser.__configure">__configure</a></td> |
|
85 <td>Private method to open the configuration dialog.</td> |
|
86 </tr> |
|
87 <tr> |
|
88 <td><a href="#MultiProjectBrowser.__contextMenuRequested">__contextMenuRequested</a></td> |
|
89 <td>Private slot to show the context menu.</td> |
|
90 </tr> |
|
91 <tr> |
|
92 <td><a href="#MultiProjectBrowser.__copyProject">__copyProject</a></td> |
|
93 <td>Private method to copy the selected project on disk.</td> |
|
94 </tr> |
|
95 <tr> |
|
96 <td><a href="#MultiProjectBrowser.__createPopupMenu">__createPopupMenu</a></td> |
|
97 <td>Private method to create the popup menu.</td> |
|
98 </tr> |
|
99 <tr> |
|
100 <td><a href="#MultiProjectBrowser.__deleteProject">__deleteProject</a></td> |
|
101 <td>Private method to handle the Delete context menu entry.</td> |
|
102 </tr> |
|
103 <tr> |
|
104 <td><a href="#MultiProjectBrowser.__findCategoryItem">__findCategoryItem</a></td> |
|
105 <td>Private method to find the item for a category.</td> |
|
106 </tr> |
|
107 <tr> |
|
108 <td><a href="#MultiProjectBrowser.__findProjectItem">__findProjectItem</a></td> |
|
109 <td>Private method to search a specific project item.</td> |
|
110 </tr> |
|
111 <tr> |
|
112 <td><a href="#MultiProjectBrowser.__multiProjectClosed">__multiProjectClosed</a></td> |
|
113 <td>Private slot to handle the closing of a multi project.</td> |
|
114 </tr> |
|
115 <tr> |
|
116 <td><a href="#MultiProjectBrowser.__multiProjectOpened">__multiProjectOpened</a></td> |
|
117 <td>Private slot to handle the opening of a multi project.</td> |
|
118 </tr> |
|
119 <tr> |
|
120 <td><a href="#MultiProjectBrowser.__newMultiProject">__newMultiProject</a></td> |
|
121 <td>Private slot to handle the creation of a new multi project.</td> |
|
122 </tr> |
|
123 <tr> |
|
124 <td><a href="#MultiProjectBrowser.__openItem">__openItem</a></td> |
|
125 <td>Private slot to open a project.</td> |
|
126 </tr> |
|
127 <tr> |
|
128 <td><a href="#MultiProjectBrowser.__projectAdded">__projectAdded</a></td> |
|
129 <td>Private slot to handle the addition of a project to the multi project.</td> |
|
130 </tr> |
|
131 <tr> |
|
132 <td><a href="#MultiProjectBrowser.__projectClosed">__projectClosed</a></td> |
|
133 <td>Private slot to handle the closing of a project.</td> |
|
134 </tr> |
|
135 <tr> |
|
136 <td><a href="#MultiProjectBrowser.__projectDataChanged">__projectDataChanged</a></td> |
|
137 <td>Private slot to handle the change of a project of the multi project.</td> |
|
138 </tr> |
|
139 <tr> |
|
140 <td><a href="#MultiProjectBrowser.__projectOpened">__projectOpened</a></td> |
|
141 <td>Private slot to handle the opening of a project.</td> |
|
142 </tr> |
|
143 <tr> |
|
144 <td><a href="#MultiProjectBrowser.__projectRemoved">__projectRemoved</a></td> |
|
145 <td>Private slot to handle the removal of a project from the multi project.</td> |
|
146 </tr> |
|
147 <tr> |
|
148 <td><a href="#MultiProjectBrowser.__removeProject">__removeProject</a></td> |
|
149 <td>Private method to handle the Remove context menu entry.</td> |
|
150 </tr> |
|
151 <tr> |
|
152 <td><a href="#MultiProjectBrowser.__setItemData">__setItemData</a></td> |
|
153 <td>Private method to set the data of a project item.</td> |
|
154 </tr> |
|
155 <tr> |
|
156 <td><a href="#MultiProjectBrowser.__showProjectProperties">__showProjectProperties</a></td> |
|
157 <td>Private method to show the data of a project entry.</td> |
|
158 </tr> |
|
159 </table> |
|
160 <h3>Static Methods</h3> |
|
161 |
|
162 <table> |
|
163 <tr><td>None</td></tr> |
|
164 </table> |
|
165 |
|
166 <a NAME="MultiProjectBrowser.__init__" ID="MultiProjectBrowser.__init__"></a> |
|
167 <h4>MultiProjectBrowser (Constructor)</h4> |
|
168 <b>MultiProjectBrowser</b>(<i>multiProject, project, parent=None</i>) |
|
169 |
|
170 <p> |
|
171 Constructor |
|
172 </p> |
|
173 <dl> |
|
174 |
|
175 <dt><i>multiProject</i> (MultiProject)</dt> |
|
176 <dd> |
|
177 reference to the multi project object |
|
178 </dd> |
|
179 <dt><i>project</i> (Project)</dt> |
|
180 <dd> |
|
181 reference to the project object |
|
182 </dd> |
|
183 <dt><i>parent</i> (QWidget)</dt> |
|
184 <dd> |
|
185 parent widget |
|
186 </dd> |
|
187 </dl> |
|
188 <a NAME="MultiProjectBrowser.__addNewProject" ID="MultiProjectBrowser.__addNewProject"></a> |
|
189 <h4>MultiProjectBrowser.__addNewProject</h4> |
|
190 <b>__addNewProject</b>(<i></i>) |
|
191 |
|
192 <p> |
|
193 Private method to add a new project entry. |
|
194 </p> |
|
195 <a NAME="MultiProjectBrowser.__addProject" ID="MultiProjectBrowser.__addProject"></a> |
|
196 <h4>MultiProjectBrowser.__addProject</h4> |
|
197 <b>__addProject</b>(<i>project</i>) |
|
198 |
|
199 <p> |
|
200 Private method to add a project to the list. |
|
201 </p> |
|
202 <dl> |
|
203 |
|
204 <dt><i>project</i></dt> |
|
205 <dd> |
|
206 reference to the project data dictionary |
|
207 </dd> |
|
208 </dl> |
|
209 <a NAME="MultiProjectBrowser.__configure" ID="MultiProjectBrowser.__configure"></a> |
|
210 <h4>MultiProjectBrowser.__configure</h4> |
|
211 <b>__configure</b>(<i></i>) |
|
212 |
|
213 <p> |
|
214 Private method to open the configuration dialog. |
|
215 </p> |
|
216 <a NAME="MultiProjectBrowser.__contextMenuRequested" ID="MultiProjectBrowser.__contextMenuRequested"></a> |
|
217 <h4>MultiProjectBrowser.__contextMenuRequested</h4> |
|
218 <b>__contextMenuRequested</b>(<i>coord</i>) |
|
219 |
|
220 <p> |
|
221 Private slot to show the context menu. |
|
222 </p> |
|
223 <dl> |
|
224 |
|
225 <dt><i>coord</i></dt> |
|
226 <dd> |
|
227 the position of the mouse pointer (QPoint) |
|
228 </dd> |
|
229 </dl> |
|
230 <a NAME="MultiProjectBrowser.__copyProject" ID="MultiProjectBrowser.__copyProject"></a> |
|
231 <h4>MultiProjectBrowser.__copyProject</h4> |
|
232 <b>__copyProject</b>(<i></i>) |
|
233 |
|
234 <p> |
|
235 Private method to copy the selected project on disk. |
|
236 </p> |
|
237 <a NAME="MultiProjectBrowser.__createPopupMenu" ID="MultiProjectBrowser.__createPopupMenu"></a> |
|
238 <h4>MultiProjectBrowser.__createPopupMenu</h4> |
|
239 <b>__createPopupMenu</b>(<i></i>) |
|
240 |
|
241 <p> |
|
242 Private method to create the popup menu. |
|
243 </p> |
|
244 <a NAME="MultiProjectBrowser.__deleteProject" ID="MultiProjectBrowser.__deleteProject"></a> |
|
245 <h4>MultiProjectBrowser.__deleteProject</h4> |
|
246 <b>__deleteProject</b>(<i></i>) |
|
247 |
|
248 <p> |
|
249 Private method to handle the Delete context menu entry. |
|
250 </p> |
|
251 <a NAME="MultiProjectBrowser.__findCategoryItem" ID="MultiProjectBrowser.__findCategoryItem"></a> |
|
252 <h4>MultiProjectBrowser.__findCategoryItem</h4> |
|
253 <b>__findCategoryItem</b>(<i>category</i>) |
|
254 |
|
255 <p> |
|
256 Private method to find the item for a category. |
|
257 </p> |
|
258 <dl> |
|
259 |
|
260 <dt><i>category</i></dt> |
|
261 <dd> |
|
262 category to search for (string) |
|
263 </dd> |
|
264 </dl> |
|
265 <dl> |
|
266 <dt>Return:</dt> |
|
267 <dd> |
|
268 reference to the category item or None, if there is |
|
269 no such item (QTreeWidgetItem or None) |
|
270 </dd> |
|
271 </dl> |
|
272 <a NAME="MultiProjectBrowser.__findProjectItem" ID="MultiProjectBrowser.__findProjectItem"></a> |
|
273 <h4>MultiProjectBrowser.__findProjectItem</h4> |
|
274 <b>__findProjectItem</b>(<i>project</i>) |
|
275 |
|
276 <p> |
|
277 Private method to search a specific project item. |
|
278 </p> |
|
279 <dl> |
|
280 |
|
281 <dt><i>project</i></dt> |
|
282 <dd> |
|
283 reference to the project data dictionary |
|
284 </dd> |
|
285 </dl> |
|
286 <dl> |
|
287 <dt>Return:</dt> |
|
288 <dd> |
|
289 reference to the item (QTreeWidgetItem) or None |
|
290 </dd> |
|
291 </dl> |
|
292 <a NAME="MultiProjectBrowser.__multiProjectClosed" ID="MultiProjectBrowser.__multiProjectClosed"></a> |
|
293 <h4>MultiProjectBrowser.__multiProjectClosed</h4> |
|
294 <b>__multiProjectClosed</b>(<i></i>) |
|
295 |
|
296 <p> |
|
297 Private slot to handle the closing of a multi project. |
|
298 </p> |
|
299 <a NAME="MultiProjectBrowser.__multiProjectOpened" ID="MultiProjectBrowser.__multiProjectOpened"></a> |
|
300 <h4>MultiProjectBrowser.__multiProjectOpened</h4> |
|
301 <b>__multiProjectOpened</b>(<i></i>) |
|
302 |
|
303 <p> |
|
304 Private slot to handle the opening of a multi project. |
|
305 </p> |
|
306 <a NAME="MultiProjectBrowser.__newMultiProject" ID="MultiProjectBrowser.__newMultiProject"></a> |
|
307 <h4>MultiProjectBrowser.__newMultiProject</h4> |
|
308 <b>__newMultiProject</b>(<i></i>) |
|
309 |
|
310 <p> |
|
311 Private slot to handle the creation of a new multi project. |
|
312 </p> |
|
313 <a NAME="MultiProjectBrowser.__openItem" ID="MultiProjectBrowser.__openItem"></a> |
|
314 <h4>MultiProjectBrowser.__openItem</h4> |
|
315 <b>__openItem</b>(<i>itm=None</i>) |
|
316 |
|
317 <p> |
|
318 Private slot to open a project. |
|
319 </p> |
|
320 <dl> |
|
321 |
|
322 <dt><i>itm</i></dt> |
|
323 <dd> |
|
324 reference to the project item to be opened (QTreeWidgetItem) |
|
325 </dd> |
|
326 </dl> |
|
327 <a NAME="MultiProjectBrowser.__projectAdded" ID="MultiProjectBrowser.__projectAdded"></a> |
|
328 <h4>MultiProjectBrowser.__projectAdded</h4> |
|
329 <b>__projectAdded</b>(<i>project</i>) |
|
330 |
|
331 <p> |
|
332 Private slot to handle the addition of a project to the multi project. |
|
333 </p> |
|
334 <dl> |
|
335 |
|
336 <dt><i>project</i></dt> |
|
337 <dd> |
|
338 reference to the project data dictionary |
|
339 </dd> |
|
340 </dl> |
|
341 <a NAME="MultiProjectBrowser.__projectClosed" ID="MultiProjectBrowser.__projectClosed"></a> |
|
342 <h4>MultiProjectBrowser.__projectClosed</h4> |
|
343 <b>__projectClosed</b>(<i></i>) |
|
344 |
|
345 <p> |
|
346 Private slot to handle the closing of a project. |
|
347 </p> |
|
348 <a NAME="MultiProjectBrowser.__projectDataChanged" ID="MultiProjectBrowser.__projectDataChanged"></a> |
|
349 <h4>MultiProjectBrowser.__projectDataChanged</h4> |
|
350 <b>__projectDataChanged</b>(<i>project</i>) |
|
351 |
|
352 <p> |
|
353 Private slot to handle the change of a project of the multi project. |
|
354 </p> |
|
355 <dl> |
|
356 |
|
357 <dt><i>project</i></dt> |
|
358 <dd> |
|
359 reference to the project data dictionary |
|
360 </dd> |
|
361 </dl> |
|
362 <a NAME="MultiProjectBrowser.__projectOpened" ID="MultiProjectBrowser.__projectOpened"></a> |
|
363 <h4>MultiProjectBrowser.__projectOpened</h4> |
|
364 <b>__projectOpened</b>(<i></i>) |
|
365 |
|
366 <p> |
|
367 Private slot to handle the opening of a project. |
|
368 </p> |
|
369 <a NAME="MultiProjectBrowser.__projectRemoved" ID="MultiProjectBrowser.__projectRemoved"></a> |
|
370 <h4>MultiProjectBrowser.__projectRemoved</h4> |
|
371 <b>__projectRemoved</b>(<i>project</i>) |
|
372 |
|
373 <p> |
|
374 Private slot to handle the removal of a project from the multi project. |
|
375 </p> |
|
376 <dl> |
|
377 |
|
378 <dt><i>project</i></dt> |
|
379 <dd> |
|
380 reference to the project data dictionary |
|
381 </dd> |
|
382 </dl> |
|
383 <a NAME="MultiProjectBrowser.__removeProject" ID="MultiProjectBrowser.__removeProject"></a> |
|
384 <h4>MultiProjectBrowser.__removeProject</h4> |
|
385 <b>__removeProject</b>(<i></i>) |
|
386 |
|
387 <p> |
|
388 Private method to handle the Remove context menu entry. |
|
389 </p> |
|
390 <a NAME="MultiProjectBrowser.__setItemData" ID="MultiProjectBrowser.__setItemData"></a> |
|
391 <h4>MultiProjectBrowser.__setItemData</h4> |
|
392 <b>__setItemData</b>(<i>itm, project</i>) |
|
393 |
|
394 <p> |
|
395 Private method to set the data of a project item. |
|
396 </p> |
|
397 <dl> |
|
398 |
|
399 <dt><i>itm</i></dt> |
|
400 <dd> |
|
401 reference to the item to be set (QTreeWidgetItem) |
|
402 </dd> |
|
403 <dt><i>project</i></dt> |
|
404 <dd> |
|
405 reference to the project data dictionary |
|
406 </dd> |
|
407 </dl> |
|
408 <a NAME="MultiProjectBrowser.__showProjectProperties" ID="MultiProjectBrowser.__showProjectProperties"></a> |
|
409 <h4>MultiProjectBrowser.__showProjectProperties</h4> |
|
410 <b>__showProjectProperties</b>(<i></i>) |
|
411 |
|
412 <p> |
|
413 Private method to show the data of a project entry. |
|
414 </p> |
|
415 <div align="right"><a href="#top">Up</a></div> |
|
416 <hr /> |
|
417 </body></html> |