src/eric7/Documentation/Source/eric7.Tools.TRPreviewer.html

branch
eric7
changeset 9209
b99e7fd55fd3
parent 8596
d64760b2da50
child 9503
ae9232bf4854
equal deleted inserted replaced
9208:3fc8dfeb6ebe 9209:b99e7fd55fd3
1 <!DOCTYPE html>
2 <html><head>
3 <title>eric7.Tools.TRPreviewer</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.Tools.TRPreviewer</h1>
10
11 <p>
12 Module implementing the TR Previewer main window.
13 </p>
14 <h3>Global Attributes</h3>
15
16 <table>
17 <tr><td>noTranslationName</td></tr>
18 </table>
19 <h3>Classes</h3>
20
21 <table>
22
23 <tr>
24 <td><a href="#TRPreviewer">TRPreviewer</a></td>
25 <td>Class implementing the UI Previewer main window.</td>
26 </tr>
27 <tr>
28 <td><a href="#Translation">Translation</a></td>
29 <td>Class to store the properties of a translation.</td>
30 </tr>
31 <tr>
32 <td><a href="#TranslationsDict">TranslationsDict</a></td>
33 <td>Class to store all loaded translations.</td>
34 </tr>
35 <tr>
36 <td><a href="#WidgetArea">WidgetArea</a></td>
37 <td>Specialized MDI area to show the loaded widgets.</td>
38 </tr>
39 <tr>
40 <td><a href="#WidgetView">WidgetView</a></td>
41 <td>Class to show a dynamically loaded widget (or dialog).</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="TRPreviewer" ID="TRPreviewer"></a>
52 <h2>TRPreviewer</h2>
53
54 <p>
55 Class implementing the UI Previewer main window.
56 </p>
57 <h3>Derived from</h3>
58 EricMainWindow
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="#TRPreviewer.__init__">TRPreviewer</a></td>
75 <td>Constructor</td>
76 </tr>
77 <tr>
78 <td><a href="#TRPreviewer.__about">__about</a></td>
79 <td>Private slot to show the about information.</td>
80 </tr>
81 <tr>
82 <td><a href="#TRPreviewer.__aboutQt">__aboutQt</a></td>
83 <td>Private slot to show info about Qt.</td>
84 </tr>
85 <tr>
86 <td><a href="#TRPreviewer.__initActions">__initActions</a></td>
87 <td>Private method to define the user interface actions.</td>
88 </tr>
89 <tr>
90 <td><a href="#TRPreviewer.__initMenus">__initMenus</a></td>
91 <td>Private method to create the menus.</td>
92 </tr>
93 <tr>
94 <td><a href="#TRPreviewer.__initToolbars">__initToolbars</a></td>
95 <td>Private method to create the toolbars.</td>
96 </tr>
97 <tr>
98 <td><a href="#TRPreviewer.__openTranslation">__openTranslation</a></td>
99 <td>Private slot to handle the Open Translation action.</td>
100 </tr>
101 <tr>
102 <td><a href="#TRPreviewer.__openWidget">__openWidget</a></td>
103 <td>Private slot to handle the Open Dialog action.</td>
104 </tr>
105 <tr>
106 <td><a href="#TRPreviewer.__setTranslation">__setTranslation</a></td>
107 <td>Private slot to activate a translation.</td>
108 </tr>
109 <tr>
110 <td><a href="#TRPreviewer.__showWindowMenu">__showWindowMenu</a></td>
111 <td>Private slot to handle the aboutToShow signal of the window menu.</td>
112 </tr>
113 <tr>
114 <td><a href="#TRPreviewer.__updateActions">__updateActions</a></td>
115 <td>Private slot to update the actions state.</td>
116 </tr>
117 <tr>
118 <td><a href="#TRPreviewer.__whatsThis">__whatsThis</a></td>
119 <td>Private slot called in to enter Whats This mode.</td>
120 </tr>
121 <tr>
122 <td><a href="#TRPreviewer.closeEvent">closeEvent</a></td>
123 <td>Protected event handler for the close event.</td>
124 </tr>
125 <tr>
126 <td><a href="#TRPreviewer.reloadTranslations">reloadTranslations</a></td>
127 <td>Public slot to reload all translations.</td>
128 </tr>
129 <tr>
130 <td><a href="#TRPreviewer.show">show</a></td>
131 <td>Public slot to show this dialog.</td>
132 </tr>
133 </table>
134 <h3>Static Methods</h3>
135
136 <table>
137 <tr><td>None</td></tr>
138 </table>
139
140 <a NAME="TRPreviewer.__init__" ID="TRPreviewer.__init__"></a>
141 <h4>TRPreviewer (Constructor)</h4>
142 <b>TRPreviewer</b>(<i>filenames=None, parent=None, name=None</i>)
143
144 <p>
145 Constructor
146 </p>
147 <dl>
148
149 <dt><i>filenames</i></dt>
150 <dd>
151 filenames of form and/or translation files to load
152 </dd>
153 <dt><i>parent</i></dt>
154 <dd>
155 parent widget of this window (QWidget)
156 </dd>
157 <dt><i>name</i></dt>
158 <dd>
159 name of this window (string)
160 </dd>
161 </dl>
162 <a NAME="TRPreviewer.__about" ID="TRPreviewer.__about"></a>
163 <h4>TRPreviewer.__about</h4>
164 <b>__about</b>(<i></i>)
165
166 <p>
167 Private slot to show the about information.
168 </p>
169 <a NAME="TRPreviewer.__aboutQt" ID="TRPreviewer.__aboutQt"></a>
170 <h4>TRPreviewer.__aboutQt</h4>
171 <b>__aboutQt</b>(<i></i>)
172
173 <p>
174 Private slot to show info about Qt.
175 </p>
176 <a NAME="TRPreviewer.__initActions" ID="TRPreviewer.__initActions"></a>
177 <h4>TRPreviewer.__initActions</h4>
178 <b>__initActions</b>(<i></i>)
179
180 <p>
181 Private method to define the user interface actions.
182 </p>
183 <a NAME="TRPreviewer.__initMenus" ID="TRPreviewer.__initMenus"></a>
184 <h4>TRPreviewer.__initMenus</h4>
185 <b>__initMenus</b>(<i></i>)
186
187 <p>
188 Private method to create the menus.
189 </p>
190 <a NAME="TRPreviewer.__initToolbars" ID="TRPreviewer.__initToolbars"></a>
191 <h4>TRPreviewer.__initToolbars</h4>
192 <b>__initToolbars</b>(<i></i>)
193
194 <p>
195 Private method to create the toolbars.
196 </p>
197 <a NAME="TRPreviewer.__openTranslation" ID="TRPreviewer.__openTranslation"></a>
198 <h4>TRPreviewer.__openTranslation</h4>
199 <b>__openTranslation</b>(<i></i>)
200
201 <p>
202 Private slot to handle the Open Translation action.
203 </p>
204 <a NAME="TRPreviewer.__openWidget" ID="TRPreviewer.__openWidget"></a>
205 <h4>TRPreviewer.__openWidget</h4>
206 <b>__openWidget</b>(<i></i>)
207
208 <p>
209 Private slot to handle the Open Dialog action.
210 </p>
211 <a NAME="TRPreviewer.__setTranslation" ID="TRPreviewer.__setTranslation"></a>
212 <h4>TRPreviewer.__setTranslation</h4>
213 <b>__setTranslation</b>(<i>index</i>)
214
215 <p>
216 Private slot to activate a translation.
217 </p>
218 <dl>
219
220 <dt><i>index</i> (int)</dt>
221 <dd>
222 index of the selected entry
223 </dd>
224 </dl>
225 <a NAME="TRPreviewer.__showWindowMenu" ID="TRPreviewer.__showWindowMenu"></a>
226 <h4>TRPreviewer.__showWindowMenu</h4>
227 <b>__showWindowMenu</b>(<i></i>)
228
229 <p>
230 Private slot to handle the aboutToShow signal of the window menu.
231 </p>
232 <a NAME="TRPreviewer.__updateActions" ID="TRPreviewer.__updateActions"></a>
233 <h4>TRPreviewer.__updateActions</h4>
234 <b>__updateActions</b>(<i></i>)
235
236 <p>
237 Private slot to update the actions state.
238 </p>
239 <a NAME="TRPreviewer.__whatsThis" ID="TRPreviewer.__whatsThis"></a>
240 <h4>TRPreviewer.__whatsThis</h4>
241 <b>__whatsThis</b>(<i></i>)
242
243 <p>
244 Private slot called in to enter Whats This mode.
245 </p>
246 <a NAME="TRPreviewer.closeEvent" ID="TRPreviewer.closeEvent"></a>
247 <h4>TRPreviewer.closeEvent</h4>
248 <b>closeEvent</b>(<i>event</i>)
249
250 <p>
251 Protected event handler for the close event.
252 </p>
253 <dl>
254
255 <dt><i>event</i></dt>
256 <dd>
257 close event (QCloseEvent)
258 </dd>
259 </dl>
260 <a NAME="TRPreviewer.reloadTranslations" ID="TRPreviewer.reloadTranslations"></a>
261 <h4>TRPreviewer.reloadTranslations</h4>
262 <b>reloadTranslations</b>(<i></i>)
263
264 <p>
265 Public slot to reload all translations.
266 </p>
267 <a NAME="TRPreviewer.show" ID="TRPreviewer.show"></a>
268 <h4>TRPreviewer.show</h4>
269 <b>show</b>(<i></i>)
270
271 <p>
272 Public slot to show this dialog.
273 </p>
274 <p>
275 This overloaded slot loads a UI file to be previewed after
276 the main window has been shown. This way, previewing a dialog
277 doesn't interfere with showing the main window.
278 </p>
279 <div align="right"><a href="#top">Up</a></div>
280 <hr />
281 <hr />
282 <a NAME="Translation" ID="Translation"></a>
283 <h2>Translation</h2>
284
285 <p>
286 Class to store the properties of a translation.
287 </p>
288 <h3>Derived from</h3>
289 None
290 <h3>Class Attributes</h3>
291
292 <table>
293 <tr><td>None</td></tr>
294 </table>
295 <h3>Class Methods</h3>
296
297 <table>
298 <tr><td>None</td></tr>
299 </table>
300 <h3>Methods</h3>
301
302 <table>
303
304 <tr>
305 <td><a href="#Translation.__init__">Translation</a></td>
306 <td>Constructor</td>
307 </tr>
308 </table>
309 <h3>Static Methods</h3>
310
311 <table>
312 <tr><td>None</td></tr>
313 </table>
314
315 <a NAME="Translation.__init__" ID="Translation.__init__"></a>
316 <h4>Translation (Constructor)</h4>
317 <b>Translation</b>(<i></i>)
318
319 <p>
320 Constructor
321 </p>
322 <div align="right"><a href="#top">Up</a></div>
323 <hr />
324 <hr />
325 <a NAME="TranslationsDict" ID="TranslationsDict"></a>
326 <h2>TranslationsDict</h2>
327
328 <p>
329 Class to store all loaded translations.
330 </p>
331 <h3>Signals</h3>
332 <dl>
333
334 <dt>translationChanged()</dt>
335 <dd>
336 emit after a translator was set
337 </dd>
338 </dl>
339 <h3>Derived from</h3>
340 QObject
341 <h3>Class Attributes</h3>
342
343 <table>
344 <tr><td>None</td></tr>
345 </table>
346 <h3>Class Methods</h3>
347
348 <table>
349 <tr><td>None</td></tr>
350 </table>
351 <h3>Methods</h3>
352
353 <table>
354
355 <tr>
356 <td><a href="#TranslationsDict.__init__">TranslationsDict</a></td>
357 <td>Constructor</td>
358 </tr>
359 <tr>
360 <td><a href="#TranslationsDict.__del">__del</a></td>
361 <td>Private method to delete a translator from the list of available translators.</td>
362 </tr>
363 <tr>
364 <td><a href="#TranslationsDict.__findFileName">__findFileName</a></td>
365 <td>Private method to find a translation by file name.</td>
366 </tr>
367 <tr>
368 <td><a href="#TranslationsDict.__findName">__findName</a></td>
369 <td>Private method to find a translation by name.</td>
370 </tr>
371 <tr>
372 <td><a href="#TranslationsDict.__haveFileName">__haveFileName</a></td>
373 <td>Private method to check for the presence of a translation.</td>
374 </tr>
375 <tr>
376 <td><a href="#TranslationsDict.__haveName">__haveName</a></td>
377 <td>Private method to check for the presence of a named translation.</td>
378 </tr>
379 <tr>
380 <td><a href="#TranslationsDict.__uniqueName">__uniqueName</a></td>
381 <td>Private method to generate a unique name.</td>
382 </tr>
383 <tr>
384 <td><a href="#TranslationsDict.add">add</a></td>
385 <td>Public method to add a translation to the list.</td>
386 </tr>
387 <tr>
388 <td><a href="#TranslationsDict.hasTranslations">hasTranslations</a></td>
389 <td>Public method to check for loaded translations.</td>
390 </tr>
391 <tr>
392 <td><a href="#TranslationsDict.loadTransFile">loadTransFile</a></td>
393 <td>Public slot to load a translation file.</td>
394 </tr>
395 <tr>
396 <td><a href="#TranslationsDict.reload">reload</a></td>
397 <td>Public method to reload all translators.</td>
398 </tr>
399 <tr>
400 <td><a href="#TranslationsDict.set">set</a></td>
401 <td>Public slot to set a translator by name.</td>
402 </tr>
403 </table>
404 <h3>Static Methods</h3>
405
406 <table>
407 <tr><td>None</td></tr>
408 </table>
409
410 <a NAME="TranslationsDict.__init__" ID="TranslationsDict.__init__"></a>
411 <h4>TranslationsDict (Constructor)</h4>
412 <b>TranslationsDict</b>(<i>selector, parent</i>)
413
414 <p>
415 Constructor
416 </p>
417 <dl>
418
419 <dt><i>selector</i></dt>
420 <dd>
421 reference to the QComboBox used to show the
422 available languages (QComboBox)
423 </dd>
424 <dt><i>parent</i></dt>
425 <dd>
426 parent widget (QWidget)
427 </dd>
428 </dl>
429 <a NAME="TranslationsDict.__del" ID="TranslationsDict.__del"></a>
430 <h4>TranslationsDict.__del</h4>
431 <b>__del</b>(<i>name</i>)
432
433 <p>
434 Private method to delete a translator from the list of available
435 translators.
436 </p>
437 <dl>
438
439 <dt><i>name</i></dt>
440 <dd>
441 name of the translator to delete (string)
442 </dd>
443 </dl>
444 <a NAME="TranslationsDict.__findFileName" ID="TranslationsDict.__findFileName"></a>
445 <h4>TranslationsDict.__findFileName</h4>
446 <b>__findFileName</b>(<i>transFileName</i>)
447
448 <p>
449 Private method to find a translation by file name.
450 </p>
451 <dl>
452
453 <dt><i>transFileName</i></dt>
454 <dd>
455 file name of the translation file (string)
456 </dd>
457 </dl>
458 <dl>
459 <dt>Return:</dt>
460 <dd>
461 reference to a translation object or None
462 </dd>
463 </dl>
464 <a NAME="TranslationsDict.__findName" ID="TranslationsDict.__findName"></a>
465 <h4>TranslationsDict.__findName</h4>
466 <b>__findName</b>(<i>name</i>)
467
468 <p>
469 Private method to find a translation by name.
470 </p>
471 <dl>
472
473 <dt><i>name</i></dt>
474 <dd>
475 name (language) of the translation (string)
476 </dd>
477 </dl>
478 <dl>
479 <dt>Return:</dt>
480 <dd>
481 reference to a translation object or None
482 </dd>
483 </dl>
484 <a NAME="TranslationsDict.__haveFileName" ID="TranslationsDict.__haveFileName"></a>
485 <h4>TranslationsDict.__haveFileName</h4>
486 <b>__haveFileName</b>(<i>transFileName</i>)
487
488 <p>
489 Private method to check for the presence of a translation.
490 </p>
491 <dl>
492
493 <dt><i>transFileName</i></dt>
494 <dd>
495 file name of the translation file (string)
496 </dd>
497 </dl>
498 <dl>
499 <dt>Return:</dt>
500 <dd>
501 flag indicating the presence of the translation (boolean)
502 </dd>
503 </dl>
504 <a NAME="TranslationsDict.__haveName" ID="TranslationsDict.__haveName"></a>
505 <h4>TranslationsDict.__haveName</h4>
506 <b>__haveName</b>(<i>name</i>)
507
508 <p>
509 Private method to check for the presence of a named translation.
510 </p>
511 <dl>
512
513 <dt><i>name</i></dt>
514 <dd>
515 name (language) of the translation (string)
516 </dd>
517 </dl>
518 <dl>
519 <dt>Return:</dt>
520 <dd>
521 flag indicating the presence of the translation (boolean)
522 </dd>
523 </dl>
524 <a NAME="TranslationsDict.__uniqueName" ID="TranslationsDict.__uniqueName"></a>
525 <h4>TranslationsDict.__uniqueName</h4>
526 <b>__uniqueName</b>(<i>transFileName</i>)
527
528 <p>
529 Private method to generate a unique name.
530 </p>
531 <dl>
532
533 <dt><i>transFileName</i></dt>
534 <dd>
535 file name of the translation file (string)
536 </dd>
537 </dl>
538 <dl>
539 <dt>Return:</dt>
540 <dd>
541 unique name (string or None)
542 </dd>
543 </dl>
544 <a NAME="TranslationsDict.add" ID="TranslationsDict.add"></a>
545 <h4>TranslationsDict.add</h4>
546 <b>add</b>(<i>fileName, setTranslation=True</i>)
547
548 <p>
549 Public method to add a translation to the list.
550 </p>
551 <p>
552 If the translation file (*.qm) has not been loaded yet, it will
553 be loaded automatically.
554 </p>
555 <dl>
556
557 <dt><i>fileName</i></dt>
558 <dd>
559 name of the translation file to be added (string)
560 </dd>
561 <dt><i>setTranslation</i></dt>
562 <dd>
563 flag indicating, if this should be set as
564 the active translation (boolean)
565 </dd>
566 </dl>
567 <a NAME="TranslationsDict.hasTranslations" ID="TranslationsDict.hasTranslations"></a>
568 <h4>TranslationsDict.hasTranslations</h4>
569 <b>hasTranslations</b>(<i></i>)
570
571 <p>
572 Public method to check for loaded translations.
573 </p>
574 <dl>
575 <dt>Return:</dt>
576 <dd>
577 flag signaling if any translation was loaded (boolean)
578 </dd>
579 </dl>
580 <a NAME="TranslationsDict.loadTransFile" ID="TranslationsDict.loadTransFile"></a>
581 <h4>TranslationsDict.loadTransFile</h4>
582 <b>loadTransFile</b>(<i>transFileName</i>)
583
584 <p>
585 Public slot to load a translation file.
586 </p>
587 <dl>
588
589 <dt><i>transFileName</i></dt>
590 <dd>
591 file name of the translation file (string)
592 </dd>
593 </dl>
594 <dl>
595 <dt>Return:</dt>
596 <dd>
597 reference to the new translator object (QTranslator)
598 </dd>
599 </dl>
600 <a NAME="TranslationsDict.reload" ID="TranslationsDict.reload"></a>
601 <h4>TranslationsDict.reload</h4>
602 <b>reload</b>(<i></i>)
603
604 <p>
605 Public method to reload all translators.
606 </p>
607 <a NAME="TranslationsDict.set" ID="TranslationsDict.set"></a>
608 <h4>TranslationsDict.set</h4>
609 <b>set</b>(<i>name</i>)
610
611 <p>
612 Public slot to set a translator by name.
613 </p>
614 <dl>
615
616 <dt><i>name</i></dt>
617 <dd>
618 name (language) of the translator to set (string)
619 </dd>
620 </dl>
621 <div align="right"><a href="#top">Up</a></div>
622 <hr />
623 <hr />
624 <a NAME="WidgetArea" ID="WidgetArea"></a>
625 <h2>WidgetArea</h2>
626
627 <p>
628 Specialized MDI area to show the loaded widgets.
629 </p>
630 <h3>Signals</h3>
631 <dl>
632
633 <dt>lastWidgetClosed()</dt>
634 <dd>
635 emitted after the last widget was closed
636 </dd>
637 <dt>rebuildWidgets()</dt>
638 <dd>
639 emitted to indicate a change of loaded widgets
640 </dd>
641 </dl>
642 <h3>Derived from</h3>
643 QMdiArea
644 <h3>Class Attributes</h3>
645
646 <table>
647 <tr><td>None</td></tr>
648 </table>
649 <h3>Class Methods</h3>
650
651 <table>
652 <tr><td>None</td></tr>
653 </table>
654 <h3>Methods</h3>
655
656 <table>
657
658 <tr>
659 <td><a href="#WidgetArea.__init__">WidgetArea</a></td>
660 <td>Constructor</td>
661 </tr>
662 <tr>
663 <td><a href="#WidgetArea.__findWidget">__findWidget</a></td>
664 <td>Private method to find a specific widget view.</td>
665 </tr>
666 <tr>
667 <td><a href="#WidgetArea.__toggleWidget">__toggleWidget</a></td>
668 <td>Private method to toggle a workspace window.</td>
669 </tr>
670 <tr>
671 <td><a href="#WidgetArea.closeAllWidgets">closeAllWidgets</a></td>
672 <td>Public slot to close all windows.</td>
673 </tr>
674 <tr>
675 <td><a href="#WidgetArea.closeWidget">closeWidget</a></td>
676 <td>Public slot to close the active window.</td>
677 </tr>
678 <tr>
679 <td><a href="#WidgetArea.eventFilter">eventFilter</a></td>
680 <td>Public method called to filter an event.</td>
681 </tr>
682 <tr>
683 <td><a href="#WidgetArea.hasWidgets">hasWidgets</a></td>
684 <td>Public method to check for loaded widgets.</td>
685 </tr>
686 <tr>
687 <td><a href="#WidgetArea.loadWidget">loadWidget</a></td>
688 <td>Public slot to load a UI file.</td>
689 </tr>
690 <tr>
691 <td><a href="#WidgetArea.showWindowMenu">showWindowMenu</a></td>
692 <td>Public method to set up the widgets part of the Window menu.</td>
693 </tr>
694 <tr>
695 <td><a href="#WidgetArea.toggleSelectedWidget">toggleSelectedWidget</a></td>
696 <td>Public method to handle the toggle of a window.</td>
697 </tr>
698 </table>
699 <h3>Static Methods</h3>
700
701 <table>
702 <tr><td>None</td></tr>
703 </table>
704
705 <a NAME="WidgetArea.__init__" ID="WidgetArea.__init__"></a>
706 <h4>WidgetArea (Constructor)</h4>
707 <b>WidgetArea</b>(<i>parent=None</i>)
708
709 <p>
710 Constructor
711 </p>
712 <dl>
713
714 <dt><i>parent</i></dt>
715 <dd>
716 parent widget (QWidget)
717 </dd>
718 </dl>
719 <a NAME="WidgetArea.__findWidget" ID="WidgetArea.__findWidget"></a>
720 <h4>WidgetArea.__findWidget</h4>
721 <b>__findWidget</b>(<i>uiFileName</i>)
722
723 <p>
724 Private method to find a specific widget view.
725 </p>
726 <dl>
727
728 <dt><i>uiFileName</i></dt>
729 <dd>
730 filename of the loaded UI file (string)
731 </dd>
732 </dl>
733 <dl>
734 <dt>Return:</dt>
735 <dd>
736 reference to the widget (WidgetView) or None
737 </dd>
738 </dl>
739 <a NAME="WidgetArea.__toggleWidget" ID="WidgetArea.__toggleWidget"></a>
740 <h4>WidgetArea.__toggleWidget</h4>
741 <b>__toggleWidget</b>(<i>w</i>)
742
743 <p>
744 Private method to toggle a workspace window.
745 </p>
746 <dl>
747
748 <dt><i>w</i></dt>
749 <dd>
750 window to be toggled
751 </dd>
752 </dl>
753 <a NAME="WidgetArea.closeAllWidgets" ID="WidgetArea.closeAllWidgets"></a>
754 <h4>WidgetArea.closeAllWidgets</h4>
755 <b>closeAllWidgets</b>(<i></i>)
756
757 <p>
758 Public slot to close all windows.
759 </p>
760 <a NAME="WidgetArea.closeWidget" ID="WidgetArea.closeWidget"></a>
761 <h4>WidgetArea.closeWidget</h4>
762 <b>closeWidget</b>(<i></i>)
763
764 <p>
765 Public slot to close the active window.
766 </p>
767 <a NAME="WidgetArea.eventFilter" ID="WidgetArea.eventFilter"></a>
768 <h4>WidgetArea.eventFilter</h4>
769 <b>eventFilter</b>(<i>obj, ev</i>)
770
771 <p>
772 Public method called to filter an event.
773 </p>
774 <dl>
775
776 <dt><i>obj</i></dt>
777 <dd>
778 object, that generated the event (QObject)
779 </dd>
780 <dt><i>ev</i></dt>
781 <dd>
782 the event, that was generated by object (QEvent)
783 </dd>
784 </dl>
785 <dl>
786 <dt>Return:</dt>
787 <dd>
788 flag indicating if event was filtered out
789 </dd>
790 </dl>
791 <a NAME="WidgetArea.hasWidgets" ID="WidgetArea.hasWidgets"></a>
792 <h4>WidgetArea.hasWidgets</h4>
793 <b>hasWidgets</b>(<i></i>)
794
795 <p>
796 Public method to check for loaded widgets.
797 </p>
798 <dl>
799 <dt>Return:</dt>
800 <dd>
801 flag signaling if any widget was loaded (boolean)
802 </dd>
803 </dl>
804 <a NAME="WidgetArea.loadWidget" ID="WidgetArea.loadWidget"></a>
805 <h4>WidgetArea.loadWidget</h4>
806 <b>loadWidget</b>(<i>uiFileName</i>)
807
808 <p>
809 Public slot to load a UI file.
810 </p>
811 <dl>
812
813 <dt><i>uiFileName</i></dt>
814 <dd>
815 name of the UI file to load (string)
816 </dd>
817 </dl>
818 <a NAME="WidgetArea.showWindowMenu" ID="WidgetArea.showWindowMenu"></a>
819 <h4>WidgetArea.showWindowMenu</h4>
820 <b>showWindowMenu</b>(<i>windowMenu</i>)
821
822 <p>
823 Public method to set up the widgets part of the Window menu.
824 </p>
825 <dl>
826
827 <dt><i>windowMenu</i></dt>
828 <dd>
829 reference to the window menu
830 </dd>
831 </dl>
832 <a NAME="WidgetArea.toggleSelectedWidget" ID="WidgetArea.toggleSelectedWidget"></a>
833 <h4>WidgetArea.toggleSelectedWidget</h4>
834 <b>toggleSelectedWidget</b>(<i>act</i>)
835
836 <p>
837 Public method to handle the toggle of a window.
838 </p>
839 <dl>
840
841 <dt><i>act</i></dt>
842 <dd>
843 reference to the action that triggered (QAction)
844 </dd>
845 </dl>
846 <div align="right"><a href="#top">Up</a></div>
847 <hr />
848 <hr />
849 <a NAME="WidgetView" ID="WidgetView"></a>
850 <h2>WidgetView</h2>
851
852 <p>
853 Class to show a dynamically loaded widget (or dialog).
854 </p>
855 <h3>Derived from</h3>
856 QWidget
857 <h3>Class Attributes</h3>
858
859 <table>
860 <tr><td>None</td></tr>
861 </table>
862 <h3>Class Methods</h3>
863
864 <table>
865 <tr><td>None</td></tr>
866 </table>
867 <h3>Methods</h3>
868
869 <table>
870
871 <tr>
872 <td><a href="#WidgetView.__init__">WidgetView</a></td>
873 <td>Constructor</td>
874 </tr>
875 <tr>
876 <td><a href="#WidgetView.__rebuildWidget">__rebuildWidget</a></td>
877 <td>Private method to schedule a rebuild of the widget.</td>
878 </tr>
879 <tr>
880 <td><a href="#WidgetView.buildWidget">buildWidget</a></td>
881 <td>Public slot to load a UI file.</td>
882 </tr>
883 <tr>
884 <td><a href="#WidgetView.isValid">isValid</a></td>
885 <td>Public method to return the validity of this widget view.</td>
886 </tr>
887 <tr>
888 <td><a href="#WidgetView.uiFileName">uiFileName</a></td>
889 <td>Public method to retrieve the name of the UI file.</td>
890 </tr>
891 </table>
892 <h3>Static Methods</h3>
893
894 <table>
895 <tr><td>None</td></tr>
896 </table>
897
898 <a NAME="WidgetView.__init__" ID="WidgetView.__init__"></a>
899 <h4>WidgetView (Constructor)</h4>
900 <b>WidgetView</b>(<i>uiFileName, parent=None, name=None</i>)
901
902 <p>
903 Constructor
904 </p>
905 <dl>
906
907 <dt><i>uiFileName</i></dt>
908 <dd>
909 name of the UI file to load (string)
910 </dd>
911 <dt><i>parent</i></dt>
912 <dd>
913 parent widget (QWidget)
914 </dd>
915 <dt><i>name</i></dt>
916 <dd>
917 name of this widget (string)
918 </dd>
919 </dl>
920 <a NAME="WidgetView.__rebuildWidget" ID="WidgetView.__rebuildWidget"></a>
921 <h4>WidgetView.__rebuildWidget</h4>
922 <b>__rebuildWidget</b>(<i></i>)
923
924 <p>
925 Private method to schedule a rebuild of the widget.
926 </p>
927 <a NAME="WidgetView.buildWidget" ID="WidgetView.buildWidget"></a>
928 <h4>WidgetView.buildWidget</h4>
929 <b>buildWidget</b>(<i></i>)
930
931 <p>
932 Public slot to load a UI file.
933 </p>
934 <a NAME="WidgetView.isValid" ID="WidgetView.isValid"></a>
935 <h4>WidgetView.isValid</h4>
936 <b>isValid</b>(<i></i>)
937
938 <p>
939 Public method to return the validity of this widget view.
940 </p>
941 <dl>
942 <dt>Return:</dt>
943 <dd>
944 flag indicating the validity (boolean)
945 </dd>
946 </dl>
947 <a NAME="WidgetView.uiFileName" ID="WidgetView.uiFileName"></a>
948 <h4>WidgetView.uiFileName</h4>
949 <b>uiFileName</b>(<i></i>)
950
951 <p>
952 Public method to retrieve the name of the UI file.
953 </p>
954 <dl>
955 <dt>Return:</dt>
956 <dd>
957 filename of the loaded UI file (string)
958 </dd>
959 </dl>
960 <div align="right"><a href="#top">Up</a></div>
961 <hr />
962 </body></html>

eric ide

mercurial