Documentation/Source/eric6.Plugins.ViewManagerPlugins.Tabview.Tabview.html

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

eric ide

mercurial