Documentation/Source/eric6.IconEditor.IconEditorWindow.html

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

eric ide

mercurial