eric6/Documentation/Source/eric6.IconEditor.IconEditorWindow.html

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

eric ide

mercurial