|
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.IconEditor.IconEditorWindow</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.IconEditor.IconEditorWindow</h1> |
|
12 <p> |
|
13 Module implementing the icon editor main window. |
|
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="#IconEditorWindow">IconEditorWindow</a></td> |
|
23 <td>Class implementing the web browser main window.</td> |
|
24 </tr> |
|
25 </table> |
|
26 <h3>Functions</h3> |
|
27 <table> |
|
28 <tr><td>None</td></tr> |
|
29 </table> |
|
30 <hr /><hr /> |
|
31 <a NAME="IconEditorWindow" ID="IconEditorWindow"></a> |
|
32 <h2>IconEditorWindow</h2> |
|
33 <p> |
|
34 Class implementing the web browser main window. |
|
35 </p><h4>Signals</h4> |
|
36 <dl> |
|
37 <dt>editorClosed()</dt> |
|
38 <dd> |
|
39 emitted after the window was requested to close down |
|
40 </dd> |
|
41 </dl> |
|
42 <h3>Derived from</h3> |
|
43 QMainWindow |
|
44 <h3>Class Attributes</h3> |
|
45 <table> |
|
46 <tr><td>windows</td></tr> |
|
47 </table> |
|
48 <h3>Methods</h3> |
|
49 <table> |
|
50 <tr> |
|
51 <td><a href="#IconEditorWindow.__init__">IconEditorWindow</a></td> |
|
52 <td>Constructor</td> |
|
53 </tr><tr> |
|
54 <td><a href="#IconEditorWindow.__about">__about</a></td> |
|
55 <td>Private slot to show a little About message.</td> |
|
56 </tr><tr> |
|
57 <td><a href="#IconEditorWindow.__aboutQt">__aboutQt</a></td> |
|
58 <td>Private slot to handle the About Qt dialog.</td> |
|
59 </tr><tr> |
|
60 <td><a href="#IconEditorWindow.__checkActions">__checkActions</a></td> |
|
61 <td>Private slot to check some actions for their enable/disable status.</td> |
|
62 </tr><tr> |
|
63 <td><a href="#IconEditorWindow.__closeAll">__closeAll</a></td> |
|
64 <td>Private slot to close all other windows.</td> |
|
65 </tr><tr> |
|
66 <td><a href="#IconEditorWindow.__createPaletteDock">__createPaletteDock</a></td> |
|
67 <td>Private method to initialize the palette dock widget.</td> |
|
68 </tr><tr> |
|
69 <td><a href="#IconEditorWindow.__createStatusBar">__createStatusBar</a></td> |
|
70 <td>Private method to initialize the status bar.</td> |
|
71 </tr><tr> |
|
72 <td><a href="#IconEditorWindow.__initActions">__initActions</a></td> |
|
73 <td>Private method to define the user interface actions.</td> |
|
74 </tr><tr> |
|
75 <td><a href="#IconEditorWindow.__initEditActions">__initEditActions</a></td> |
|
76 <td>Private method to create the Edit actions.</td> |
|
77 </tr><tr> |
|
78 <td><a href="#IconEditorWindow.__initFileActions">__initFileActions</a></td> |
|
79 <td>Private method to define the file related user interface actions.</td> |
|
80 </tr><tr> |
|
81 <td><a href="#IconEditorWindow.__initFileFilters">__initFileFilters</a></td> |
|
82 <td>Private method to define the supported image file filters.</td> |
|
83 </tr><tr> |
|
84 <td><a href="#IconEditorWindow.__initHelpActions">__initHelpActions</a></td> |
|
85 <td>Private method to create the Help actions.</td> |
|
86 </tr><tr> |
|
87 <td><a href="#IconEditorWindow.__initMenus">__initMenus</a></td> |
|
88 <td>Private method to create the menus.</td> |
|
89 </tr><tr> |
|
90 <td><a href="#IconEditorWindow.__initToolbars">__initToolbars</a></td> |
|
91 <td>Private method to create the toolbars.</td> |
|
92 </tr><tr> |
|
93 <td><a href="#IconEditorWindow.__initToolsActions">__initToolsActions</a></td> |
|
94 <td>Private method to create the View actions.</td> |
|
95 </tr><tr> |
|
96 <td><a href="#IconEditorWindow.__initViewActions">__initViewActions</a></td> |
|
97 <td>Private method to create the View actions.</td> |
|
98 </tr><tr> |
|
99 <td><a href="#IconEditorWindow.__loadIconFile">__loadIconFile</a></td> |
|
100 <td>Private method to load an icon file.</td> |
|
101 </tr><tr> |
|
102 <td><a href="#IconEditorWindow.__maybeSave">__maybeSave</a></td> |
|
103 <td>Private method to ask the user to save the file, if it was modified.</td> |
|
104 </tr><tr> |
|
105 <td><a href="#IconEditorWindow.__modificationChanged">__modificationChanged</a></td> |
|
106 <td>Private slot to handle the modificationChanged signal.</td> |
|
107 </tr><tr> |
|
108 <td><a href="#IconEditorWindow.__newIcon">__newIcon</a></td> |
|
109 <td>Private slot to create a new icon.</td> |
|
110 </tr><tr> |
|
111 <td><a href="#IconEditorWindow.__newWindow">__newWindow</a></td> |
|
112 <td>Public slot called to open a new icon editor window.</td> |
|
113 </tr><tr> |
|
114 <td><a href="#IconEditorWindow.__openIcon">__openIcon</a></td> |
|
115 <td>Private slot to open an icon file.</td> |
|
116 </tr><tr> |
|
117 <td><a href="#IconEditorWindow.__saveIcon">__saveIcon</a></td> |
|
118 <td>Private slot to save the icon.</td> |
|
119 </tr><tr> |
|
120 <td><a href="#IconEditorWindow.__saveIconAs">__saveIconAs</a></td> |
|
121 <td>Private slot to save the icon with a new name.</td> |
|
122 </tr><tr> |
|
123 <td><a href="#IconEditorWindow.__saveIconFile">__saveIconFile</a></td> |
|
124 <td>Private method to save to the given file.</td> |
|
125 </tr><tr> |
|
126 <td><a href="#IconEditorWindow.__setCurrentFile">__setCurrentFile</a></td> |
|
127 <td>Private method to register the file name of the current file.</td> |
|
128 </tr><tr> |
|
129 <td><a href="#IconEditorWindow.__strippedName">__strippedName</a></td> |
|
130 <td>Private method to return the filename part of the given path.</td> |
|
131 </tr><tr> |
|
132 <td><a href="#IconEditorWindow.__updatePosition">__updatePosition</a></td> |
|
133 <td>Private slot to show the current cursor position.</td> |
|
134 </tr><tr> |
|
135 <td><a href="#IconEditorWindow.__updateSize">__updateSize</a></td> |
|
136 <td>Private slot to show the current icon size.</td> |
|
137 </tr><tr> |
|
138 <td><a href="#IconEditorWindow.__updateZoom">__updateZoom</a></td> |
|
139 <td>Private slot to show the current zoom factor.</td> |
|
140 </tr><tr> |
|
141 <td><a href="#IconEditorWindow.__whatsThis">__whatsThis</a></td> |
|
142 <td>Private slot called in to enter Whats This mode.</td> |
|
143 </tr><tr> |
|
144 <td><a href="#IconEditorWindow.__zoom">__zoom</a></td> |
|
145 <td>Private method to handle the zoom action.</td> |
|
146 </tr><tr> |
|
147 <td><a href="#IconEditorWindow.__zoomIn">__zoomIn</a></td> |
|
148 <td>Private slot called to handle the zoom in action.</td> |
|
149 </tr><tr> |
|
150 <td><a href="#IconEditorWindow.__zoomOut">__zoomOut</a></td> |
|
151 <td>Private slot called to handle the zoom out action.</td> |
|
152 </tr><tr> |
|
153 <td><a href="#IconEditorWindow.__zoomReset">__zoomReset</a></td> |
|
154 <td>Private slot called to handle the zoom reset action.</td> |
|
155 </tr><tr> |
|
156 <td><a href="#IconEditorWindow.closeEvent">closeEvent</a></td> |
|
157 <td>Private event handler for the close event.</td> |
|
158 </tr> |
|
159 </table> |
|
160 <a NAME="IconEditorWindow.__init__" ID="IconEditorWindow.__init__"></a> |
|
161 <h4>IconEditorWindow (Constructor)</h4> |
|
162 <b>IconEditorWindow</b>(<i>fileName = "", parent = None, fromEric = False, initShortcutsOnly = False</i>) |
|
163 <p> |
|
164 Constructor |
|
165 </p><dl> |
|
166 <dt><i>fileName</i></dt> |
|
167 <dd> |
|
168 name of a file to load on startup (string) |
|
169 </dd><dt><i>parent</i></dt> |
|
170 <dd> |
|
171 parent widget of this window (QWidget) |
|
172 </dd><dt><i>fromEric=</i></dt> |
|
173 <dd> |
|
174 flag indicating whether it was called from within eric5 (boolean) |
|
175 </dd><dt><i>initShortcutsOnly=</i></dt> |
|
176 <dd> |
|
177 flag indicating to just initialize the keyboard |
|
178 shortcuts (boolean) |
|
179 </dd> |
|
180 </dl><a NAME="IconEditorWindow.__about" ID="IconEditorWindow.__about"></a> |
|
181 <h4>IconEditorWindow.__about</h4> |
|
182 <b>__about</b>(<i></i>) |
|
183 <p> |
|
184 Private slot to show a little About message. |
|
185 </p><a NAME="IconEditorWindow.__aboutQt" ID="IconEditorWindow.__aboutQt"></a> |
|
186 <h4>IconEditorWindow.__aboutQt</h4> |
|
187 <b>__aboutQt</b>(<i></i>) |
|
188 <p> |
|
189 Private slot to handle the About Qt dialog. |
|
190 </p><a NAME="IconEditorWindow.__checkActions" ID="IconEditorWindow.__checkActions"></a> |
|
191 <h4>IconEditorWindow.__checkActions</h4> |
|
192 <b>__checkActions</b>(<i></i>) |
|
193 <p> |
|
194 Private slot to check some actions for their enable/disable status. |
|
195 </p><a NAME="IconEditorWindow.__closeAll" ID="IconEditorWindow.__closeAll"></a> |
|
196 <h4>IconEditorWindow.__closeAll</h4> |
|
197 <b>__closeAll</b>(<i></i>) |
|
198 <p> |
|
199 Private slot to close all other windows. |
|
200 </p><a NAME="IconEditorWindow.__createPaletteDock" ID="IconEditorWindow.__createPaletteDock"></a> |
|
201 <h4>IconEditorWindow.__createPaletteDock</h4> |
|
202 <b>__createPaletteDock</b>(<i></i>) |
|
203 <p> |
|
204 Private method to initialize the palette dock widget. |
|
205 </p><a NAME="IconEditorWindow.__createStatusBar" ID="IconEditorWindow.__createStatusBar"></a> |
|
206 <h4>IconEditorWindow.__createStatusBar</h4> |
|
207 <b>__createStatusBar</b>(<i></i>) |
|
208 <p> |
|
209 Private method to initialize the status bar. |
|
210 </p><a NAME="IconEditorWindow.__initActions" ID="IconEditorWindow.__initActions"></a> |
|
211 <h4>IconEditorWindow.__initActions</h4> |
|
212 <b>__initActions</b>(<i></i>) |
|
213 <p> |
|
214 Private method to define the user interface actions. |
|
215 </p><a NAME="IconEditorWindow.__initEditActions" ID="IconEditorWindow.__initEditActions"></a> |
|
216 <h4>IconEditorWindow.__initEditActions</h4> |
|
217 <b>__initEditActions</b>(<i></i>) |
|
218 <p> |
|
219 Private method to create the Edit actions. |
|
220 </p><a NAME="IconEditorWindow.__initFileActions" ID="IconEditorWindow.__initFileActions"></a> |
|
221 <h4>IconEditorWindow.__initFileActions</h4> |
|
222 <b>__initFileActions</b>(<i></i>) |
|
223 <p> |
|
224 Private method to define the file related user interface actions. |
|
225 </p><a NAME="IconEditorWindow.__initFileFilters" ID="IconEditorWindow.__initFileFilters"></a> |
|
226 <h4>IconEditorWindow.__initFileFilters</h4> |
|
227 <b>__initFileFilters</b>(<i></i>) |
|
228 <p> |
|
229 Private method to define the supported image file filters. |
|
230 </p><a NAME="IconEditorWindow.__initHelpActions" ID="IconEditorWindow.__initHelpActions"></a> |
|
231 <h4>IconEditorWindow.__initHelpActions</h4> |
|
232 <b>__initHelpActions</b>(<i></i>) |
|
233 <p> |
|
234 Private method to create the Help actions. |
|
235 </p><a NAME="IconEditorWindow.__initMenus" ID="IconEditorWindow.__initMenus"></a> |
|
236 <h4>IconEditorWindow.__initMenus</h4> |
|
237 <b>__initMenus</b>(<i></i>) |
|
238 <p> |
|
239 Private method to create the menus. |
|
240 </p><a NAME="IconEditorWindow.__initToolbars" ID="IconEditorWindow.__initToolbars"></a> |
|
241 <h4>IconEditorWindow.__initToolbars</h4> |
|
242 <b>__initToolbars</b>(<i></i>) |
|
243 <p> |
|
244 Private method to create the toolbars. |
|
245 </p><a NAME="IconEditorWindow.__initToolsActions" ID="IconEditorWindow.__initToolsActions"></a> |
|
246 <h4>IconEditorWindow.__initToolsActions</h4> |
|
247 <b>__initToolsActions</b>(<i></i>) |
|
248 <p> |
|
249 Private method to create the View actions. |
|
250 </p><a NAME="IconEditorWindow.__initViewActions" ID="IconEditorWindow.__initViewActions"></a> |
|
251 <h4>IconEditorWindow.__initViewActions</h4> |
|
252 <b>__initViewActions</b>(<i></i>) |
|
253 <p> |
|
254 Private method to create the View actions. |
|
255 </p><a NAME="IconEditorWindow.__loadIconFile" ID="IconEditorWindow.__loadIconFile"></a> |
|
256 <h4>IconEditorWindow.__loadIconFile</h4> |
|
257 <b>__loadIconFile</b>(<i>fileName</i>) |
|
258 <p> |
|
259 Private method to load an icon file. |
|
260 </p><dl> |
|
261 <dt><i>fileName</i></dt> |
|
262 <dd> |
|
263 name of the icon file to load (string). |
|
264 </dd> |
|
265 </dl><a NAME="IconEditorWindow.__maybeSave" ID="IconEditorWindow.__maybeSave"></a> |
|
266 <h4>IconEditorWindow.__maybeSave</h4> |
|
267 <b>__maybeSave</b>(<i></i>) |
|
268 <p> |
|
269 Private method to ask the user to save the file, if it was modified. |
|
270 </p><dl> |
|
271 <dt>Returns:</dt> |
|
272 <dd> |
|
273 flag indicating, if it is ok to continue (boolean) |
|
274 </dd> |
|
275 </dl><a NAME="IconEditorWindow.__modificationChanged" ID="IconEditorWindow.__modificationChanged"></a> |
|
276 <h4>IconEditorWindow.__modificationChanged</h4> |
|
277 <b>__modificationChanged</b>(<i>m</i>) |
|
278 <p> |
|
279 Private slot to handle the modificationChanged signal. |
|
280 </p><dl> |
|
281 <dt><i>m</i></dt> |
|
282 <dd> |
|
283 modification status |
|
284 </dd> |
|
285 </dl><a NAME="IconEditorWindow.__newIcon" ID="IconEditorWindow.__newIcon"></a> |
|
286 <h4>IconEditorWindow.__newIcon</h4> |
|
287 <b>__newIcon</b>(<i></i>) |
|
288 <p> |
|
289 Private slot to create a new icon. |
|
290 </p><a NAME="IconEditorWindow.__newWindow" ID="IconEditorWindow.__newWindow"></a> |
|
291 <h4>IconEditorWindow.__newWindow</h4> |
|
292 <b>__newWindow</b>(<i></i>) |
|
293 <p> |
|
294 Public slot called to open a new icon editor window. |
|
295 </p><a NAME="IconEditorWindow.__openIcon" ID="IconEditorWindow.__openIcon"></a> |
|
296 <h4>IconEditorWindow.__openIcon</h4> |
|
297 <b>__openIcon</b>(<i></i>) |
|
298 <p> |
|
299 Private slot to open an icon file. |
|
300 </p><a NAME="IconEditorWindow.__saveIcon" ID="IconEditorWindow.__saveIcon"></a> |
|
301 <h4>IconEditorWindow.__saveIcon</h4> |
|
302 <b>__saveIcon</b>(<i></i>) |
|
303 <p> |
|
304 Private slot to save the icon. |
|
305 </p><a NAME="IconEditorWindow.__saveIconAs" ID="IconEditorWindow.__saveIconAs"></a> |
|
306 <h4>IconEditorWindow.__saveIconAs</h4> |
|
307 <b>__saveIconAs</b>(<i></i>) |
|
308 <p> |
|
309 Private slot to save the icon with a new name. |
|
310 </p><a NAME="IconEditorWindow.__saveIconFile" ID="IconEditorWindow.__saveIconFile"></a> |
|
311 <h4>IconEditorWindow.__saveIconFile</h4> |
|
312 <b>__saveIconFile</b>(<i>fileName</i>) |
|
313 <p> |
|
314 Private method to save to the given file. |
|
315 </p><dl> |
|
316 <dt><i>fileName</i></dt> |
|
317 <dd> |
|
318 name of the file to save to (string) |
|
319 </dd> |
|
320 </dl><dl> |
|
321 <dt>Returns:</dt> |
|
322 <dd> |
|
323 flag indicating success (boolean) |
|
324 </dd> |
|
325 </dl><a NAME="IconEditorWindow.__setCurrentFile" ID="IconEditorWindow.__setCurrentFile"></a> |
|
326 <h4>IconEditorWindow.__setCurrentFile</h4> |
|
327 <b>__setCurrentFile</b>(<i>fileName</i>) |
|
328 <p> |
|
329 Private method to register the file name of the current file. |
|
330 </p><dl> |
|
331 <dt><i>fileName</i></dt> |
|
332 <dd> |
|
333 name of the file to register (string) |
|
334 </dd> |
|
335 </dl><a NAME="IconEditorWindow.__strippedName" ID="IconEditorWindow.__strippedName"></a> |
|
336 <h4>IconEditorWindow.__strippedName</h4> |
|
337 <b>__strippedName</b>(<i>fullFileName</i>) |
|
338 <p> |
|
339 Private method to return the filename part of the given path. |
|
340 </p><dl> |
|
341 <dt><i>fullFileName</i></dt> |
|
342 <dd> |
|
343 full pathname of the given file (string) |
|
344 </dd> |
|
345 </dl><dl> |
|
346 <dt>Returns:</dt> |
|
347 <dd> |
|
348 filename part (string) |
|
349 </dd> |
|
350 </dl><a NAME="IconEditorWindow.__updatePosition" ID="IconEditorWindow.__updatePosition"></a> |
|
351 <h4>IconEditorWindow.__updatePosition</h4> |
|
352 <b>__updatePosition</b>(<i>x, y</i>) |
|
353 <p> |
|
354 Private slot to show the current cursor position. |
|
355 </p><dl> |
|
356 <dt><i>x</i></dt> |
|
357 <dd> |
|
358 x-coordinate (integer) |
|
359 </dd><dt><i>y</i></dt> |
|
360 <dd> |
|
361 y-coordinate (integer) |
|
362 </dd> |
|
363 </dl><a NAME="IconEditorWindow.__updateSize" ID="IconEditorWindow.__updateSize"></a> |
|
364 <h4>IconEditorWindow.__updateSize</h4> |
|
365 <b>__updateSize</b>(<i>w, h</i>) |
|
366 <p> |
|
367 Private slot to show the current icon size. |
|
368 </p><dl> |
|
369 <dt><i>w</i></dt> |
|
370 <dd> |
|
371 width of the icon (integer) |
|
372 </dd><dt><i>h</i></dt> |
|
373 <dd> |
|
374 height of the icon (integer) |
|
375 </dd> |
|
376 </dl><a NAME="IconEditorWindow.__updateZoom" ID="IconEditorWindow.__updateZoom"></a> |
|
377 <h4>IconEditorWindow.__updateZoom</h4> |
|
378 <b>__updateZoom</b>(<i></i>) |
|
379 <p> |
|
380 Private slot to show the current zoom factor. |
|
381 </p><a NAME="IconEditorWindow.__whatsThis" ID="IconEditorWindow.__whatsThis"></a> |
|
382 <h4>IconEditorWindow.__whatsThis</h4> |
|
383 <b>__whatsThis</b>(<i></i>) |
|
384 <p> |
|
385 Private slot called in to enter Whats This mode. |
|
386 </p><a NAME="IconEditorWindow.__zoom" ID="IconEditorWindow.__zoom"></a> |
|
387 <h4>IconEditorWindow.__zoom</h4> |
|
388 <b>__zoom</b>(<i></i>) |
|
389 <p> |
|
390 Private method to handle the zoom action. |
|
391 </p><a NAME="IconEditorWindow.__zoomIn" ID="IconEditorWindow.__zoomIn"></a> |
|
392 <h4>IconEditorWindow.__zoomIn</h4> |
|
393 <b>__zoomIn</b>(<i></i>) |
|
394 <p> |
|
395 Private slot called to handle the zoom in action. |
|
396 </p><a NAME="IconEditorWindow.__zoomOut" ID="IconEditorWindow.__zoomOut"></a> |
|
397 <h4>IconEditorWindow.__zoomOut</h4> |
|
398 <b>__zoomOut</b>(<i></i>) |
|
399 <p> |
|
400 Private slot called to handle the zoom out action. |
|
401 </p><a NAME="IconEditorWindow.__zoomReset" ID="IconEditorWindow.__zoomReset"></a> |
|
402 <h4>IconEditorWindow.__zoomReset</h4> |
|
403 <b>__zoomReset</b>(<i></i>) |
|
404 <p> |
|
405 Private slot called to handle the zoom reset action. |
|
406 </p><a NAME="IconEditorWindow.closeEvent" ID="IconEditorWindow.closeEvent"></a> |
|
407 <h4>IconEditorWindow.closeEvent</h4> |
|
408 <b>closeEvent</b>(<i>evt</i>) |
|
409 <p> |
|
410 Private event handler for the close event. |
|
411 </p><dl> |
|
412 <dt><i>evt</i></dt> |
|
413 <dd> |
|
414 the close event (QCloseEvent) |
|
415 <br />This event is simply accepted after the history has been |
|
416 saved and all window references have been deleted. |
|
417 </dd> |
|
418 </dl> |
|
419 <div align="right"><a href="#top">Up</a></div> |
|
420 <hr /> |
|
421 </body></html> |