|
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>eric4.Tools.UIPreviewer</title> |
|
6 <style> |
|
7 body { |
|
8 background:white; |
|
9 margin: 0em 1em 10em 1em; |
|
10 color: black; |
|
11 } |
|
12 |
|
13 h1 { color: white; background: #4FA4FF; } |
|
14 h2 { color: white; background: #4FA4FF; } |
|
15 h3 { color: white; background: #00557F; } |
|
16 h4 { color: white; background: #00557F; } |
|
17 |
|
18 a { color: #AA5500; } |
|
19 |
|
20 </style> |
|
21 </head> |
|
22 <body><a NAME="top" ID="top"></a> |
|
23 <h1>eric4.Tools.UIPreviewer</h1> |
|
24 <p> |
|
25 Module implementing the UI Previewer main window. |
|
26 </p> |
|
27 <h3>Global Attributes</h3> |
|
28 <table> |
|
29 <tr><td>None</td></tr> |
|
30 </table> |
|
31 <h3>Classes</h3> |
|
32 <table> |
|
33 <tr> |
|
34 <td><a href="#UIPreviewer">UIPreviewer</a></td> |
|
35 <td>Class implementing the UI Previewer main window.</td> |
|
36 </tr> |
|
37 </table> |
|
38 <h3>Functions</h3> |
|
39 <table> |
|
40 <tr><td>None</td></tr> |
|
41 </table> |
|
42 <hr /><hr /> |
|
43 <a NAME="UIPreviewer" ID="UIPreviewer"></a> |
|
44 <h2>UIPreviewer</h2> |
|
45 <p> |
|
46 Class implementing the UI Previewer main window. |
|
47 </p> |
|
48 <h3>Derived from</h3> |
|
49 QMainWindow |
|
50 <h3>Class Attributes</h3> |
|
51 <table> |
|
52 <tr><td>None</td></tr> |
|
53 </table> |
|
54 <h3>Methods</h3> |
|
55 <table> |
|
56 <tr> |
|
57 <td><a href="#UIPreviewer.__init__">UIPreviewer</a></td> |
|
58 <td>Constructor</td> |
|
59 </tr><tr> |
|
60 <td><a href="#UIPreviewer.__about">__about</a></td> |
|
61 <td>Private slot to show the about information.</td> |
|
62 </tr><tr> |
|
63 <td><a href="#UIPreviewer.__aboutQt">__aboutQt</a></td> |
|
64 <td>Private slot to show info about Qt.</td> |
|
65 </tr><tr> |
|
66 <td><a href="#UIPreviewer.__copyImageToClipboard">__copyImageToClipboard</a></td> |
|
67 <td>Private slot to handle the Copy Image menu action.</td> |
|
68 </tr><tr> |
|
69 <td><a href="#UIPreviewer.__guiStyleSelected">__guiStyleSelected</a></td> |
|
70 <td>Private slot to handle the selection of a GUI style.</td> |
|
71 </tr><tr> |
|
72 <td><a href="#UIPreviewer.__handleCloseEvent">__handleCloseEvent</a></td> |
|
73 <td>Private slot to handle the close event of a viewed QMainWidget.</td> |
|
74 </tr><tr> |
|
75 <td><a href="#UIPreviewer.__initActions">__initActions</a></td> |
|
76 <td>Private method to define the user interface actions.</td> |
|
77 </tr><tr> |
|
78 <td><a href="#UIPreviewer.__initMenus">__initMenus</a></td> |
|
79 <td>Private method to create the menus.</td> |
|
80 </tr><tr> |
|
81 <td><a href="#UIPreviewer.__initToolbars">__initToolbars</a></td> |
|
82 <td>Private method to create the toolbars.</td> |
|
83 </tr><tr> |
|
84 <td><a href="#UIPreviewer.__loadFile">__loadFile</a></td> |
|
85 <td>Private slot to load a ui file.</td> |
|
86 </tr><tr> |
|
87 <td><a href="#UIPreviewer.__openFile">__openFile</a></td> |
|
88 <td>Private slot to load a new file.</td> |
|
89 </tr><tr> |
|
90 <td><a href="#UIPreviewer.__print">__print</a></td> |
|
91 <td>Private slot to the actual printing.</td> |
|
92 </tr><tr> |
|
93 <td><a href="#UIPreviewer.__printImage">__printImage</a></td> |
|
94 <td>Private slot to handle the Print Image menu action.</td> |
|
95 </tr><tr> |
|
96 <td><a href="#UIPreviewer.__printPreviewImage">__printPreviewImage</a></td> |
|
97 <td>Private slot to handle the Print Preview menu action.</td> |
|
98 </tr><tr> |
|
99 <td><a href="#UIPreviewer.__saveImage">__saveImage</a></td> |
|
100 <td>Private slot to handle the Save Image menu action.</td> |
|
101 </tr><tr> |
|
102 <td><a href="#UIPreviewer.__updateActions">__updateActions</a></td> |
|
103 <td>Private slot to update the actions state.</td> |
|
104 </tr><tr> |
|
105 <td><a href="#UIPreviewer.__updateChildren">__updateChildren</a></td> |
|
106 <td>Private slot to change the style of the show UI.</td> |
|
107 </tr><tr> |
|
108 <td><a href="#UIPreviewer.__whatsThis">__whatsThis</a></td> |
|
109 <td>Private slot called in to enter Whats This mode.</td> |
|
110 </tr><tr> |
|
111 <td><a href="#UIPreviewer.eventFilter">eventFilter</a></td> |
|
112 <td>Protected method called to filter an event.</td> |
|
113 </tr><tr> |
|
114 <td><a href="#UIPreviewer.show">show</a></td> |
|
115 <td>Public slot to show this dialog.</td> |
|
116 </tr> |
|
117 </table> |
|
118 <a NAME="UIPreviewer.__init__" ID="UIPreviewer.__init__"></a> |
|
119 <h4>UIPreviewer (Constructor)</h4> |
|
120 <b>UIPreviewer</b>(<i>filename = None, parent = None, name = None</i>) |
|
121 <p> |
|
122 Constructor |
|
123 </p><dl> |
|
124 <dt><i>filename</i></dt> |
|
125 <dd> |
|
126 name of a UI file to load |
|
127 </dd><dt><i>parent</i></dt> |
|
128 <dd> |
|
129 parent widget of this window (QWidget) |
|
130 </dd><dt><i>name</i></dt> |
|
131 <dd> |
|
132 name of this window (string) |
|
133 </dd> |
|
134 </dl><a NAME="UIPreviewer.__about" ID="UIPreviewer.__about"></a> |
|
135 <h4>UIPreviewer.__about</h4> |
|
136 <b>__about</b>(<i></i>) |
|
137 <p> |
|
138 Private slot to show the about information. |
|
139 </p><a NAME="UIPreviewer.__aboutQt" ID="UIPreviewer.__aboutQt"></a> |
|
140 <h4>UIPreviewer.__aboutQt</h4> |
|
141 <b>__aboutQt</b>(<i></i>) |
|
142 <p> |
|
143 Private slot to show info about Qt. |
|
144 </p><a NAME="UIPreviewer.__copyImageToClipboard" ID="UIPreviewer.__copyImageToClipboard"></a> |
|
145 <h4>UIPreviewer.__copyImageToClipboard</h4> |
|
146 <b>__copyImageToClipboard</b>(<i></i>) |
|
147 <p> |
|
148 Private slot to handle the Copy Image menu action. |
|
149 </p><a NAME="UIPreviewer.__guiStyleSelected" ID="UIPreviewer.__guiStyleSelected"></a> |
|
150 <h4>UIPreviewer.__guiStyleSelected</h4> |
|
151 <b>__guiStyleSelected</b>(<i>selectedStyle</i>) |
|
152 <p> |
|
153 Private slot to handle the selection of a GUI style. |
|
154 </p><dl> |
|
155 <dt><i>selectedStyle</i></dt> |
|
156 <dd> |
|
157 name of the selected style (string) |
|
158 </dd> |
|
159 </dl><a NAME="UIPreviewer.__handleCloseEvent" ID="UIPreviewer.__handleCloseEvent"></a> |
|
160 <h4>UIPreviewer.__handleCloseEvent</h4> |
|
161 <b>__handleCloseEvent</b>(<i></i>) |
|
162 <p> |
|
163 Private slot to handle the close event of a viewed QMainWidget. |
|
164 </p><a NAME="UIPreviewer.__initActions" ID="UIPreviewer.__initActions"></a> |
|
165 <h4>UIPreviewer.__initActions</h4> |
|
166 <b>__initActions</b>(<i></i>) |
|
167 <p> |
|
168 Private method to define the user interface actions. |
|
169 </p><a NAME="UIPreviewer.__initMenus" ID="UIPreviewer.__initMenus"></a> |
|
170 <h4>UIPreviewer.__initMenus</h4> |
|
171 <b>__initMenus</b>(<i></i>) |
|
172 <p> |
|
173 Private method to create the menus. |
|
174 </p><a NAME="UIPreviewer.__initToolbars" ID="UIPreviewer.__initToolbars"></a> |
|
175 <h4>UIPreviewer.__initToolbars</h4> |
|
176 <b>__initToolbars</b>(<i></i>) |
|
177 <p> |
|
178 Private method to create the toolbars. |
|
179 </p><a NAME="UIPreviewer.__loadFile" ID="UIPreviewer.__loadFile"></a> |
|
180 <h4>UIPreviewer.__loadFile</h4> |
|
181 <b>__loadFile</b>(<i>fn</i>) |
|
182 <p> |
|
183 Private slot to load a ui file. |
|
184 </p><dl> |
|
185 <dt><i>fn</i></dt> |
|
186 <dd> |
|
187 name of the ui file to be laoded (string) |
|
188 </dd> |
|
189 </dl><a NAME="UIPreviewer.__openFile" ID="UIPreviewer.__openFile"></a> |
|
190 <h4>UIPreviewer.__openFile</h4> |
|
191 <b>__openFile</b>(<i></i>) |
|
192 <p> |
|
193 Private slot to load a new file. |
|
194 </p><a NAME="UIPreviewer.__print" ID="UIPreviewer.__print"></a> |
|
195 <h4>UIPreviewer.__print</h4> |
|
196 <b>__print</b>(<i>printer</i>) |
|
197 <p> |
|
198 Private slot to the actual printing. |
|
199 </p><dl> |
|
200 <dt><i>printer</i></dt> |
|
201 <dd> |
|
202 reference to the printer object (QPrinter) |
|
203 </dd> |
|
204 </dl><a NAME="UIPreviewer.__printImage" ID="UIPreviewer.__printImage"></a> |
|
205 <h4>UIPreviewer.__printImage</h4> |
|
206 <b>__printImage</b>(<i></i>) |
|
207 <p> |
|
208 Private slot to handle the Print Image menu action. |
|
209 </p><a NAME="UIPreviewer.__printPreviewImage" ID="UIPreviewer.__printPreviewImage"></a> |
|
210 <h4>UIPreviewer.__printPreviewImage</h4> |
|
211 <b>__printPreviewImage</b>(<i></i>) |
|
212 <p> |
|
213 Private slot to handle the Print Preview menu action. |
|
214 </p><a NAME="UIPreviewer.__saveImage" ID="UIPreviewer.__saveImage"></a> |
|
215 <h4>UIPreviewer.__saveImage</h4> |
|
216 <b>__saveImage</b>(<i></i>) |
|
217 <p> |
|
218 Private slot to handle the Save Image menu action. |
|
219 </p><a NAME="UIPreviewer.__updateActions" ID="UIPreviewer.__updateActions"></a> |
|
220 <h4>UIPreviewer.__updateActions</h4> |
|
221 <b>__updateActions</b>(<i></i>) |
|
222 <p> |
|
223 Private slot to update the actions state. |
|
224 </p><a NAME="UIPreviewer.__updateChildren" ID="UIPreviewer.__updateChildren"></a> |
|
225 <h4>UIPreviewer.__updateChildren</h4> |
|
226 <b>__updateChildren</b>(<i>sstyle</i>) |
|
227 <p> |
|
228 Private slot to change the style of the show UI. |
|
229 </p><dl> |
|
230 <dt><i>sstyle</i></dt> |
|
231 <dd> |
|
232 name of the selected style (string) |
|
233 </dd> |
|
234 </dl><a NAME="UIPreviewer.__whatsThis" ID="UIPreviewer.__whatsThis"></a> |
|
235 <h4>UIPreviewer.__whatsThis</h4> |
|
236 <b>__whatsThis</b>(<i></i>) |
|
237 <p> |
|
238 Private slot called in to enter Whats This mode. |
|
239 </p><a NAME="UIPreviewer.eventFilter" ID="UIPreviewer.eventFilter"></a> |
|
240 <h4>UIPreviewer.eventFilter</h4> |
|
241 <b>eventFilter</b>(<i>obj, ev</i>) |
|
242 <p> |
|
243 Protected method called to filter an event. |
|
244 </p><dl> |
|
245 <dt><i>object</i></dt> |
|
246 <dd> |
|
247 object, that generated the event (QObject) |
|
248 </dd><dt><i>event</i></dt> |
|
249 <dd> |
|
250 the event, that was generated by object (QEvent) |
|
251 </dd> |
|
252 </dl><dl> |
|
253 <dt>Returns:</dt> |
|
254 <dd> |
|
255 flag indicating if event was filtered out |
|
256 </dd> |
|
257 </dl><a NAME="UIPreviewer.show" ID="UIPreviewer.show"></a> |
|
258 <h4>UIPreviewer.show</h4> |
|
259 <b>show</b>(<i></i>) |
|
260 <p> |
|
261 Public slot to show this dialog. |
|
262 </p><p> |
|
263 This overloaded slot loads a UI file to be previewed after |
|
264 the main window has been shown. This way, previewing a dialog |
|
265 doesn't interfere with showing the main window. |
|
266 </p> |
|
267 <div align="right"><a href="#top">Up</a></div> |
|
268 <hr /> |
|
269 </body></html> |