|
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>eric5.Plugins.ViewManagerPlugins.Tabview.Tabview</title> |
|
6 <style> |
|
7 b'body {\n background:white;\n margin: 0em 1em 10em 1em;\n color: black;\n}\n\nh1 { color: white; background: #4FA4FF; }\nh2 { color: white; background: #4FA4FF; }\nh3 { color: white; background: #00557F; }\nh4 { color: white; background: #00557F; }\n \na { color: #AA5500; }\n' |
|
8 </style> |
|
9 </head> |
|
10 <body><a NAME="top" ID="top"></a> |
|
11 <h1>eric5.Plugins.ViewManagerPlugins.Tabview.Tabview</h1> |
|
12 <p> |
|
13 Module implementing a tabbed viewmanager class. |
|
14 </p> |
|
15 <h3>Global Attributes</h3> |
|
16 <table> |
|
17 <tr><td>None</td></tr> |
|
18 </table> |
|
19 <h3>Classes</h3> |
|
20 <table> |
|
21 <tr> |
|
22 <td><a href="#TabBar">TabBar</a></td> |
|
23 <td>Class implementing a customized tab bar supporting drag & drop.</td> |
|
24 </tr><tr> |
|
25 <td><a href="#TabWidget">TabWidget</a></td> |
|
26 <td>Class implementing a custimized tab widget.</td> |
|
27 </tr><tr> |
|
28 <td><a href="#Tabview">Tabview</a></td> |
|
29 <td>Class implementing a tabbed viewmanager class embedded in a splitter.</td> |
|
30 </tr> |
|
31 </table> |
|
32 <h3>Functions</h3> |
|
33 <table> |
|
34 <tr><td>None</td></tr> |
|
35 </table> |
|
36 <hr /><hr /> |
|
37 <a NAME="TabBar" ID="TabBar"></a> |
|
38 <h2>TabBar</h2> |
|
39 <p> |
|
40 Class implementing a customized tab bar supporting drag & drop. |
|
41 </p><h4>Signals</h4> |
|
42 <dl> |
|
43 <dt>tabCopyRequested(int, int)</dt> |
|
44 <dd> |
|
45 emitted to signal a clone request giving |
|
46 the old and new index position |
|
47 </dd><dt>tabCopyRequested(long, int, int)</dt> |
|
48 <dd> |
|
49 emitted to signal a clone request |
|
50 giving the id of the source tab widget, the index in the source tab widget |
|
51 and the new index position |
|
52 </dd><dt>tabMoveRequested(int, int)</dt> |
|
53 <dd> |
|
54 emitted to signal a tab move request giving |
|
55 the old and new index position |
|
56 </dd><dt>tabRelocateRequested(long, int, int)</dt> |
|
57 <dd> |
|
58 emitted to signal a tab relocation |
|
59 request giving the id of the old tab widget, the index in the old tab widget |
|
60 and the new index position |
|
61 </dd> |
|
62 </dl> |
|
63 <h3>Derived from</h3> |
|
64 E4WheelTabBar |
|
65 <h3>Class Attributes</h3> |
|
66 <table> |
|
67 <tr><td>None</td></tr> |
|
68 </table> |
|
69 <h3>Methods</h3> |
|
70 <table> |
|
71 <tr> |
|
72 <td><a href="#TabBar.__init__">TabBar</a></td> |
|
73 <td>Constructor</td> |
|
74 </tr><tr> |
|
75 <td><a href="#TabBar.dragEnterEvent">dragEnterEvent</a></td> |
|
76 <td>Protected method to handle drag enter events.</td> |
|
77 </tr><tr> |
|
78 <td><a href="#TabBar.dropEvent">dropEvent</a></td> |
|
79 <td>Protected method to handle drop events.</td> |
|
80 </tr><tr> |
|
81 <td><a href="#TabBar.mouseMoveEvent">mouseMoveEvent</a></td> |
|
82 <td>Protected method to handle mouse move events.</td> |
|
83 </tr><tr> |
|
84 <td><a href="#TabBar.mousePressEvent">mousePressEvent</a></td> |
|
85 <td>Protected method to handle mouse press events.</td> |
|
86 </tr> |
|
87 </table> |
|
88 <a NAME="TabBar.__init__" ID="TabBar.__init__"></a> |
|
89 <h4>TabBar (Constructor)</h4> |
|
90 <b>TabBar</b>(<i>parent = None</i>) |
|
91 <p> |
|
92 Constructor |
|
93 </p><dl> |
|
94 <dt><i>parent</i></dt> |
|
95 <dd> |
|
96 reference to the parent widget (QWidget) |
|
97 </dd> |
|
98 </dl><a NAME="TabBar.dragEnterEvent" ID="TabBar.dragEnterEvent"></a> |
|
99 <h4>TabBar.dragEnterEvent</h4> |
|
100 <b>dragEnterEvent</b>(<i>event</i>) |
|
101 <p> |
|
102 Protected method to handle drag enter events. |
|
103 </p><dl> |
|
104 <dt><i>event</i></dt> |
|
105 <dd> |
|
106 reference to the drag enter event (QDragEnterEvent) |
|
107 </dd> |
|
108 </dl><a NAME="TabBar.dropEvent" ID="TabBar.dropEvent"></a> |
|
109 <h4>TabBar.dropEvent</h4> |
|
110 <b>dropEvent</b>(<i>event</i>) |
|
111 <p> |
|
112 Protected method to handle drop events. |
|
113 </p><dl> |
|
114 <dt><i>event</i></dt> |
|
115 <dd> |
|
116 reference to the drop event (QDropEvent) |
|
117 </dd> |
|
118 </dl><a NAME="TabBar.mouseMoveEvent" ID="TabBar.mouseMoveEvent"></a> |
|
119 <h4>TabBar.mouseMoveEvent</h4> |
|
120 <b>mouseMoveEvent</b>(<i>event</i>) |
|
121 <p> |
|
122 Protected method to handle mouse move events. |
|
123 </p><dl> |
|
124 <dt><i>event</i></dt> |
|
125 <dd> |
|
126 reference to the mouse move event (QMouseEvent) |
|
127 </dd> |
|
128 </dl><a NAME="TabBar.mousePressEvent" ID="TabBar.mousePressEvent"></a> |
|
129 <h4>TabBar.mousePressEvent</h4> |
|
130 <b>mousePressEvent</b>(<i>event</i>) |
|
131 <p> |
|
132 Protected method to handle mouse press events. |
|
133 </p><dl> |
|
134 <dt><i>event</i></dt> |
|
135 <dd> |
|
136 reference to the mouse press event (QMouseEvent) |
|
137 </dd> |
|
138 </dl> |
|
139 <div align="right"><a href="#top">Up</a></div> |
|
140 <hr /><hr /> |
|
141 <a NAME="TabWidget" ID="TabWidget"></a> |
|
142 <h2>TabWidget</h2> |
|
143 <p> |
|
144 Class implementing a custimized tab widget. |
|
145 </p> |
|
146 <h3>Derived from</h3> |
|
147 E4TabWidget |
|
148 <h3>Class Attributes</h3> |
|
149 <table> |
|
150 <tr><td>None</td></tr> |
|
151 </table> |
|
152 <h3>Methods</h3> |
|
153 <table> |
|
154 <tr> |
|
155 <td><a href="#TabWidget.__init__">TabWidget</a></td> |
|
156 <td>Constructor</td> |
|
157 </tr><tr> |
|
158 <td><a href="#TabWidget.__captionChange">__captionChange</a></td> |
|
159 <td>Private method to handle Caption change signals from the editor.</td> |
|
160 </tr><tr> |
|
161 <td><a href="#TabWidget.__closeButtonClicked">__closeButtonClicked</a></td> |
|
162 <td>Private method to handle the press of the close button.</td> |
|
163 </tr><tr> |
|
164 <td><a href="#TabWidget.__closeRequested">__closeRequested</a></td> |
|
165 <td>Private method to handle the press of the individual tab close button.</td> |
|
166 </tr><tr> |
|
167 <td><a href="#TabWidget.__contextMenuClose">__contextMenuClose</a></td> |
|
168 <td>Private method to close the selected tab.</td> |
|
169 </tr><tr> |
|
170 <td><a href="#TabWidget.__contextMenuCloseAll">__contextMenuCloseAll</a></td> |
|
171 <td>Private method to close all tabs.</td> |
|
172 </tr><tr> |
|
173 <td><a href="#TabWidget.__contextMenuCloseOthers">__contextMenuCloseOthers</a></td> |
|
174 <td>Private method to close the other tabs.</td> |
|
175 </tr><tr> |
|
176 <td><a href="#TabWidget.__contextMenuMoveFirst">__contextMenuMoveFirst</a></td> |
|
177 <td>Private method to move a tab to the first position.</td> |
|
178 </tr><tr> |
|
179 <td><a href="#TabWidget.__contextMenuMoveLast">__contextMenuMoveLast</a></td> |
|
180 <td>Private method to move a tab to the last position.</td> |
|
181 </tr><tr> |
|
182 <td><a href="#TabWidget.__contextMenuMoveLeft">__contextMenuMoveLeft</a></td> |
|
183 <td>Private method to move a tab one position to the left.</td> |
|
184 </tr><tr> |
|
185 <td><a href="#TabWidget.__contextMenuMoveRight">__contextMenuMoveRight</a></td> |
|
186 <td>Private method to move a tab one position to the right.</td> |
|
187 </tr><tr> |
|
188 <td><a href="#TabWidget.__contextMenuPrintFile">__contextMenuPrintFile</a></td> |
|
189 <td>Private method to print the selected tab.</td> |
|
190 </tr><tr> |
|
191 <td><a href="#TabWidget.__contextMenuSave">__contextMenuSave</a></td> |
|
192 <td>Private method to save the selected tab.</td> |
|
193 </tr><tr> |
|
194 <td><a href="#TabWidget.__contextMenuSaveAll">__contextMenuSaveAll</a></td> |
|
195 <td>Private method to save all tabs.</td> |
|
196 </tr><tr> |
|
197 <td><a href="#TabWidget.__contextMenuSaveAs">__contextMenuSaveAs</a></td> |
|
198 <td>Private method to save the selected tab to a new file.</td> |
|
199 </tr><tr> |
|
200 <td><a href="#TabWidget.__contextMenuSaveToProject">__contextMenuSaveToProject</a></td> |
|
201 <td>Private method to save the selected tab to the current project.</td> |
|
202 </tr><tr> |
|
203 <td><a href="#TabWidget.__initMenu">__initMenu</a></td> |
|
204 <td>Private method to initialize the tab context menu.</td> |
|
205 </tr><tr> |
|
206 <td><a href="#TabWidget.__navigationMenuTriggered">__navigationMenuTriggered</a></td> |
|
207 <td>Private slot called to handle the navigation button menu selection.</td> |
|
208 </tr><tr> |
|
209 <td><a href="#TabWidget.__showContextMenu">__showContextMenu</a></td> |
|
210 <td>Private slot to show the tab context menu.</td> |
|
211 </tr><tr> |
|
212 <td><a href="#TabWidget.__showNavigationMenu">__showNavigationMenu</a></td> |
|
213 <td>Private slot to show the navigation button menu.</td> |
|
214 </tr><tr> |
|
215 <td><a href="#TabWidget.addTab">addTab</a></td> |
|
216 <td>Overwritten method to add a new tab.</td> |
|
217 </tr><tr> |
|
218 <td><a href="#TabWidget.copyTab">copyTab</a></td> |
|
219 <td>Public method to copy an editor.</td> |
|
220 </tr><tr> |
|
221 <td><a href="#TabWidget.copyTabOther">copyTabOther</a></td> |
|
222 <td>Public method to copy an editor from another TabWidget.</td> |
|
223 </tr><tr> |
|
224 <td><a href="#TabWidget.currentWidget">currentWidget</a></td> |
|
225 <td>Overridden method to return a reference to the current page.</td> |
|
226 </tr><tr> |
|
227 <td><a href="#TabWidget.hasEditor">hasEditor</a></td> |
|
228 <td>Public method to check for an editor.</td> |
|
229 </tr><tr> |
|
230 <td><a href="#TabWidget.hasEditors">hasEditors</a></td> |
|
231 <td>Public method to test, if any editor is managed.</td> |
|
232 </tr><tr> |
|
233 <td><a href="#TabWidget.insertWidget">insertWidget</a></td> |
|
234 <td>Overwritten method to insert a new tab.</td> |
|
235 </tr><tr> |
|
236 <td><a href="#TabWidget.mouseDoubleClickEvent">mouseDoubleClickEvent</a></td> |
|
237 <td>Protected method handling double click events.</td> |
|
238 </tr><tr> |
|
239 <td><a href="#TabWidget.relocateTab">relocateTab</a></td> |
|
240 <td>Public method to relocate an editor from another TabWidget.</td> |
|
241 </tr><tr> |
|
242 <td><a href="#TabWidget.removeWidget">removeWidget</a></td> |
|
243 <td>Public method to remove a widget.</td> |
|
244 </tr><tr> |
|
245 <td><a href="#TabWidget.showIndicator">showIndicator</a></td> |
|
246 <td>Public slot to set the indicator on or off.</td> |
|
247 </tr> |
|
248 </table> |
|
249 <a NAME="TabWidget.__init__" ID="TabWidget.__init__"></a> |
|
250 <h4>TabWidget (Constructor)</h4> |
|
251 <b>TabWidget</b>(<i>vm</i>) |
|
252 <p> |
|
253 Constructor |
|
254 </p><dl> |
|
255 <dt><i>vm</i></dt> |
|
256 <dd> |
|
257 view manager widget (Tabview) |
|
258 </dd> |
|
259 </dl><a NAME="TabWidget.__captionChange" ID="TabWidget.__captionChange"></a> |
|
260 <h4>TabWidget.__captionChange</h4> |
|
261 <b>__captionChange</b>(<i>cap, editor</i>) |
|
262 <p> |
|
263 Private method to handle Caption change signals from the editor. |
|
264 </p><p> |
|
265 Updates the tab text and tooltip text to reflect the new caption information. |
|
266 </p><dl> |
|
267 <dt><i>cap</i></dt> |
|
268 <dd> |
|
269 Caption for the editor |
|
270 </dd><dt><i>editor</i></dt> |
|
271 <dd> |
|
272 Editor to update the caption for |
|
273 </dd> |
|
274 </dl><a NAME="TabWidget.__closeButtonClicked" ID="TabWidget.__closeButtonClicked"></a> |
|
275 <h4>TabWidget.__closeButtonClicked</h4> |
|
276 <b>__closeButtonClicked</b>(<i></i>) |
|
277 <p> |
|
278 Private method to handle the press of the close button. |
|
279 </p><a NAME="TabWidget.__closeRequested" ID="TabWidget.__closeRequested"></a> |
|
280 <h4>TabWidget.__closeRequested</h4> |
|
281 <b>__closeRequested</b>(<i>index</i>) |
|
282 <p> |
|
283 Private method to handle the press of the individual tab close button. |
|
284 </p><dl> |
|
285 <dt><i>index</i></dt> |
|
286 <dd> |
|
287 index of the tab (integer) |
|
288 </dd> |
|
289 </dl><a NAME="TabWidget.__contextMenuClose" ID="TabWidget.__contextMenuClose"></a> |
|
290 <h4>TabWidget.__contextMenuClose</h4> |
|
291 <b>__contextMenuClose</b>(<i></i>) |
|
292 <p> |
|
293 Private method to close the selected tab. |
|
294 </p><a NAME="TabWidget.__contextMenuCloseAll" ID="TabWidget.__contextMenuCloseAll"></a> |
|
295 <h4>TabWidget.__contextMenuCloseAll</h4> |
|
296 <b>__contextMenuCloseAll</b>(<i></i>) |
|
297 <p> |
|
298 Private method to close all tabs. |
|
299 </p><a NAME="TabWidget.__contextMenuCloseOthers" ID="TabWidget.__contextMenuCloseOthers"></a> |
|
300 <h4>TabWidget.__contextMenuCloseOthers</h4> |
|
301 <b>__contextMenuCloseOthers</b>(<i></i>) |
|
302 <p> |
|
303 Private method to close the other tabs. |
|
304 </p><a NAME="TabWidget.__contextMenuMoveFirst" ID="TabWidget.__contextMenuMoveFirst"></a> |
|
305 <h4>TabWidget.__contextMenuMoveFirst</h4> |
|
306 <b>__contextMenuMoveFirst</b>(<i></i>) |
|
307 <p> |
|
308 Private method to move a tab to the first position. |
|
309 </p><a NAME="TabWidget.__contextMenuMoveLast" ID="TabWidget.__contextMenuMoveLast"></a> |
|
310 <h4>TabWidget.__contextMenuMoveLast</h4> |
|
311 <b>__contextMenuMoveLast</b>(<i></i>) |
|
312 <p> |
|
313 Private method to move a tab to the last position. |
|
314 </p><a NAME="TabWidget.__contextMenuMoveLeft" ID="TabWidget.__contextMenuMoveLeft"></a> |
|
315 <h4>TabWidget.__contextMenuMoveLeft</h4> |
|
316 <b>__contextMenuMoveLeft</b>(<i></i>) |
|
317 <p> |
|
318 Private method to move a tab one position to the left. |
|
319 </p><a NAME="TabWidget.__contextMenuMoveRight" ID="TabWidget.__contextMenuMoveRight"></a> |
|
320 <h4>TabWidget.__contextMenuMoveRight</h4> |
|
321 <b>__contextMenuMoveRight</b>(<i></i>) |
|
322 <p> |
|
323 Private method to move a tab one position to the right. |
|
324 </p><a NAME="TabWidget.__contextMenuPrintFile" ID="TabWidget.__contextMenuPrintFile"></a> |
|
325 <h4>TabWidget.__contextMenuPrintFile</h4> |
|
326 <b>__contextMenuPrintFile</b>(<i></i>) |
|
327 <p> |
|
328 Private method to print the selected tab. |
|
329 </p><a NAME="TabWidget.__contextMenuSave" ID="TabWidget.__contextMenuSave"></a> |
|
330 <h4>TabWidget.__contextMenuSave</h4> |
|
331 <b>__contextMenuSave</b>(<i></i>) |
|
332 <p> |
|
333 Private method to save the selected tab. |
|
334 </p><a NAME="TabWidget.__contextMenuSaveAll" ID="TabWidget.__contextMenuSaveAll"></a> |
|
335 <h4>TabWidget.__contextMenuSaveAll</h4> |
|
336 <b>__contextMenuSaveAll</b>(<i></i>) |
|
337 <p> |
|
338 Private method to save all tabs. |
|
339 </p><a NAME="TabWidget.__contextMenuSaveAs" ID="TabWidget.__contextMenuSaveAs"></a> |
|
340 <h4>TabWidget.__contextMenuSaveAs</h4> |
|
341 <b>__contextMenuSaveAs</b>(<i></i>) |
|
342 <p> |
|
343 Private method to save the selected tab to a new file. |
|
344 </p><a NAME="TabWidget.__contextMenuSaveToProject" ID="TabWidget.__contextMenuSaveToProject"></a> |
|
345 <h4>TabWidget.__contextMenuSaveToProject</h4> |
|
346 <b>__contextMenuSaveToProject</b>(<i></i>) |
|
347 <p> |
|
348 Private method to save the selected tab to the current project. |
|
349 </p><a NAME="TabWidget.__initMenu" ID="TabWidget.__initMenu"></a> |
|
350 <h4>TabWidget.__initMenu</h4> |
|
351 <b>__initMenu</b>(<i></i>) |
|
352 <p> |
|
353 Private method to initialize the tab context menu. |
|
354 </p><a NAME="TabWidget.__navigationMenuTriggered" ID="TabWidget.__navigationMenuTriggered"></a> |
|
355 <h4>TabWidget.__navigationMenuTriggered</h4> |
|
356 <b>__navigationMenuTriggered</b>(<i>act</i>) |
|
357 <p> |
|
358 Private slot called to handle the navigation button menu selection. |
|
359 </p><dl> |
|
360 <dt><i>act</i></dt> |
|
361 <dd> |
|
362 reference to the selected action (QAction) |
|
363 </dd> |
|
364 </dl><a NAME="TabWidget.__showContextMenu" ID="TabWidget.__showContextMenu"></a> |
|
365 <h4>TabWidget.__showContextMenu</h4> |
|
366 <b>__showContextMenu</b>(<i>coord, index</i>) |
|
367 <p> |
|
368 Private slot to show the tab context menu. |
|
369 </p><dl> |
|
370 <dt><i>coord</i></dt> |
|
371 <dd> |
|
372 the position of the mouse pointer (QPoint) |
|
373 </dd><dt><i>index</i></dt> |
|
374 <dd> |
|
375 index of the tab the menu is requested for (integer) |
|
376 </dd> |
|
377 </dl><a NAME="TabWidget.__showNavigationMenu" ID="TabWidget.__showNavigationMenu"></a> |
|
378 <h4>TabWidget.__showNavigationMenu</h4> |
|
379 <b>__showNavigationMenu</b>(<i></i>) |
|
380 <p> |
|
381 Private slot to show the navigation button menu. |
|
382 </p><a NAME="TabWidget.addTab" ID="TabWidget.addTab"></a> |
|
383 <h4>TabWidget.addTab</h4> |
|
384 <b>addTab</b>(<i>editor, title</i>) |
|
385 <p> |
|
386 Overwritten method to add a new tab. |
|
387 </p><dl> |
|
388 <dt><i>editor</i></dt> |
|
389 <dd> |
|
390 the editor object to be added (QScintilla.Editor.Editor) |
|
391 </dd><dt><i>title</i></dt> |
|
392 <dd> |
|
393 title for the new tab (string) |
|
394 </dd> |
|
395 </dl><a NAME="TabWidget.copyTab" ID="TabWidget.copyTab"></a> |
|
396 <h4>TabWidget.copyTab</h4> |
|
397 <b>copyTab</b>(<i>sourceIndex, targetIndex</i>) |
|
398 <p> |
|
399 Public method to copy an editor. |
|
400 </p><dl> |
|
401 <dt><i>sourceIndex</i></dt> |
|
402 <dd> |
|
403 index of the tab (integer) |
|
404 </dd><dt><i>targetIndex</i></dt> |
|
405 <dd> |
|
406 index position to place it to (integer) |
|
407 </dd> |
|
408 </dl><a NAME="TabWidget.copyTabOther" ID="TabWidget.copyTabOther"></a> |
|
409 <h4>TabWidget.copyTabOther</h4> |
|
410 <b>copyTabOther</b>(<i>sourceId, sourceIndex, targetIndex</i>) |
|
411 <p> |
|
412 Public method to copy an editor from another TabWidget. |
|
413 </p><dl> |
|
414 <dt><i>sourceId</i></dt> |
|
415 <dd> |
|
416 id of the TabWidget to get the editor from (long) |
|
417 </dd><dt><i>sourceIndex</i></dt> |
|
418 <dd> |
|
419 index of the tab in the old tab widget (integer) |
|
420 </dd><dt><i>targetIndex</i></dt> |
|
421 <dd> |
|
422 index position to place it to (integer) |
|
423 </dd> |
|
424 </dl><a NAME="TabWidget.currentWidget" ID="TabWidget.currentWidget"></a> |
|
425 <h4>TabWidget.currentWidget</h4> |
|
426 <b>currentWidget</b>(<i></i>) |
|
427 <p> |
|
428 Overridden method to return a reference to the current page. |
|
429 </p><dl> |
|
430 <dt>Returns:</dt> |
|
431 <dd> |
|
432 reference to the current page (QWidget) |
|
433 </dd> |
|
434 </dl><a NAME="TabWidget.hasEditor" ID="TabWidget.hasEditor"></a> |
|
435 <h4>TabWidget.hasEditor</h4> |
|
436 <b>hasEditor</b>(<i>editor</i>) |
|
437 <p> |
|
438 Public method to check for an editor. |
|
439 </p><dl> |
|
440 <dt><i>editor</i></dt> |
|
441 <dd> |
|
442 editor object to check for |
|
443 </dd> |
|
444 </dl><dl> |
|
445 <dt>Returns:</dt> |
|
446 <dd> |
|
447 flag indicating, whether the editor to be checked belongs |
|
448 to the list of editors managed by this tab widget. |
|
449 </dd> |
|
450 </dl><a NAME="TabWidget.hasEditors" ID="TabWidget.hasEditors"></a> |
|
451 <h4>TabWidget.hasEditors</h4> |
|
452 <b>hasEditors</b>(<i></i>) |
|
453 <p> |
|
454 Public method to test, if any editor is managed. |
|
455 </p><dl> |
|
456 <dt>Returns:</dt> |
|
457 <dd> |
|
458 flag indicating editors are managed |
|
459 </dd> |
|
460 </dl><a NAME="TabWidget.insertWidget" ID="TabWidget.insertWidget"></a> |
|
461 <h4>TabWidget.insertWidget</h4> |
|
462 <b>insertWidget</b>(<i>index, editor, title</i>) |
|
463 <p> |
|
464 Overwritten method to insert a new tab. |
|
465 </p><dl> |
|
466 <dt><i>index</i></dt> |
|
467 <dd> |
|
468 index position for the new tab (integer) |
|
469 </dd><dt><i>editor</i></dt> |
|
470 <dd> |
|
471 the editor object to be added (QScintilla.Editor.Editor) |
|
472 </dd><dt><i>title</i></dt> |
|
473 <dd> |
|
474 title for the new tab (string) |
|
475 </dd> |
|
476 </dl><dl> |
|
477 <dt>Returns:</dt> |
|
478 <dd> |
|
479 index of the inserted tab (integer) |
|
480 </dd> |
|
481 </dl><a NAME="TabWidget.mouseDoubleClickEvent" ID="TabWidget.mouseDoubleClickEvent"></a> |
|
482 <h4>TabWidget.mouseDoubleClickEvent</h4> |
|
483 <b>mouseDoubleClickEvent</b>(<i>event</i>) |
|
484 <p> |
|
485 Protected method handling double click events. |
|
486 </p><dl> |
|
487 <dt><i>event</i></dt> |
|
488 <dd> |
|
489 reference to the event object (QMouseEvent) |
|
490 </dd> |
|
491 </dl><a NAME="TabWidget.relocateTab" ID="TabWidget.relocateTab"></a> |
|
492 <h4>TabWidget.relocateTab</h4> |
|
493 <b>relocateTab</b>(<i>sourceId, sourceIndex, targetIndex</i>) |
|
494 <p> |
|
495 Public method to relocate an editor from another TabWidget. |
|
496 </p><dl> |
|
497 <dt><i>sourceId</i></dt> |
|
498 <dd> |
|
499 id of the TabWidget to get the editor from (long) |
|
500 </dd><dt><i>sourceIndex</i></dt> |
|
501 <dd> |
|
502 index of the tab in the old tab widget (integer) |
|
503 </dd><dt><i>targetIndex</i></dt> |
|
504 <dd> |
|
505 index position to place it to (integer) |
|
506 </dd> |
|
507 </dl><a NAME="TabWidget.removeWidget" ID="TabWidget.removeWidget"></a> |
|
508 <h4>TabWidget.removeWidget</h4> |
|
509 <b>removeWidget</b>(<i>object</i>) |
|
510 <p> |
|
511 Public method to remove a widget. |
|
512 </p><dl> |
|
513 <dt><i>object</i></dt> |
|
514 <dd> |
|
515 object to be removed (QWidget) |
|
516 </dd> |
|
517 </dl><a NAME="TabWidget.showIndicator" ID="TabWidget.showIndicator"></a> |
|
518 <h4>TabWidget.showIndicator</h4> |
|
519 <b>showIndicator</b>(<i>on</i>) |
|
520 <p> |
|
521 Public slot to set the indicator on or off. |
|
522 </p><dl> |
|
523 <dt><i>on</i></dt> |
|
524 <dd> |
|
525 flag indicating the dtate of the indicator (boolean) |
|
526 </dd> |
|
527 </dl> |
|
528 <div align="right"><a href="#top">Up</a></div> |
|
529 <hr /><hr /> |
|
530 <a NAME="Tabview" ID="Tabview"></a> |
|
531 <h2>Tabview</h2> |
|
532 <p> |
|
533 Class implementing a tabbed viewmanager class embedded in a splitter. |
|
534 </p><h4>Signals</h4> |
|
535 <dl> |
|
536 <dt>changeCaption(string)</dt> |
|
537 <dd> |
|
538 emitted if a change of the caption is necessary |
|
539 </dd><dt>editorChanged(string)</dt> |
|
540 <dd> |
|
541 emitted when the current editor has changed |
|
542 </dd> |
|
543 </dl> |
|
544 <h3>Derived from</h3> |
|
545 QSplitter, ViewManager |
|
546 <h3>Class Attributes</h3> |
|
547 <table> |
|
548 <tr><td>None</td></tr> |
|
549 </table> |
|
550 <h3>Methods</h3> |
|
551 <table> |
|
552 <tr> |
|
553 <td><a href="#Tabview.__init__">Tabview</a></td> |
|
554 <td>Constructor</td> |
|
555 </tr><tr> |
|
556 <td><a href="#Tabview.__currentChanged">__currentChanged</a></td> |
|
557 <td>Private slot to handle the currentChanged signal.</td> |
|
558 </tr><tr> |
|
559 <td><a href="#Tabview._addView">_addView</a></td> |
|
560 <td>Protected method to add a view (i.e.</td> |
|
561 </tr><tr> |
|
562 <td><a href="#Tabview._initWindowActions">_initWindowActions</a></td> |
|
563 <td>Protected method to define the user interface actions for window handling.</td> |
|
564 </tr><tr> |
|
565 <td><a href="#Tabview._modificationStatusChanged">_modificationStatusChanged</a></td> |
|
566 <td>Protected slot to handle the modificationStatusChanged signal.</td> |
|
567 </tr><tr> |
|
568 <td><a href="#Tabview._removeAllViews">_removeAllViews</a></td> |
|
569 <td>Protected method to remove all views (i.e.</td> |
|
570 </tr><tr> |
|
571 <td><a href="#Tabview._removeView">_removeView</a></td> |
|
572 <td>Protected method to remove a view (i.e.</td> |
|
573 </tr><tr> |
|
574 <td><a href="#Tabview._showView">_showView</a></td> |
|
575 <td>Protected method to show a view (i.e.</td> |
|
576 </tr><tr> |
|
577 <td><a href="#Tabview._syntaxErrorToggled">_syntaxErrorToggled</a></td> |
|
578 <td>Protected slot to handle the syntaxerrorToggled signal.</td> |
|
579 </tr><tr> |
|
580 <td><a href="#Tabview.activeWindow">activeWindow</a></td> |
|
581 <td>Public method to return the active (i.e.</td> |
|
582 </tr><tr> |
|
583 <td><a href="#Tabview.addSplit">addSplit</a></td> |
|
584 <td>Public method used to split the current view.</td> |
|
585 </tr><tr> |
|
586 <td><a href="#Tabview.canCascade">canCascade</a></td> |
|
587 <td>Public method to signal if cascading of managed windows is available.</td> |
|
588 </tr><tr> |
|
589 <td><a href="#Tabview.canSplit">canSplit</a></td> |
|
590 <td>public method to signal if splitting of the view is available.</td> |
|
591 </tr><tr> |
|
592 <td><a href="#Tabview.canTile">canTile</a></td> |
|
593 <td>Public method to signal if tiling of managed windows is available.</td> |
|
594 </tr><tr> |
|
595 <td><a href="#Tabview.cascade">cascade</a></td> |
|
596 <td>Public method to cascade the managed windows.</td> |
|
597 </tr><tr> |
|
598 <td><a href="#Tabview.eventFilter">eventFilter</a></td> |
|
599 <td>Public method called to filter the event queue.</td> |
|
600 </tr><tr> |
|
601 <td><a href="#Tabview.getTabWidgetById">getTabWidgetById</a></td> |
|
602 <td>Public method to get a reference to a tab widget knowing it's ID.</td> |
|
603 </tr><tr> |
|
604 <td><a href="#Tabview.insertView">insertView</a></td> |
|
605 <td>Protected method to add a view (i.e.</td> |
|
606 </tr><tr> |
|
607 <td><a href="#Tabview.nextSplit">nextSplit</a></td> |
|
608 <td>Public slot used to move to the next split.</td> |
|
609 </tr><tr> |
|
610 <td><a href="#Tabview.preferencesChanged">preferencesChanged</a></td> |
|
611 <td>Public slot to handle the preferencesChanged signal.</td> |
|
612 </tr><tr> |
|
613 <td><a href="#Tabview.prevSplit">prevSplit</a></td> |
|
614 <td>Public slot used to move to the previous split.</td> |
|
615 </tr><tr> |
|
616 <td><a href="#Tabview.removeSplit">removeSplit</a></td> |
|
617 <td>Public method used to remove the current split view.</td> |
|
618 </tr><tr> |
|
619 <td><a href="#Tabview.setEditorName">setEditorName</a></td> |
|
620 <td>Public method to change the displayed name of the editor.</td> |
|
621 </tr><tr> |
|
622 <td><a href="#Tabview.setSplitOrientation">setSplitOrientation</a></td> |
|
623 <td>Public method used to set the orientation of the split view.</td> |
|
624 </tr><tr> |
|
625 <td><a href="#Tabview.showWindowMenu">showWindowMenu</a></td> |
|
626 <td>Public method to set up the viewmanager part of the Window menu.</td> |
|
627 </tr><tr> |
|
628 <td><a href="#Tabview.tile">tile</a></td> |
|
629 <td>Public method to tile the managed windows.</td> |
|
630 </tr> |
|
631 </table> |
|
632 <a NAME="Tabview.__init__" ID="Tabview.__init__"></a> |
|
633 <h4>Tabview (Constructor)</h4> |
|
634 <b>Tabview</b>(<i>parent</i>) |
|
635 <p> |
|
636 Constructor |
|
637 </p><dl> |
|
638 <dt><i>parent</i></dt> |
|
639 <dd> |
|
640 parent widget (QWidget) |
|
641 </dd><dt><i>ui</i></dt> |
|
642 <dd> |
|
643 reference to the main user interface |
|
644 </dd><dt><i>dbs</i></dt> |
|
645 <dd> |
|
646 reference to the debug server object |
|
647 </dd> |
|
648 </dl><a NAME="Tabview.__currentChanged" ID="Tabview.__currentChanged"></a> |
|
649 <h4>Tabview.__currentChanged</h4> |
|
650 <b>__currentChanged</b>(<i>index</i>) |
|
651 <p> |
|
652 Private slot to handle the currentChanged signal. |
|
653 </p><dl> |
|
654 <dt><i>index</i></dt> |
|
655 <dd> |
|
656 index of the current tab (integer) |
|
657 </dd> |
|
658 </dl><a NAME="Tabview._addView" ID="Tabview._addView"></a> |
|
659 <h4>Tabview._addView</h4> |
|
660 <b>_addView</b>(<i>win, fn = None, noName = ""</i>) |
|
661 <p> |
|
662 Protected method to add a view (i.e. window) |
|
663 </p><dl> |
|
664 <dt><i>win</i></dt> |
|
665 <dd> |
|
666 editor window to be added |
|
667 </dd><dt><i>fn</i></dt> |
|
668 <dd> |
|
669 filename of this editor (string) |
|
670 </dd><dt><i>noName</i></dt> |
|
671 <dd> |
|
672 name to be used for an unnamed editor (string) |
|
673 </dd> |
|
674 </dl><a NAME="Tabview._initWindowActions" ID="Tabview._initWindowActions"></a> |
|
675 <h4>Tabview._initWindowActions</h4> |
|
676 <b>_initWindowActions</b>(<i></i>) |
|
677 <p> |
|
678 Protected method to define the user interface actions for window handling. |
|
679 </p><a NAME="Tabview._modificationStatusChanged" ID="Tabview._modificationStatusChanged"></a> |
|
680 <h4>Tabview._modificationStatusChanged</h4> |
|
681 <b>_modificationStatusChanged</b>(<i>m, editor</i>) |
|
682 <p> |
|
683 Protected slot to handle the modificationStatusChanged signal. |
|
684 </p><dl> |
|
685 <dt><i>m</i></dt> |
|
686 <dd> |
|
687 flag indicating the modification status (boolean) |
|
688 </dd><dt><i>editor</i></dt> |
|
689 <dd> |
|
690 editor window changed |
|
691 </dd> |
|
692 </dl><a NAME="Tabview._removeAllViews" ID="Tabview._removeAllViews"></a> |
|
693 <h4>Tabview._removeAllViews</h4> |
|
694 <b>_removeAllViews</b>(<i></i>) |
|
695 <p> |
|
696 Protected method to remove all views (i.e. windows) |
|
697 </p><a NAME="Tabview._removeView" ID="Tabview._removeView"></a> |
|
698 <h4>Tabview._removeView</h4> |
|
699 <b>_removeView</b>(<i>win</i>) |
|
700 <p> |
|
701 Protected method to remove a view (i.e. window) |
|
702 </p><dl> |
|
703 <dt><i>win</i></dt> |
|
704 <dd> |
|
705 editor window to be removed |
|
706 </dd> |
|
707 </dl><a NAME="Tabview._showView" ID="Tabview._showView"></a> |
|
708 <h4>Tabview._showView</h4> |
|
709 <b>_showView</b>(<i>win, fn = None</i>) |
|
710 <p> |
|
711 Protected method to show a view (i.e. window) |
|
712 </p><dl> |
|
713 <dt><i>win</i></dt> |
|
714 <dd> |
|
715 editor window to be shown |
|
716 </dd><dt><i>fn</i></dt> |
|
717 <dd> |
|
718 filename of this editor (string) |
|
719 </dd> |
|
720 </dl><a NAME="Tabview._syntaxErrorToggled" ID="Tabview._syntaxErrorToggled"></a> |
|
721 <h4>Tabview._syntaxErrorToggled</h4> |
|
722 <b>_syntaxErrorToggled</b>(<i>editor</i>) |
|
723 <p> |
|
724 Protected slot to handle the syntaxerrorToggled signal. |
|
725 </p><dl> |
|
726 <dt><i>editor</i></dt> |
|
727 <dd> |
|
728 editor that sent the signal |
|
729 </dd> |
|
730 </dl><a NAME="Tabview.activeWindow" ID="Tabview.activeWindow"></a> |
|
731 <h4>Tabview.activeWindow</h4> |
|
732 <b>activeWindow</b>(<i></i>) |
|
733 <p> |
|
734 Public method to return the active (i.e. current) window. |
|
735 </p><dl> |
|
736 <dt>Returns:</dt> |
|
737 <dd> |
|
738 reference to the active editor |
|
739 </dd> |
|
740 </dl><a NAME="Tabview.addSplit" ID="Tabview.addSplit"></a> |
|
741 <h4>Tabview.addSplit</h4> |
|
742 <b>addSplit</b>(<i></i>) |
|
743 <p> |
|
744 Public method used to split the current view. |
|
745 </p><a NAME="Tabview.canCascade" ID="Tabview.canCascade"></a> |
|
746 <h4>Tabview.canCascade</h4> |
|
747 <b>canCascade</b>(<i></i>) |
|
748 <p> |
|
749 Public method to signal if cascading of managed windows is available. |
|
750 </p><dl> |
|
751 <dt>Returns:</dt> |
|
752 <dd> |
|
753 flag indicating cascading of windows is available |
|
754 </dd> |
|
755 </dl><a NAME="Tabview.canSplit" ID="Tabview.canSplit"></a> |
|
756 <h4>Tabview.canSplit</h4> |
|
757 <b>canSplit</b>(<i></i>) |
|
758 <p> |
|
759 public method to signal if splitting of the view is available. |
|
760 </p><dl> |
|
761 <dt>Returns:</dt> |
|
762 <dd> |
|
763 flag indicating splitting of the view is available. |
|
764 </dd> |
|
765 </dl><a NAME="Tabview.canTile" ID="Tabview.canTile"></a> |
|
766 <h4>Tabview.canTile</h4> |
|
767 <b>canTile</b>(<i></i>) |
|
768 <p> |
|
769 Public method to signal if tiling of managed windows is available. |
|
770 </p><dl> |
|
771 <dt>Returns:</dt> |
|
772 <dd> |
|
773 flag indicating tiling of windows is available |
|
774 </dd> |
|
775 </dl><a NAME="Tabview.cascade" ID="Tabview.cascade"></a> |
|
776 <h4>Tabview.cascade</h4> |
|
777 <b>cascade</b>(<i></i>) |
|
778 <p> |
|
779 Public method to cascade the managed windows. |
|
780 </p><a NAME="Tabview.eventFilter" ID="Tabview.eventFilter"></a> |
|
781 <h4>Tabview.eventFilter</h4> |
|
782 <b>eventFilter</b>(<i>watched, event</i>) |
|
783 <p> |
|
784 Public method called to filter the event queue. |
|
785 </p><dl> |
|
786 <dt><i>watched</i></dt> |
|
787 <dd> |
|
788 the QObject being watched (QObject) |
|
789 </dd><dt><i>event</i></dt> |
|
790 <dd> |
|
791 the event that occurred (QEvent) |
|
792 </dd> |
|
793 </dl><dl> |
|
794 <dt>Returns:</dt> |
|
795 <dd> |
|
796 always False |
|
797 </dd> |
|
798 </dl><a NAME="Tabview.getTabWidgetById" ID="Tabview.getTabWidgetById"></a> |
|
799 <h4>Tabview.getTabWidgetById</h4> |
|
800 <b>getTabWidgetById</b>(<i>id_</i>) |
|
801 <p> |
|
802 Public method to get a reference to a tab widget knowing it's ID. |
|
803 </p><dl> |
|
804 <dt><i>id_</i></dt> |
|
805 <dd> |
|
806 id of the tab widget (long) |
|
807 </dd> |
|
808 </dl><dl> |
|
809 <dt>Returns:</dt> |
|
810 <dd> |
|
811 reference to the tab widget (TabWidget) |
|
812 </dd> |
|
813 </dl><a NAME="Tabview.insertView" ID="Tabview.insertView"></a> |
|
814 <h4>Tabview.insertView</h4> |
|
815 <b>insertView</b>(<i>win, tabWidget, index, fn = None, noName = ""</i>) |
|
816 <p> |
|
817 Protected method to add a view (i.e. window) |
|
818 </p><dl> |
|
819 <dt><i>win</i></dt> |
|
820 <dd> |
|
821 editor window to be added |
|
822 </dd><dt><i>tabWidget</i></dt> |
|
823 <dd> |
|
824 reference to the tab widget to insert the editor into (TabWidget) |
|
825 </dd><dt><i>index</i></dt> |
|
826 <dd> |
|
827 index position to insert at (integer) |
|
828 </dd><dt><i>fn</i></dt> |
|
829 <dd> |
|
830 filename of this editor (string) |
|
831 </dd><dt><i>noName</i></dt> |
|
832 <dd> |
|
833 name to be used for an unnamed editor (string) |
|
834 </dd> |
|
835 </dl><a NAME="Tabview.nextSplit" ID="Tabview.nextSplit"></a> |
|
836 <h4>Tabview.nextSplit</h4> |
|
837 <b>nextSplit</b>(<i></i>) |
|
838 <p> |
|
839 Public slot used to move to the next split. |
|
840 </p><a NAME="Tabview.preferencesChanged" ID="Tabview.preferencesChanged"></a> |
|
841 <h4>Tabview.preferencesChanged</h4> |
|
842 <b>preferencesChanged</b>(<i></i>) |
|
843 <p> |
|
844 Public slot to handle the preferencesChanged signal. |
|
845 </p><a NAME="Tabview.prevSplit" ID="Tabview.prevSplit"></a> |
|
846 <h4>Tabview.prevSplit</h4> |
|
847 <b>prevSplit</b>(<i></i>) |
|
848 <p> |
|
849 Public slot used to move to the previous split. |
|
850 </p><a NAME="Tabview.removeSplit" ID="Tabview.removeSplit"></a> |
|
851 <h4>Tabview.removeSplit</h4> |
|
852 <b>removeSplit</b>(<i></i>) |
|
853 <p> |
|
854 Public method used to remove the current split view. |
|
855 </p><dl> |
|
856 <dt>Returns:</dt> |
|
857 <dd> |
|
858 flag indicating successfull removal |
|
859 </dd> |
|
860 </dl><a NAME="Tabview.setEditorName" ID="Tabview.setEditorName"></a> |
|
861 <h4>Tabview.setEditorName</h4> |
|
862 <b>setEditorName</b>(<i>editor, newName</i>) |
|
863 <p> |
|
864 Public method to change the displayed name of the editor. |
|
865 </p><dl> |
|
866 <dt><i>editor</i></dt> |
|
867 <dd> |
|
868 editor window to be changed |
|
869 </dd><dt><i>newName</i></dt> |
|
870 <dd> |
|
871 new name to be shown (string) |
|
872 </dd> |
|
873 </dl><a NAME="Tabview.setSplitOrientation" ID="Tabview.setSplitOrientation"></a> |
|
874 <h4>Tabview.setSplitOrientation</h4> |
|
875 <b>setSplitOrientation</b>(<i>orientation</i>) |
|
876 <p> |
|
877 Public method used to set the orientation of the split view. |
|
878 </p><dl> |
|
879 <dt><i>orientation</i></dt> |
|
880 <dd> |
|
881 orientation of the split |
|
882 (Qt.Horizontal or Qt.Vertical) |
|
883 </dd> |
|
884 </dl><a NAME="Tabview.showWindowMenu" ID="Tabview.showWindowMenu"></a> |
|
885 <h4>Tabview.showWindowMenu</h4> |
|
886 <b>showWindowMenu</b>(<i>windowMenu</i>) |
|
887 <p> |
|
888 Public method to set up the viewmanager part of the Window menu. |
|
889 </p><dl> |
|
890 <dt><i>windowMenu</i></dt> |
|
891 <dd> |
|
892 reference to the window menu |
|
893 </dd> |
|
894 </dl><a NAME="Tabview.tile" ID="Tabview.tile"></a> |
|
895 <h4>Tabview.tile</h4> |
|
896 <b>tile</b>(<i></i>) |
|
897 <p> |
|
898 Public method to tile the managed windows. |
|
899 </p> |
|
900 <div align="right"><a href="#top">Up</a></div> |
|
901 <hr /> |
|
902 </body></html> |