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