|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric7.IconEditor.IconEditorGrid</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.IconEditor.IconEditorGrid</h1> |
|
10 |
|
11 <p> |
|
12 Module implementing the icon editor grid. |
|
13 </p> |
|
14 <h3>Global Attributes</h3> |
|
15 |
|
16 <table> |
|
17 <tr><td>None</td></tr> |
|
18 </table> |
|
19 <h3>Classes</h3> |
|
20 |
|
21 <table> |
|
22 |
|
23 <tr> |
|
24 <td><a href="#IconEditCommand">IconEditCommand</a></td> |
|
25 <td>Class implementing an undo command for the icon editor.</td> |
|
26 </tr> |
|
27 <tr> |
|
28 <td><a href="#IconEditorGrid">IconEditorGrid</a></td> |
|
29 <td>Class implementing the icon editor grid.</td> |
|
30 </tr> |
|
31 <tr> |
|
32 <td><a href="#IconEditorTool">IconEditorTool</a></td> |
|
33 <td>Class defining the edit tools.</td> |
|
34 </tr> |
|
35 </table> |
|
36 <h3>Functions</h3> |
|
37 |
|
38 <table> |
|
39 <tr><td>None</td></tr> |
|
40 </table> |
|
41 <hr /> |
|
42 <hr /> |
|
43 <a NAME="IconEditCommand" ID="IconEditCommand"></a> |
|
44 <h2>IconEditCommand</h2> |
|
45 |
|
46 <p> |
|
47 Class implementing an undo command for the icon editor. |
|
48 </p> |
|
49 <h3>Derived from</h3> |
|
50 QUndoCommand |
|
51 <h3>Class Attributes</h3> |
|
52 |
|
53 <table> |
|
54 <tr><td>None</td></tr> |
|
55 </table> |
|
56 <h3>Class Methods</h3> |
|
57 |
|
58 <table> |
|
59 <tr><td>None</td></tr> |
|
60 </table> |
|
61 <h3>Methods</h3> |
|
62 |
|
63 <table> |
|
64 |
|
65 <tr> |
|
66 <td><a href="#IconEditCommand.__init__">IconEditCommand</a></td> |
|
67 <td>Constructor</td> |
|
68 </tr> |
|
69 <tr> |
|
70 <td><a href="#IconEditCommand.redo">redo</a></td> |
|
71 <td>Public method to perform the redo.</td> |
|
72 </tr> |
|
73 <tr> |
|
74 <td><a href="#IconEditCommand.setAfterImage">setAfterImage</a></td> |
|
75 <td>Public method to set the image after the changes were applied.</td> |
|
76 </tr> |
|
77 <tr> |
|
78 <td><a href="#IconEditCommand.undo">undo</a></td> |
|
79 <td>Public method to perform the undo.</td> |
|
80 </tr> |
|
81 </table> |
|
82 <h3>Static Methods</h3> |
|
83 |
|
84 <table> |
|
85 <tr><td>None</td></tr> |
|
86 </table> |
|
87 |
|
88 <a NAME="IconEditCommand.__init__" ID="IconEditCommand.__init__"></a> |
|
89 <h4>IconEditCommand (Constructor)</h4> |
|
90 <b>IconEditCommand</b>(<i>grid, text, oldImage, parent=None</i>) |
|
91 |
|
92 <p> |
|
93 Constructor |
|
94 </p> |
|
95 <dl> |
|
96 |
|
97 <dt><i>grid</i></dt> |
|
98 <dd> |
|
99 reference to the icon editor grid (IconEditorGrid) |
|
100 </dd> |
|
101 <dt><i>text</i></dt> |
|
102 <dd> |
|
103 text for the undo command (string) |
|
104 </dd> |
|
105 <dt><i>oldImage</i></dt> |
|
106 <dd> |
|
107 copy of the icon before the changes were applied |
|
108 (QImage) |
|
109 </dd> |
|
110 <dt><i>parent</i></dt> |
|
111 <dd> |
|
112 reference to the parent command (QUndoCommand) |
|
113 </dd> |
|
114 </dl> |
|
115 <a NAME="IconEditCommand.redo" ID="IconEditCommand.redo"></a> |
|
116 <h4>IconEditCommand.redo</h4> |
|
117 <b>redo</b>(<i></i>) |
|
118 |
|
119 <p> |
|
120 Public method to perform the redo. |
|
121 </p> |
|
122 <a NAME="IconEditCommand.setAfterImage" ID="IconEditCommand.setAfterImage"></a> |
|
123 <h4>IconEditCommand.setAfterImage</h4> |
|
124 <b>setAfterImage</b>(<i>image</i>) |
|
125 |
|
126 <p> |
|
127 Public method to set the image after the changes were applied. |
|
128 </p> |
|
129 <dl> |
|
130 |
|
131 <dt><i>image</i></dt> |
|
132 <dd> |
|
133 copy of the icon after the changes were applied (QImage) |
|
134 </dd> |
|
135 </dl> |
|
136 <a NAME="IconEditCommand.undo" ID="IconEditCommand.undo"></a> |
|
137 <h4>IconEditCommand.undo</h4> |
|
138 <b>undo</b>(<i></i>) |
|
139 |
|
140 <p> |
|
141 Public method to perform the undo. |
|
142 </p> |
|
143 <div align="right"><a href="#top">Up</a></div> |
|
144 <hr /> |
|
145 <hr /> |
|
146 <a NAME="IconEditorGrid" ID="IconEditorGrid"></a> |
|
147 <h2>IconEditorGrid</h2> |
|
148 |
|
149 <p> |
|
150 Class implementing the icon editor grid. |
|
151 </p> |
|
152 <h3>Signals</h3> |
|
153 <dl> |
|
154 |
|
155 <dt>canRedoChanged(bool)</dt> |
|
156 <dd> |
|
157 emitted after the redo status has changed |
|
158 </dd> |
|
159 <dt>canUndoChanged(bool)</dt> |
|
160 <dd> |
|
161 emitted after the undo status has changed |
|
162 </dd> |
|
163 <dt>clipboardImageAvailable(bool)</dt> |
|
164 <dd> |
|
165 emitted to signal the availability |
|
166 of an image to be pasted |
|
167 </dd> |
|
168 <dt>colorChanged(QColor)</dt> |
|
169 <dd> |
|
170 emitted after the drawing color was changed |
|
171 </dd> |
|
172 <dt>imageChanged(bool)</dt> |
|
173 <dd> |
|
174 emitted after the image was modified |
|
175 </dd> |
|
176 <dt>positionChanged(int, int)</dt> |
|
177 <dd> |
|
178 emitted after the cursor poition was |
|
179 changed |
|
180 </dd> |
|
181 <dt>previewChanged(QPixmap)</dt> |
|
182 <dd> |
|
183 emitted to signal a new preview pixmap |
|
184 </dd> |
|
185 <dt>selectionAvailable(bool)</dt> |
|
186 <dd> |
|
187 emitted to signal a change of the |
|
188 selection |
|
189 </dd> |
|
190 <dt>sizeChanged(int, int)</dt> |
|
191 <dd> |
|
192 emitted after the size has been changed |
|
193 </dd> |
|
194 <dt>zoomChanged(int)</dt> |
|
195 <dd> |
|
196 emitted to signal a change of the zoom value |
|
197 </dd> |
|
198 </dl> |
|
199 <h3>Derived from</h3> |
|
200 QWidget |
|
201 <h3>Class Attributes</h3> |
|
202 |
|
203 <table> |
|
204 <tr><td>MarkColor</td></tr><tr><td>NoMarkColor</td></tr><tr><td>ZoomDefault</td></tr><tr><td>ZoomMaximum</td></tr><tr><td>ZoomMinimum</td></tr><tr><td>ZoomPercent</td></tr><tr><td>ZoomStep</td></tr> |
|
205 </table> |
|
206 <h3>Class Methods</h3> |
|
207 |
|
208 <table> |
|
209 <tr><td>None</td></tr> |
|
210 </table> |
|
211 <h3>Methods</h3> |
|
212 |
|
213 <table> |
|
214 |
|
215 <tr> |
|
216 <td><a href="#IconEditorGrid.__init__">IconEditorGrid</a></td> |
|
217 <td>Constructor</td> |
|
218 </tr> |
|
219 <tr> |
|
220 <td><a href="#IconEditorGrid.__checkClipboard">__checkClipboard</a></td> |
|
221 <td>Private slot to check, if the clipboard contains a valid image, and signal the result.</td> |
|
222 </tr> |
|
223 <tr> |
|
224 <td><a href="#IconEditorGrid.__cleanChanged">__cleanChanged</a></td> |
|
225 <td>Private slot to handle the undo stack clean state change.</td> |
|
226 </tr> |
|
227 <tr> |
|
228 <td><a href="#IconEditorGrid.__clipboardImage">__clipboardImage</a></td> |
|
229 <td>Private method to get an image from the clipboard.</td> |
|
230 </tr> |
|
231 <tr> |
|
232 <td><a href="#IconEditorGrid.__drawFlood">__drawFlood</a></td> |
|
233 <td>Private method to perform a flood fill operation.</td> |
|
234 </tr> |
|
235 <tr> |
|
236 <td><a href="#IconEditorGrid.__drawPasteRect">__drawPasteRect</a></td> |
|
237 <td>Private slot to draw a rectangle for signaling a paste operation.</td> |
|
238 </tr> |
|
239 <tr> |
|
240 <td><a href="#IconEditorGrid.__drawTool">__drawTool</a></td> |
|
241 <td>Private method to perform a draw operation depending of the current tool.</td> |
|
242 </tr> |
|
243 <tr> |
|
244 <td><a href="#IconEditorGrid.__getSelectionImage">__getSelectionImage</a></td> |
|
245 <td>Private method to get an image from the selection.</td> |
|
246 </tr> |
|
247 <tr> |
|
248 <td><a href="#IconEditorGrid.__imageCoordinates">__imageCoordinates</a></td> |
|
249 <td>Private method to convert from widget to image coordinates.</td> |
|
250 </tr> |
|
251 <tr> |
|
252 <td><a href="#IconEditorGrid.__initCursors">__initCursors</a></td> |
|
253 <td>Private method to initialize the various cursors.</td> |
|
254 </tr> |
|
255 <tr> |
|
256 <td><a href="#IconEditorGrid.__initUndoTexts">__initUndoTexts</a></td> |
|
257 <td>Private method to initialize texts to be associated with undo commands for the various drawing tools.</td> |
|
258 </tr> |
|
259 <tr> |
|
260 <td><a href="#IconEditorGrid.__isMarked">__isMarked</a></td> |
|
261 <td>Private method to check, if a pixel is marked.</td> |
|
262 </tr> |
|
263 <tr> |
|
264 <td><a href="#IconEditorGrid.__pixelRect">__pixelRect</a></td> |
|
265 <td>Private method to determine the rectangle for a given pixel coordinate.</td> |
|
266 </tr> |
|
267 <tr> |
|
268 <td><a href="#IconEditorGrid.__setImagePixel">__setImagePixel</a></td> |
|
269 <td>Private slot to set or erase a pixel.</td> |
|
270 </tr> |
|
271 <tr> |
|
272 <td><a href="#IconEditorGrid.__unMark">__unMark</a></td> |
|
273 <td>Private slot to remove the mark indicator.</td> |
|
274 </tr> |
|
275 <tr> |
|
276 <td><a href="#IconEditorGrid.__updateImageRect">__updateImageRect</a></td> |
|
277 <td>Private slot to update parts of the widget.</td> |
|
278 </tr> |
|
279 <tr> |
|
280 <td><a href="#IconEditorGrid.__updatePreviewPixmap">__updatePreviewPixmap</a></td> |
|
281 <td>Private slot to generate and signal an updated preview pixmap.</td> |
|
282 </tr> |
|
283 <tr> |
|
284 <td><a href="#IconEditorGrid.__updateRect">__updateRect</a></td> |
|
285 <td>Private slot to update parts of the widget.</td> |
|
286 </tr> |
|
287 <tr> |
|
288 <td><a href="#IconEditorGrid.canPaste">canPaste</a></td> |
|
289 <td>Public slot to check the availability of the paste operation.</td> |
|
290 </tr> |
|
291 <tr> |
|
292 <td><a href="#IconEditorGrid.canRedo">canRedo</a></td> |
|
293 <td>Public method to return the redo status.</td> |
|
294 </tr> |
|
295 <tr> |
|
296 <td><a href="#IconEditorGrid.canUndo">canUndo</a></td> |
|
297 <td>Public method to return the undo status.</td> |
|
298 </tr> |
|
299 <tr> |
|
300 <td><a href="#IconEditorGrid.compositingMode">compositingMode</a></td> |
|
301 <td>Public method to get the compositing mode.</td> |
|
302 </tr> |
|
303 <tr> |
|
304 <td><a href="#IconEditorGrid.editClear">editClear</a></td> |
|
305 <td>Public slot to clear the image.</td> |
|
306 </tr> |
|
307 <tr> |
|
308 <td><a href="#IconEditorGrid.editCopy">editCopy</a></td> |
|
309 <td>Public slot to copy the selection.</td> |
|
310 </tr> |
|
311 <tr> |
|
312 <td><a href="#IconEditorGrid.editCut">editCut</a></td> |
|
313 <td>Public slot to cut the selection.</td> |
|
314 </tr> |
|
315 <tr> |
|
316 <td><a href="#IconEditorGrid.editNew">editNew</a></td> |
|
317 <td>Public slot to generate a new, empty image.</td> |
|
318 </tr> |
|
319 <tr> |
|
320 <td><a href="#IconEditorGrid.editPaste">editPaste</a></td> |
|
321 <td>Public slot to paste an image from the clipboard.</td> |
|
322 </tr> |
|
323 <tr> |
|
324 <td><a href="#IconEditorGrid.editPasteAsNew">editPasteAsNew</a></td> |
|
325 <td>Public slot to paste the clipboard as a new image.</td> |
|
326 </tr> |
|
327 <tr> |
|
328 <td><a href="#IconEditorGrid.editRedo">editRedo</a></td> |
|
329 <td>Public slot to perform a redo operation.</td> |
|
330 </tr> |
|
331 <tr> |
|
332 <td><a href="#IconEditorGrid.editResize">editResize</a></td> |
|
333 <td>Public slot to resize the image.</td> |
|
334 </tr> |
|
335 <tr> |
|
336 <td><a href="#IconEditorGrid.editSelectAll">editSelectAll</a></td> |
|
337 <td>Public slot to select the complete image.</td> |
|
338 </tr> |
|
339 <tr> |
|
340 <td><a href="#IconEditorGrid.editUndo">editUndo</a></td> |
|
341 <td>Public slot to perform an undo operation.</td> |
|
342 </tr> |
|
343 <tr> |
|
344 <td><a href="#IconEditorGrid.grayScale">grayScale</a></td> |
|
345 <td>Public slot to convert the image to gray preserving transparency.</td> |
|
346 </tr> |
|
347 <tr> |
|
348 <td><a href="#IconEditorGrid.iconImage">iconImage</a></td> |
|
349 <td>Public method to get a copy of the icon image.</td> |
|
350 </tr> |
|
351 <tr> |
|
352 <td><a href="#IconEditorGrid.iconSize">iconSize</a></td> |
|
353 <td>Public method to get the size of the icon.</td> |
|
354 </tr> |
|
355 <tr> |
|
356 <td><a href="#IconEditorGrid.isDirty">isDirty</a></td> |
|
357 <td>Public method to check the dirty status.</td> |
|
358 </tr> |
|
359 <tr> |
|
360 <td><a href="#IconEditorGrid.isGridEnabled">isGridEnabled</a></td> |
|
361 <td>Public method to get the grid lines status.</td> |
|
362 </tr> |
|
363 <tr> |
|
364 <td><a href="#IconEditorGrid.isSelectionAvailable">isSelectionAvailable</a></td> |
|
365 <td>Public method to check the availability of a selection.</td> |
|
366 </tr> |
|
367 <tr> |
|
368 <td><a href="#IconEditorGrid.mouseMoveEvent">mouseMoveEvent</a></td> |
|
369 <td>Protected method to handle mouse move events.</td> |
|
370 </tr> |
|
371 <tr> |
|
372 <td><a href="#IconEditorGrid.mousePressEvent">mousePressEvent</a></td> |
|
373 <td>Protected method to handle mouse button press events.</td> |
|
374 </tr> |
|
375 <tr> |
|
376 <td><a href="#IconEditorGrid.mouseReleaseEvent">mouseReleaseEvent</a></td> |
|
377 <td>Protected method to handle mouse button release events.</td> |
|
378 </tr> |
|
379 <tr> |
|
380 <td><a href="#IconEditorGrid.paintEvent">paintEvent</a></td> |
|
381 <td>Protected method called to repaint some of the widget.</td> |
|
382 </tr> |
|
383 <tr> |
|
384 <td><a href="#IconEditorGrid.penColor">penColor</a></td> |
|
385 <td>Public method to get the current drawing color.</td> |
|
386 </tr> |
|
387 <tr> |
|
388 <td><a href="#IconEditorGrid.previewPixmap">previewPixmap</a></td> |
|
389 <td>Public method to generate a preview pixmap.</td> |
|
390 </tr> |
|
391 <tr> |
|
392 <td><a href="#IconEditorGrid.setCompositingMode">setCompositingMode</a></td> |
|
393 <td>Public method to set the compositing mode.</td> |
|
394 </tr> |
|
395 <tr> |
|
396 <td><a href="#IconEditorGrid.setDirty">setDirty</a></td> |
|
397 <td>Public slot to set the dirty flag.</td> |
|
398 </tr> |
|
399 <tr> |
|
400 <td><a href="#IconEditorGrid.setGridEnabled">setGridEnabled</a></td> |
|
401 <td>Public method to enable the display of grid lines.</td> |
|
402 </tr> |
|
403 <tr> |
|
404 <td><a href="#IconEditorGrid.setIconImage">setIconImage</a></td> |
|
405 <td>Public method to set a new icon image.</td> |
|
406 </tr> |
|
407 <tr> |
|
408 <td><a href="#IconEditorGrid.setPenColor">setPenColor</a></td> |
|
409 <td>Public method to set the drawing color.</td> |
|
410 </tr> |
|
411 <tr> |
|
412 <td><a href="#IconEditorGrid.setTool">setTool</a></td> |
|
413 <td>Public method to set the current drawing tool.</td> |
|
414 </tr> |
|
415 <tr> |
|
416 <td><a href="#IconEditorGrid.setZoomFactor">setZoomFactor</a></td> |
|
417 <td>Public method to set the zoom factor in percent.</td> |
|
418 </tr> |
|
419 <tr> |
|
420 <td><a href="#IconEditorGrid.shutdown">shutdown</a></td> |
|
421 <td>Public slot to perform some shutdown actions.</td> |
|
422 </tr> |
|
423 <tr> |
|
424 <td><a href="#IconEditorGrid.sizeHint">sizeHint</a></td> |
|
425 <td>Public method to report the size hint.</td> |
|
426 </tr> |
|
427 <tr> |
|
428 <td><a href="#IconEditorGrid.tool">tool</a></td> |
|
429 <td>Public method to get the current drawing tool.</td> |
|
430 </tr> |
|
431 <tr> |
|
432 <td><a href="#IconEditorGrid.zoomFactor">zoomFactor</a></td> |
|
433 <td>Public method to get the current zoom factor in percent.</td> |
|
434 </tr> |
|
435 </table> |
|
436 <h3>Static Methods</h3> |
|
437 |
|
438 <table> |
|
439 <tr><td>None</td></tr> |
|
440 </table> |
|
441 |
|
442 <a NAME="IconEditorGrid.__init__" ID="IconEditorGrid.__init__"></a> |
|
443 <h4>IconEditorGrid (Constructor)</h4> |
|
444 <b>IconEditorGrid</b>(<i>parent=None</i>) |
|
445 |
|
446 <p> |
|
447 Constructor |
|
448 </p> |
|
449 <dl> |
|
450 |
|
451 <dt><i>parent</i></dt> |
|
452 <dd> |
|
453 reference to the parent widget (QWidget) |
|
454 </dd> |
|
455 </dl> |
|
456 <a NAME="IconEditorGrid.__checkClipboard" ID="IconEditorGrid.__checkClipboard"></a> |
|
457 <h4>IconEditorGrid.__checkClipboard</h4> |
|
458 <b>__checkClipboard</b>(<i></i>) |
|
459 |
|
460 <p> |
|
461 Private slot to check, if the clipboard contains a valid image, and |
|
462 signal the result. |
|
463 </p> |
|
464 <a NAME="IconEditorGrid.__cleanChanged" ID="IconEditorGrid.__cleanChanged"></a> |
|
465 <h4>IconEditorGrid.__cleanChanged</h4> |
|
466 <b>__cleanChanged</b>(<i>clean</i>) |
|
467 |
|
468 <p> |
|
469 Private slot to handle the undo stack clean state change. |
|
470 </p> |
|
471 <dl> |
|
472 |
|
473 <dt><i>clean</i></dt> |
|
474 <dd> |
|
475 flag indicating the clean state (boolean) |
|
476 </dd> |
|
477 </dl> |
|
478 <a NAME="IconEditorGrid.__clipboardImage" ID="IconEditorGrid.__clipboardImage"></a> |
|
479 <h4>IconEditorGrid.__clipboardImage</h4> |
|
480 <b>__clipboardImage</b>(<i></i>) |
|
481 |
|
482 <p> |
|
483 Private method to get an image from the clipboard. |
|
484 </p> |
|
485 <dl> |
|
486 <dt>Return:</dt> |
|
487 <dd> |
|
488 tuple with the image (QImage) and a flag indicating a |
|
489 valid image (boolean) |
|
490 </dd> |
|
491 </dl> |
|
492 <a NAME="IconEditorGrid.__drawFlood" ID="IconEditorGrid.__drawFlood"></a> |
|
493 <h4>IconEditorGrid.__drawFlood</h4> |
|
494 <b>__drawFlood</b>(<i>i, j, oldColor, doUpdate=True</i>) |
|
495 |
|
496 <p> |
|
497 Private method to perform a flood fill operation. |
|
498 </p> |
|
499 <dl> |
|
500 |
|
501 <dt><i>i</i></dt> |
|
502 <dd> |
|
503 x-value in image coordinates (integer) |
|
504 </dd> |
|
505 <dt><i>j</i></dt> |
|
506 <dd> |
|
507 y-value in image coordinates (integer) |
|
508 </dd> |
|
509 <dt><i>oldColor</i></dt> |
|
510 <dd> |
|
511 reference to the color at position i, j (QColor) |
|
512 </dd> |
|
513 <dt><i>doUpdate</i></dt> |
|
514 <dd> |
|
515 flag indicating an update is requested (boolean) |
|
516 (used for speed optimizations) |
|
517 </dd> |
|
518 </dl> |
|
519 <a NAME="IconEditorGrid.__drawPasteRect" ID="IconEditorGrid.__drawPasteRect"></a> |
|
520 <h4>IconEditorGrid.__drawPasteRect</h4> |
|
521 <b>__drawPasteRect</b>(<i>pos</i>) |
|
522 |
|
523 <p> |
|
524 Private slot to draw a rectangle for signaling a paste operation. |
|
525 </p> |
|
526 <dl> |
|
527 |
|
528 <dt><i>pos</i></dt> |
|
529 <dd> |
|
530 widget position of the paste rectangle (QPoint) |
|
531 </dd> |
|
532 </dl> |
|
533 <a NAME="IconEditorGrid.__drawTool" ID="IconEditorGrid.__drawTool"></a> |
|
534 <h4>IconEditorGrid.__drawTool</h4> |
|
535 <b>__drawTool</b>(<i>pos, mark</i>) |
|
536 |
|
537 <p> |
|
538 Private method to perform a draw operation depending of the current |
|
539 tool. |
|
540 </p> |
|
541 <dl> |
|
542 |
|
543 <dt><i>pos</i></dt> |
|
544 <dd> |
|
545 widget coordinate to perform the draw operation at (QPoint) |
|
546 </dd> |
|
547 <dt><i>mark</i></dt> |
|
548 <dd> |
|
549 flag indicating a mark operation (boolean) |
|
550 </dd> |
|
551 </dl> |
|
552 <dl> |
|
553 <dt>Return:</dt> |
|
554 <dd> |
|
555 flag indicating a successful draw (boolean) |
|
556 </dd> |
|
557 </dl> |
|
558 <a NAME="IconEditorGrid.__getSelectionImage" ID="IconEditorGrid.__getSelectionImage"></a> |
|
559 <h4>IconEditorGrid.__getSelectionImage</h4> |
|
560 <b>__getSelectionImage</b>(<i>cut</i>) |
|
561 |
|
562 <p> |
|
563 Private method to get an image from the selection. |
|
564 </p> |
|
565 <dl> |
|
566 |
|
567 <dt><i>cut</i></dt> |
|
568 <dd> |
|
569 flag indicating to cut the selection (boolean) |
|
570 </dd> |
|
571 </dl> |
|
572 <dl> |
|
573 <dt>Return:</dt> |
|
574 <dd> |
|
575 image of the selection (QImage) |
|
576 </dd> |
|
577 </dl> |
|
578 <a NAME="IconEditorGrid.__imageCoordinates" ID="IconEditorGrid.__imageCoordinates"></a> |
|
579 <h4>IconEditorGrid.__imageCoordinates</h4> |
|
580 <b>__imageCoordinates</b>(<i>pos</i>) |
|
581 |
|
582 <p> |
|
583 Private method to convert from widget to image coordinates. |
|
584 </p> |
|
585 <dl> |
|
586 |
|
587 <dt><i>pos</i></dt> |
|
588 <dd> |
|
589 widget coordinate (QPoint) |
|
590 </dd> |
|
591 </dl> |
|
592 <dl> |
|
593 <dt>Return:</dt> |
|
594 <dd> |
|
595 tuple with the image coordinates (tuple of two integers) |
|
596 </dd> |
|
597 </dl> |
|
598 <a NAME="IconEditorGrid.__initCursors" ID="IconEditorGrid.__initCursors"></a> |
|
599 <h4>IconEditorGrid.__initCursors</h4> |
|
600 <b>__initCursors</b>(<i></i>) |
|
601 |
|
602 <p> |
|
603 Private method to initialize the various cursors. |
|
604 </p> |
|
605 <a NAME="IconEditorGrid.__initUndoTexts" ID="IconEditorGrid.__initUndoTexts"></a> |
|
606 <h4>IconEditorGrid.__initUndoTexts</h4> |
|
607 <b>__initUndoTexts</b>(<i></i>) |
|
608 |
|
609 <p> |
|
610 Private method to initialize texts to be associated with undo commands |
|
611 for the various drawing tools. |
|
612 </p> |
|
613 <a NAME="IconEditorGrid.__isMarked" ID="IconEditorGrid.__isMarked"></a> |
|
614 <h4>IconEditorGrid.__isMarked</h4> |
|
615 <b>__isMarked</b>(<i>i, j</i>) |
|
616 |
|
617 <p> |
|
618 Private method to check, if a pixel is marked. |
|
619 </p> |
|
620 <dl> |
|
621 |
|
622 <dt><i>i</i></dt> |
|
623 <dd> |
|
624 x-value in image coordinates (integer) |
|
625 </dd> |
|
626 <dt><i>j</i></dt> |
|
627 <dd> |
|
628 y-value in image coordinates (integer) |
|
629 </dd> |
|
630 </dl> |
|
631 <dl> |
|
632 <dt>Return:</dt> |
|
633 <dd> |
|
634 flag indicating a marked pixel (boolean) |
|
635 </dd> |
|
636 </dl> |
|
637 <a NAME="IconEditorGrid.__pixelRect" ID="IconEditorGrid.__pixelRect"></a> |
|
638 <h4>IconEditorGrid.__pixelRect</h4> |
|
639 <b>__pixelRect</b>(<i>i, j</i>) |
|
640 |
|
641 <p> |
|
642 Private method to determine the rectangle for a given pixel coordinate. |
|
643 </p> |
|
644 <dl> |
|
645 |
|
646 <dt><i>i</i></dt> |
|
647 <dd> |
|
648 x-coordinate of the pixel in the image (integer) |
|
649 </dd> |
|
650 <dt><i>j</i></dt> |
|
651 <dd> |
|
652 y-coordinate of the pixel in the image (integer) |
|
653 </dd> |
|
654 </dl> |
|
655 <dl> |
|
656 <dt>Return:</dt> |
|
657 <dd> |
|
658 rectangle for the given pixel coordinates (QRect) |
|
659 </dd> |
|
660 </dl> |
|
661 <a NAME="IconEditorGrid.__setImagePixel" ID="IconEditorGrid.__setImagePixel"></a> |
|
662 <h4>IconEditorGrid.__setImagePixel</h4> |
|
663 <b>__setImagePixel</b>(<i>pos, opaque</i>) |
|
664 |
|
665 <p> |
|
666 Private slot to set or erase a pixel. |
|
667 </p> |
|
668 <dl> |
|
669 |
|
670 <dt><i>pos</i></dt> |
|
671 <dd> |
|
672 position of the pixel in the widget (QPoint) |
|
673 </dd> |
|
674 <dt><i>opaque</i></dt> |
|
675 <dd> |
|
676 flag indicating a set operation (boolean) |
|
677 </dd> |
|
678 </dl> |
|
679 <a NAME="IconEditorGrid.__unMark" ID="IconEditorGrid.__unMark"></a> |
|
680 <h4>IconEditorGrid.__unMark</h4> |
|
681 <b>__unMark</b>(<i></i>) |
|
682 |
|
683 <p> |
|
684 Private slot to remove the mark indicator. |
|
685 </p> |
|
686 <a NAME="IconEditorGrid.__updateImageRect" ID="IconEditorGrid.__updateImageRect"></a> |
|
687 <h4>IconEditorGrid.__updateImageRect</h4> |
|
688 <b>__updateImageRect</b>(<i>ipos1, ipos2</i>) |
|
689 |
|
690 <p> |
|
691 Private slot to update parts of the widget. |
|
692 </p> |
|
693 <dl> |
|
694 |
|
695 <dt><i>ipos1</i></dt> |
|
696 <dd> |
|
697 top, left position for the update in image coordinates |
|
698 (QPoint) |
|
699 </dd> |
|
700 <dt><i>ipos2</i></dt> |
|
701 <dd> |
|
702 bottom, right position for the update in image |
|
703 coordinates (QPoint) |
|
704 </dd> |
|
705 </dl> |
|
706 <a NAME="IconEditorGrid.__updatePreviewPixmap" ID="IconEditorGrid.__updatePreviewPixmap"></a> |
|
707 <h4>IconEditorGrid.__updatePreviewPixmap</h4> |
|
708 <b>__updatePreviewPixmap</b>(<i></i>) |
|
709 |
|
710 <p> |
|
711 Private slot to generate and signal an updated preview pixmap. |
|
712 </p> |
|
713 <a NAME="IconEditorGrid.__updateRect" ID="IconEditorGrid.__updateRect"></a> |
|
714 <h4>IconEditorGrid.__updateRect</h4> |
|
715 <b>__updateRect</b>(<i>pos1, pos2</i>) |
|
716 |
|
717 <p> |
|
718 Private slot to update parts of the widget. |
|
719 </p> |
|
720 <dl> |
|
721 |
|
722 <dt><i>pos1</i></dt> |
|
723 <dd> |
|
724 top, left position for the update in widget coordinates |
|
725 (QPoint) |
|
726 </dd> |
|
727 <dt><i>pos2</i></dt> |
|
728 <dd> |
|
729 bottom, right position for the update in widget |
|
730 coordinates (QPoint) |
|
731 </dd> |
|
732 </dl> |
|
733 <a NAME="IconEditorGrid.canPaste" ID="IconEditorGrid.canPaste"></a> |
|
734 <h4>IconEditorGrid.canPaste</h4> |
|
735 <b>canPaste</b>(<i></i>) |
|
736 |
|
737 <p> |
|
738 Public slot to check the availability of the paste operation. |
|
739 </p> |
|
740 <dl> |
|
741 <dt>Return:</dt> |
|
742 <dd> |
|
743 flag indicating availability of paste (boolean) |
|
744 </dd> |
|
745 </dl> |
|
746 <a NAME="IconEditorGrid.canRedo" ID="IconEditorGrid.canRedo"></a> |
|
747 <h4>IconEditorGrid.canRedo</h4> |
|
748 <b>canRedo</b>(<i></i>) |
|
749 |
|
750 <p> |
|
751 Public method to return the redo status. |
|
752 </p> |
|
753 <dl> |
|
754 <dt>Return:</dt> |
|
755 <dd> |
|
756 flag indicating the availability of redo (boolean) |
|
757 </dd> |
|
758 </dl> |
|
759 <a NAME="IconEditorGrid.canUndo" ID="IconEditorGrid.canUndo"></a> |
|
760 <h4>IconEditorGrid.canUndo</h4> |
|
761 <b>canUndo</b>(<i></i>) |
|
762 |
|
763 <p> |
|
764 Public method to return the undo status. |
|
765 </p> |
|
766 <dl> |
|
767 <dt>Return:</dt> |
|
768 <dd> |
|
769 flag indicating the availability of undo (boolean) |
|
770 </dd> |
|
771 </dl> |
|
772 <a NAME="IconEditorGrid.compositingMode" ID="IconEditorGrid.compositingMode"></a> |
|
773 <h4>IconEditorGrid.compositingMode</h4> |
|
774 <b>compositingMode</b>(<i></i>) |
|
775 |
|
776 <p> |
|
777 Public method to get the compositing mode. |
|
778 </p> |
|
779 <dl> |
|
780 <dt>Return:</dt> |
|
781 <dd> |
|
782 compositing mode (QPainter.CompositionMode) |
|
783 </dd> |
|
784 </dl> |
|
785 <a NAME="IconEditorGrid.editClear" ID="IconEditorGrid.editClear"></a> |
|
786 <h4>IconEditorGrid.editClear</h4> |
|
787 <b>editClear</b>(<i></i>) |
|
788 |
|
789 <p> |
|
790 Public slot to clear the image. |
|
791 </p> |
|
792 <a NAME="IconEditorGrid.editCopy" ID="IconEditorGrid.editCopy"></a> |
|
793 <h4>IconEditorGrid.editCopy</h4> |
|
794 <b>editCopy</b>(<i></i>) |
|
795 |
|
796 <p> |
|
797 Public slot to copy the selection. |
|
798 </p> |
|
799 <a NAME="IconEditorGrid.editCut" ID="IconEditorGrid.editCut"></a> |
|
800 <h4>IconEditorGrid.editCut</h4> |
|
801 <b>editCut</b>(<i></i>) |
|
802 |
|
803 <p> |
|
804 Public slot to cut the selection. |
|
805 </p> |
|
806 <a NAME="IconEditorGrid.editNew" ID="IconEditorGrid.editNew"></a> |
|
807 <h4>IconEditorGrid.editNew</h4> |
|
808 <b>editNew</b>(<i></i>) |
|
809 |
|
810 <p> |
|
811 Public slot to generate a new, empty image. |
|
812 </p> |
|
813 <a NAME="IconEditorGrid.editPaste" ID="IconEditorGrid.editPaste"></a> |
|
814 <h4>IconEditorGrid.editPaste</h4> |
|
815 <b>editPaste</b>(<i>pasting=False</i>) |
|
816 |
|
817 <p> |
|
818 Public slot to paste an image from the clipboard. |
|
819 </p> |
|
820 <dl> |
|
821 |
|
822 <dt><i>pasting</i></dt> |
|
823 <dd> |
|
824 flag indicating part two of the paste operation |
|
825 (boolean) |
|
826 </dd> |
|
827 </dl> |
|
828 <a NAME="IconEditorGrid.editPasteAsNew" ID="IconEditorGrid.editPasteAsNew"></a> |
|
829 <h4>IconEditorGrid.editPasteAsNew</h4> |
|
830 <b>editPasteAsNew</b>(<i></i>) |
|
831 |
|
832 <p> |
|
833 Public slot to paste the clipboard as a new image. |
|
834 </p> |
|
835 <a NAME="IconEditorGrid.editRedo" ID="IconEditorGrid.editRedo"></a> |
|
836 <h4>IconEditorGrid.editRedo</h4> |
|
837 <b>editRedo</b>(<i></i>) |
|
838 |
|
839 <p> |
|
840 Public slot to perform a redo operation. |
|
841 </p> |
|
842 <a NAME="IconEditorGrid.editResize" ID="IconEditorGrid.editResize"></a> |
|
843 <h4>IconEditorGrid.editResize</h4> |
|
844 <b>editResize</b>(<i></i>) |
|
845 |
|
846 <p> |
|
847 Public slot to resize the image. |
|
848 </p> |
|
849 <a NAME="IconEditorGrid.editSelectAll" ID="IconEditorGrid.editSelectAll"></a> |
|
850 <h4>IconEditorGrid.editSelectAll</h4> |
|
851 <b>editSelectAll</b>(<i></i>) |
|
852 |
|
853 <p> |
|
854 Public slot to select the complete image. |
|
855 </p> |
|
856 <a NAME="IconEditorGrid.editUndo" ID="IconEditorGrid.editUndo"></a> |
|
857 <h4>IconEditorGrid.editUndo</h4> |
|
858 <b>editUndo</b>(<i></i>) |
|
859 |
|
860 <p> |
|
861 Public slot to perform an undo operation. |
|
862 </p> |
|
863 <a NAME="IconEditorGrid.grayScale" ID="IconEditorGrid.grayScale"></a> |
|
864 <h4>IconEditorGrid.grayScale</h4> |
|
865 <b>grayScale</b>(<i></i>) |
|
866 |
|
867 <p> |
|
868 Public slot to convert the image to gray preserving transparency. |
|
869 </p> |
|
870 <a NAME="IconEditorGrid.iconImage" ID="IconEditorGrid.iconImage"></a> |
|
871 <h4>IconEditorGrid.iconImage</h4> |
|
872 <b>iconImage</b>(<i></i>) |
|
873 |
|
874 <p> |
|
875 Public method to get a copy of the icon image. |
|
876 </p> |
|
877 <dl> |
|
878 <dt>Return:</dt> |
|
879 <dd> |
|
880 copy of the icon image (QImage) |
|
881 </dd> |
|
882 </dl> |
|
883 <a NAME="IconEditorGrid.iconSize" ID="IconEditorGrid.iconSize"></a> |
|
884 <h4>IconEditorGrid.iconSize</h4> |
|
885 <b>iconSize</b>(<i></i>) |
|
886 |
|
887 <p> |
|
888 Public method to get the size of the icon. |
|
889 </p> |
|
890 <dl> |
|
891 <dt>Return:</dt> |
|
892 <dd> |
|
893 width and height of the image as a tuple (integer, integer) |
|
894 </dd> |
|
895 </dl> |
|
896 <a NAME="IconEditorGrid.isDirty" ID="IconEditorGrid.isDirty"></a> |
|
897 <h4>IconEditorGrid.isDirty</h4> |
|
898 <b>isDirty</b>(<i></i>) |
|
899 |
|
900 <p> |
|
901 Public method to check the dirty status. |
|
902 </p> |
|
903 <dl> |
|
904 <dt>Return:</dt> |
|
905 <dd> |
|
906 flag indicating a modified status (boolean) |
|
907 </dd> |
|
908 </dl> |
|
909 <a NAME="IconEditorGrid.isGridEnabled" ID="IconEditorGrid.isGridEnabled"></a> |
|
910 <h4>IconEditorGrid.isGridEnabled</h4> |
|
911 <b>isGridEnabled</b>(<i></i>) |
|
912 |
|
913 <p> |
|
914 Public method to get the grid lines status. |
|
915 </p> |
|
916 <dl> |
|
917 <dt>Return:</dt> |
|
918 <dd> |
|
919 enabled status of the grid lines (boolean) |
|
920 </dd> |
|
921 </dl> |
|
922 <a NAME="IconEditorGrid.isSelectionAvailable" ID="IconEditorGrid.isSelectionAvailable"></a> |
|
923 <h4>IconEditorGrid.isSelectionAvailable</h4> |
|
924 <b>isSelectionAvailable</b>(<i></i>) |
|
925 |
|
926 <p> |
|
927 Public method to check the availability of a selection. |
|
928 </p> |
|
929 <dl> |
|
930 <dt>Return:</dt> |
|
931 <dd> |
|
932 flag indicating the availability of a selection (boolean) |
|
933 </dd> |
|
934 </dl> |
|
935 <a NAME="IconEditorGrid.mouseMoveEvent" ID="IconEditorGrid.mouseMoveEvent"></a> |
|
936 <h4>IconEditorGrid.mouseMoveEvent</h4> |
|
937 <b>mouseMoveEvent</b>(<i>evt</i>) |
|
938 |
|
939 <p> |
|
940 Protected method to handle mouse move events. |
|
941 </p> |
|
942 <dl> |
|
943 |
|
944 <dt><i>evt</i></dt> |
|
945 <dd> |
|
946 reference to the mouse event object (QMouseEvent) |
|
947 </dd> |
|
948 </dl> |
|
949 <a NAME="IconEditorGrid.mousePressEvent" ID="IconEditorGrid.mousePressEvent"></a> |
|
950 <h4>IconEditorGrid.mousePressEvent</h4> |
|
951 <b>mousePressEvent</b>(<i>evt</i>) |
|
952 |
|
953 <p> |
|
954 Protected method to handle mouse button press events. |
|
955 </p> |
|
956 <dl> |
|
957 |
|
958 <dt><i>evt</i></dt> |
|
959 <dd> |
|
960 reference to the mouse event object (QMouseEvent) |
|
961 </dd> |
|
962 </dl> |
|
963 <a NAME="IconEditorGrid.mouseReleaseEvent" ID="IconEditorGrid.mouseReleaseEvent"></a> |
|
964 <h4>IconEditorGrid.mouseReleaseEvent</h4> |
|
965 <b>mouseReleaseEvent</b>(<i>evt</i>) |
|
966 |
|
967 <p> |
|
968 Protected method to handle mouse button release events. |
|
969 </p> |
|
970 <dl> |
|
971 |
|
972 <dt><i>evt</i></dt> |
|
973 <dd> |
|
974 reference to the mouse event object (QMouseEvent) |
|
975 </dd> |
|
976 </dl> |
|
977 <a NAME="IconEditorGrid.paintEvent" ID="IconEditorGrid.paintEvent"></a> |
|
978 <h4>IconEditorGrid.paintEvent</h4> |
|
979 <b>paintEvent</b>(<i>evt</i>) |
|
980 |
|
981 <p> |
|
982 Protected method called to repaint some of the widget. |
|
983 </p> |
|
984 <dl> |
|
985 |
|
986 <dt><i>evt</i></dt> |
|
987 <dd> |
|
988 reference to the paint event object (QPaintEvent) |
|
989 </dd> |
|
990 </dl> |
|
991 <a NAME="IconEditorGrid.penColor" ID="IconEditorGrid.penColor"></a> |
|
992 <h4>IconEditorGrid.penColor</h4> |
|
993 <b>penColor</b>(<i></i>) |
|
994 |
|
995 <p> |
|
996 Public method to get the current drawing color. |
|
997 </p> |
|
998 <dl> |
|
999 <dt>Return:</dt> |
|
1000 <dd> |
|
1001 current drawing color (QColor) |
|
1002 </dd> |
|
1003 </dl> |
|
1004 <a NAME="IconEditorGrid.previewPixmap" ID="IconEditorGrid.previewPixmap"></a> |
|
1005 <h4>IconEditorGrid.previewPixmap</h4> |
|
1006 <b>previewPixmap</b>(<i></i>) |
|
1007 |
|
1008 <p> |
|
1009 Public method to generate a preview pixmap. |
|
1010 </p> |
|
1011 <dl> |
|
1012 <dt>Return:</dt> |
|
1013 <dd> |
|
1014 preview pixmap (QPixmap) |
|
1015 </dd> |
|
1016 </dl> |
|
1017 <a NAME="IconEditorGrid.setCompositingMode" ID="IconEditorGrid.setCompositingMode"></a> |
|
1018 <h4>IconEditorGrid.setCompositingMode</h4> |
|
1019 <b>setCompositingMode</b>(<i>mode</i>) |
|
1020 |
|
1021 <p> |
|
1022 Public method to set the compositing mode. |
|
1023 </p> |
|
1024 <dl> |
|
1025 |
|
1026 <dt><i>mode</i></dt> |
|
1027 <dd> |
|
1028 compositing mode to set (QPainter.CompositionMode) |
|
1029 </dd> |
|
1030 </dl> |
|
1031 <a NAME="IconEditorGrid.setDirty" ID="IconEditorGrid.setDirty"></a> |
|
1032 <h4>IconEditorGrid.setDirty</h4> |
|
1033 <b>setDirty</b>(<i>dirty, setCleanState=False</i>) |
|
1034 |
|
1035 <p> |
|
1036 Public slot to set the dirty flag. |
|
1037 </p> |
|
1038 <dl> |
|
1039 |
|
1040 <dt><i>dirty</i></dt> |
|
1041 <dd> |
|
1042 flag indicating the new modification status (boolean) |
|
1043 </dd> |
|
1044 <dt><i>setCleanState</i></dt> |
|
1045 <dd> |
|
1046 flag indicating to set the undo stack to clean |
|
1047 (boolean) |
|
1048 </dd> |
|
1049 </dl> |
|
1050 <a NAME="IconEditorGrid.setGridEnabled" ID="IconEditorGrid.setGridEnabled"></a> |
|
1051 <h4>IconEditorGrid.setGridEnabled</h4> |
|
1052 <b>setGridEnabled</b>(<i>enable</i>) |
|
1053 |
|
1054 <p> |
|
1055 Public method to enable the display of grid lines. |
|
1056 </p> |
|
1057 <dl> |
|
1058 |
|
1059 <dt><i>enable</i></dt> |
|
1060 <dd> |
|
1061 enabled status of the grid lines (boolean) |
|
1062 </dd> |
|
1063 </dl> |
|
1064 <a NAME="IconEditorGrid.setIconImage" ID="IconEditorGrid.setIconImage"></a> |
|
1065 <h4>IconEditorGrid.setIconImage</h4> |
|
1066 <b>setIconImage</b>(<i>newImage, undoRedo=False, clearUndo=False</i>) |
|
1067 |
|
1068 <p> |
|
1069 Public method to set a new icon image. |
|
1070 </p> |
|
1071 <dl> |
|
1072 |
|
1073 <dt><i>newImage</i></dt> |
|
1074 <dd> |
|
1075 reference to the new image (QImage) |
|
1076 </dd> |
|
1077 <dt><i>undoRedo</i></dt> |
|
1078 <dd> |
|
1079 flag indicating an undo or redo operation (boolean) |
|
1080 </dd> |
|
1081 <dt><i>clearUndo</i></dt> |
|
1082 <dd> |
|
1083 flag indicating to clear the undo stack (boolean) |
|
1084 </dd> |
|
1085 </dl> |
|
1086 <a NAME="IconEditorGrid.setPenColor" ID="IconEditorGrid.setPenColor"></a> |
|
1087 <h4>IconEditorGrid.setPenColor</h4> |
|
1088 <b>setPenColor</b>(<i>newColor</i>) |
|
1089 |
|
1090 <p> |
|
1091 Public method to set the drawing color. |
|
1092 </p> |
|
1093 <dl> |
|
1094 |
|
1095 <dt><i>newColor</i></dt> |
|
1096 <dd> |
|
1097 reference to the new color (QColor) |
|
1098 </dd> |
|
1099 </dl> |
|
1100 <a NAME="IconEditorGrid.setTool" ID="IconEditorGrid.setTool"></a> |
|
1101 <h4>IconEditorGrid.setTool</h4> |
|
1102 <b>setTool</b>(<i>tool</i>) |
|
1103 |
|
1104 <p> |
|
1105 Public method to set the current drawing tool. |
|
1106 </p> |
|
1107 <dl> |
|
1108 |
|
1109 <dt><i>tool</i> (IconEditorTool)</dt> |
|
1110 <dd> |
|
1111 drawing tool to be used |
|
1112 </dd> |
|
1113 </dl> |
|
1114 <a NAME="IconEditorGrid.setZoomFactor" ID="IconEditorGrid.setZoomFactor"></a> |
|
1115 <h4>IconEditorGrid.setZoomFactor</h4> |
|
1116 <b>setZoomFactor</b>(<i>newZoom</i>) |
|
1117 |
|
1118 <p> |
|
1119 Public method to set the zoom factor in percent. |
|
1120 </p> |
|
1121 <dl> |
|
1122 |
|
1123 <dt><i>newZoom</i></dt> |
|
1124 <dd> |
|
1125 zoom factor (integer >= 100) |
|
1126 </dd> |
|
1127 </dl> |
|
1128 <a NAME="IconEditorGrid.shutdown" ID="IconEditorGrid.shutdown"></a> |
|
1129 <h4>IconEditorGrid.shutdown</h4> |
|
1130 <b>shutdown</b>(<i></i>) |
|
1131 |
|
1132 <p> |
|
1133 Public slot to perform some shutdown actions. |
|
1134 </p> |
|
1135 <a NAME="IconEditorGrid.sizeHint" ID="IconEditorGrid.sizeHint"></a> |
|
1136 <h4>IconEditorGrid.sizeHint</h4> |
|
1137 <b>sizeHint</b>(<i></i>) |
|
1138 |
|
1139 <p> |
|
1140 Public method to report the size hint. |
|
1141 </p> |
|
1142 <dl> |
|
1143 <dt>Return:</dt> |
|
1144 <dd> |
|
1145 size hint (QSize) |
|
1146 </dd> |
|
1147 </dl> |
|
1148 <a NAME="IconEditorGrid.tool" ID="IconEditorGrid.tool"></a> |
|
1149 <h4>IconEditorGrid.tool</h4> |
|
1150 <b>tool</b>(<i></i>) |
|
1151 |
|
1152 <p> |
|
1153 Public method to get the current drawing tool. |
|
1154 </p> |
|
1155 <dl> |
|
1156 <dt>Return:</dt> |
|
1157 <dd> |
|
1158 current drawing tool |
|
1159 </dd> |
|
1160 </dl> |
|
1161 <dl> |
|
1162 <dt>Return Type:</dt> |
|
1163 <dd> |
|
1164 IconEditorTool |
|
1165 </dd> |
|
1166 </dl> |
|
1167 <a NAME="IconEditorGrid.zoomFactor" ID="IconEditorGrid.zoomFactor"></a> |
|
1168 <h4>IconEditorGrid.zoomFactor</h4> |
|
1169 <b>zoomFactor</b>(<i></i>) |
|
1170 |
|
1171 <p> |
|
1172 Public method to get the current zoom factor in percent. |
|
1173 </p> |
|
1174 <dl> |
|
1175 <dt>Return:</dt> |
|
1176 <dd> |
|
1177 zoom factor (integer) |
|
1178 </dd> |
|
1179 </dl> |
|
1180 <div align="right"><a href="#top">Up</a></div> |
|
1181 <hr /> |
|
1182 <hr /> |
|
1183 <a NAME="IconEditorTool" ID="IconEditorTool"></a> |
|
1184 <h2>IconEditorTool</h2> |
|
1185 |
|
1186 <p> |
|
1187 Class defining the edit tools. |
|
1188 </p> |
|
1189 <h3>Derived from</h3> |
|
1190 enum.IntEnum |
|
1191 <h3>Class Attributes</h3> |
|
1192 |
|
1193 <table> |
|
1194 <tr><td>CIRCLE</td></tr><tr><td>COLOR_PICKER</td></tr><tr><td>ELLIPSE</td></tr><tr><td>FILL</td></tr><tr><td>FILLED_CIRCLE</td></tr><tr><td>FILLED_ELLIPSE</td></tr><tr><td>FILLED_RECTANGLE</td></tr><tr><td>LINE</td></tr><tr><td>PENCIL</td></tr><tr><td>RECTANGLE</td></tr><tr><td>RUBBER</td></tr><tr><td>SELECT_CIRCLE</td></tr><tr><td>SELECT_RECTANGLE</td></tr> |
|
1195 </table> |
|
1196 <h3>Class Methods</h3> |
|
1197 |
|
1198 <table> |
|
1199 <tr><td>None</td></tr> |
|
1200 </table> |
|
1201 <h3>Methods</h3> |
|
1202 |
|
1203 <table> |
|
1204 <tr><td>None</td></tr> |
|
1205 </table> |
|
1206 <h3>Static Methods</h3> |
|
1207 |
|
1208 <table> |
|
1209 <tr><td>None</td></tr> |
|
1210 </table> |
|
1211 |
|
1212 <div align="right"><a href="#top">Up</a></div> |
|
1213 <hr /> |
|
1214 </body></html> |