156 </table> |
156 </table> |
157 <h3>Methods</h3> |
157 <h3>Methods</h3> |
158 <table> |
158 <table> |
159 <tr> |
159 <tr> |
160 <td><a href="#IconEditorGrid.__init__">IconEditorGrid</a></td> |
160 <td><a href="#IconEditorGrid.__init__">IconEditorGrid</a></td> |
161 <td>Constructor</td> |
161 <td>Constructor</td> |
162 </tr><tr> |
162 </tr><tr> |
163 <td><a href="#IconEditorGrid.__checkClipboard">__checkClipboard</a></td> |
163 <td><a href="#IconEditorGrid.__checkClipboard">__checkClipboard</a></td> |
164 <td>Private slot to check, if the clipboard contains a valid image, and signal the result.</td> |
164 <td>Private slot to check, if the clipboard contains a valid image, and signal the result.</td> |
165 </tr><tr> |
165 </tr><tr> |
166 <td><a href="#IconEditorGrid.__cleanChanged">__cleanChanged</a></td> |
166 <td><a href="#IconEditorGrid.__cleanChanged">__cleanChanged</a></td> |
167 <td>Private slot to handle the undo stack clean state change.</td> |
167 <td>Private slot to handle the undo stack clean state change.</td> |
168 </tr><tr> |
168 </tr><tr> |
169 <td><a href="#IconEditorGrid.__clipboardImage">__clipboardImage</a></td> |
169 <td><a href="#IconEditorGrid.__clipboardImage">__clipboardImage</a></td> |
170 <td>Private method to get an image from the clipboard.</td> |
170 <td>Private method to get an image from the clipboard.</td> |
171 </tr><tr> |
171 </tr><tr> |
172 <td><a href="#IconEditorGrid.__drawFlood">__drawFlood</a></td> |
172 <td><a href="#IconEditorGrid.__drawFlood">__drawFlood</a></td> |
173 <td>Private method to perform a flood fill operation.</td> |
173 <td>Private method to perform a flood fill operation.</td> |
174 </tr><tr> |
174 </tr><tr> |
175 <td><a href="#IconEditorGrid.__drawPasteRect">__drawPasteRect</a></td> |
175 <td><a href="#IconEditorGrid.__drawPasteRect">__drawPasteRect</a></td> |
176 <td>Private slot to draw a rectangle for signaling a paste operation.</td> |
176 <td>Private slot to draw a rectangle for signaling a paste operation.</td> |
177 </tr><tr> |
177 </tr><tr> |
178 <td><a href="#IconEditorGrid.__drawTool">__drawTool</a></td> |
178 <td><a href="#IconEditorGrid.__drawTool">__drawTool</a></td> |
179 <td>Public method to perform a draw operation depending of the current tool.</td> |
179 <td>Public method to perform a draw operation depending of the current tool.</td> |
180 </tr><tr> |
180 </tr><tr> |
181 <td><a href="#IconEditorGrid.__getSelectionImage">__getSelectionImage</a></td> |
181 <td><a href="#IconEditorGrid.__getSelectionImage">__getSelectionImage</a></td> |
182 <td>Private method to get an image from the selection.</td> |
182 <td>Private method to get an image from the selection.</td> |
183 </tr><tr> |
183 </tr><tr> |
184 <td><a href="#IconEditorGrid.__imageCoordinates">__imageCoordinates</a></td> |
184 <td><a href="#IconEditorGrid.__imageCoordinates">__imageCoordinates</a></td> |
185 <td>Private method to convert from widget to image coordinates.</td> |
185 <td>Private method to convert from widget to image coordinates.</td> |
186 </tr><tr> |
186 </tr><tr> |
187 <td><a href="#IconEditorGrid.__initCursors">__initCursors</a></td> |
187 <td><a href="#IconEditorGrid.__initCursors">__initCursors</a></td> |
188 <td>Private method to initialize the various cursors.</td> |
188 <td>Private method to initialize the various cursors.</td> |
189 </tr><tr> |
189 </tr><tr> |
190 <td><a href="#IconEditorGrid.__initUndoTexts">__initUndoTexts</a></td> |
190 <td><a href="#IconEditorGrid.__initUndoTexts">__initUndoTexts</a></td> |
191 <td>Private method to initialize texts to be associated with undo commands for the various drawing tools.</td> |
191 <td>Private method to initialize texts to be associated with undo commands for the various drawing tools.</td> |
192 </tr><tr> |
192 </tr><tr> |
193 <td><a href="#IconEditorGrid.__isMarked">__isMarked</a></td> |
193 <td><a href="#IconEditorGrid.__isMarked">__isMarked</a></td> |
194 <td>Private method to check, if a pixel is marked.</td> |
194 <td>Private method to check, if a pixel is marked.</td> |
195 </tr><tr> |
195 </tr><tr> |
196 <td><a href="#IconEditorGrid.__pixelRect">__pixelRect</a></td> |
196 <td><a href="#IconEditorGrid.__pixelRect">__pixelRect</a></td> |
197 <td>Private method to determine the rectangle for a given pixel coordinate.</td> |
197 <td>Private method to determine the rectangle for a given pixel coordinate.</td> |
198 </tr><tr> |
198 </tr><tr> |
199 <td><a href="#IconEditorGrid.__setImagePixel">__setImagePixel</a></td> |
199 <td><a href="#IconEditorGrid.__setImagePixel">__setImagePixel</a></td> |
200 <td>Private slot to set or erase a pixel.</td> |
200 <td>Private slot to set or erase a pixel.</td> |
201 </tr><tr> |
201 </tr><tr> |
202 <td><a href="#IconEditorGrid.__unMark">__unMark</a></td> |
202 <td><a href="#IconEditorGrid.__unMark">__unMark</a></td> |
203 <td>Private slot to remove the mark indicator.</td> |
203 <td>Private slot to remove the mark indicator.</td> |
204 </tr><tr> |
204 </tr><tr> |
205 <td><a href="#IconEditorGrid.__updateImageRect">__updateImageRect</a></td> |
205 <td><a href="#IconEditorGrid.__updateImageRect">__updateImageRect</a></td> |
206 <td>Private slot to update parts of the widget.</td> |
206 <td>Private slot to update parts of the widget.</td> |
207 </tr><tr> |
207 </tr><tr> |
208 <td><a href="#IconEditorGrid.__updatePreviewPixmap">__updatePreviewPixmap</a></td> |
208 <td><a href="#IconEditorGrid.__updatePreviewPixmap">__updatePreviewPixmap</a></td> |
209 <td>Private slot to generate and signal an updated preview pixmap.</td> |
209 <td>Private slot to generate and signal an updated preview pixmap.</td> |
210 </tr><tr> |
210 </tr><tr> |
211 <td><a href="#IconEditorGrid.__updateRect">__updateRect</a></td> |
211 <td><a href="#IconEditorGrid.__updateRect">__updateRect</a></td> |
212 <td>Private slot to update parts of the widget.</td> |
212 <td>Private slot to update parts of the widget.</td> |
213 </tr><tr> |
213 </tr><tr> |
214 <td><a href="#IconEditorGrid.canPaste">canPaste</a></td> |
214 <td><a href="#IconEditorGrid.canPaste">canPaste</a></td> |
215 <td>Public slot to check the availability of the paste operation.</td> |
215 <td>Public slot to check the availability of the paste operation.</td> |
216 </tr><tr> |
216 </tr><tr> |
217 <td><a href="#IconEditorGrid.canRedo">canRedo</a></td> |
217 <td><a href="#IconEditorGrid.canRedo">canRedo</a></td> |
218 <td>Public method to return the redo status.</td> |
218 <td>Public method to return the redo status.</td> |
219 </tr><tr> |
219 </tr><tr> |
220 <td><a href="#IconEditorGrid.canUndo">canUndo</a></td> |
220 <td><a href="#IconEditorGrid.canUndo">canUndo</a></td> |
221 <td>Public method to return the undo status.</td> |
221 <td>Public method to return the undo status.</td> |
222 </tr><tr> |
222 </tr><tr> |
223 <td><a href="#IconEditorGrid.editClear">editClear</a></td> |
223 <td><a href="#IconEditorGrid.editClear">editClear</a></td> |
224 <td>Public slot to clear the image.</td> |
224 <td>Public slot to clear the image.</td> |
225 </tr><tr> |
225 </tr><tr> |
226 <td><a href="#IconEditorGrid.editCopy">editCopy</a></td> |
226 <td><a href="#IconEditorGrid.editCopy">editCopy</a></td> |
227 <td>Public slot to copy the selection.</td> |
227 <td>Public slot to copy the selection.</td> |
228 </tr><tr> |
228 </tr><tr> |
229 <td><a href="#IconEditorGrid.editCut">editCut</a></td> |
229 <td><a href="#IconEditorGrid.editCut">editCut</a></td> |
230 <td>Public slot to cut the selection.</td> |
230 <td>Public slot to cut the selection.</td> |
231 </tr><tr> |
231 </tr><tr> |
232 <td><a href="#IconEditorGrid.editNew">editNew</a></td> |
232 <td><a href="#IconEditorGrid.editNew">editNew</a></td> |
233 <td>Public slot to generate a new, empty image.</td> |
233 <td>Public slot to generate a new, empty image.</td> |
234 </tr><tr> |
234 </tr><tr> |
235 <td><a href="#IconEditorGrid.editPaste">editPaste</a></td> |
235 <td><a href="#IconEditorGrid.editPaste">editPaste</a></td> |
236 <td>Public slot to paste an image from the clipboard.</td> |
236 <td>Public slot to paste an image from the clipboard.</td> |
237 </tr><tr> |
237 </tr><tr> |
238 <td><a href="#IconEditorGrid.editPasteAsNew">editPasteAsNew</a></td> |
238 <td><a href="#IconEditorGrid.editPasteAsNew">editPasteAsNew</a></td> |
239 <td>Public slot to paste the clipboard as a new image.</td> |
239 <td>Public slot to paste the clipboard as a new image.</td> |
240 </tr><tr> |
240 </tr><tr> |
241 <td><a href="#IconEditorGrid.editRedo">editRedo</a></td> |
241 <td><a href="#IconEditorGrid.editRedo">editRedo</a></td> |
242 <td>Public slot to perform a redo operation.</td> |
242 <td>Public slot to perform a redo operation.</td> |
243 </tr><tr> |
243 </tr><tr> |
244 <td><a href="#IconEditorGrid.editResize">editResize</a></td> |
244 <td><a href="#IconEditorGrid.editResize">editResize</a></td> |
245 <td>Public slot to resize the image.</td> |
245 <td>Public slot to resize the image.</td> |
246 </tr><tr> |
246 </tr><tr> |
247 <td><a href="#IconEditorGrid.editSelectAll">editSelectAll</a></td> |
247 <td><a href="#IconEditorGrid.editSelectAll">editSelectAll</a></td> |
248 <td>Public slot to select the complete image.</td> |
248 <td>Public slot to select the complete image.</td> |
249 </tr><tr> |
249 </tr><tr> |
250 <td><a href="#IconEditorGrid.editUndo">editUndo</a></td> |
250 <td><a href="#IconEditorGrid.editUndo">editUndo</a></td> |
251 <td>Public slot to perform an undo operation.</td> |
251 <td>Public slot to perform an undo operation.</td> |
252 </tr><tr> |
252 </tr><tr> |
253 <td><a href="#IconEditorGrid.grayScale">grayScale</a></td> |
253 <td><a href="#IconEditorGrid.grayScale">grayScale</a></td> |
254 <td>Public slot to convert the image to gray preserving transparency.</td> |
254 <td>Public slot to convert the image to gray preserving transparency.</td> |
255 </tr><tr> |
255 </tr><tr> |
256 <td><a href="#IconEditorGrid.iconImage">iconImage</a></td> |
256 <td><a href="#IconEditorGrid.iconImage">iconImage</a></td> |
257 <td>Public method to get a copy of the icon image.</td> |
257 <td>Public method to get a copy of the icon image.</td> |
258 </tr><tr> |
258 </tr><tr> |
259 <td><a href="#IconEditorGrid.iconSize">iconSize</a></td> |
259 <td><a href="#IconEditorGrid.iconSize">iconSize</a></td> |
260 <td>Public method to get the size of the icon.</td> |
260 <td>Public method to get the size of the icon.</td> |
261 </tr><tr> |
261 </tr><tr> |
262 <td><a href="#IconEditorGrid.isDirty">isDirty</a></td> |
262 <td><a href="#IconEditorGrid.isDirty">isDirty</a></td> |
263 <td>Public method to check the dirty status.</td> |
263 <td>Public method to check the dirty status.</td> |
264 </tr><tr> |
264 </tr><tr> |
265 <td><a href="#IconEditorGrid.isGridEnabled">isGridEnabled</a></td> |
265 <td><a href="#IconEditorGrid.isGridEnabled">isGridEnabled</a></td> |
266 <td>Public method to get the grid lines status.</td> |
266 <td>Public method to get the grid lines status.</td> |
267 </tr><tr> |
267 </tr><tr> |
268 <td><a href="#IconEditorGrid.isSelectionAvailable">isSelectionAvailable</a></td> |
268 <td><a href="#IconEditorGrid.isSelectionAvailable">isSelectionAvailable</a></td> |
269 <td>Public method to check the availability of a selection.</td> |
269 <td>Public method to check the availability of a selection.</td> |
270 </tr><tr> |
270 </tr><tr> |
271 <td><a href="#IconEditorGrid.mouseMoveEvent">mouseMoveEvent</a></td> |
271 <td><a href="#IconEditorGrid.mouseMoveEvent">mouseMoveEvent</a></td> |
272 <td>Protected method to handle mouse move events.</td> |
272 <td>Protected method to handle mouse move events.</td> |
273 </tr><tr> |
273 </tr><tr> |
274 <td><a href="#IconEditorGrid.mousePressEvent">mousePressEvent</a></td> |
274 <td><a href="#IconEditorGrid.mousePressEvent">mousePressEvent</a></td> |
275 <td>Protected method to handle mouse button press events.</td> |
275 <td>Protected method to handle mouse button press events.</td> |
276 </tr><tr> |
276 </tr><tr> |
277 <td><a href="#IconEditorGrid.mouseReleaseEvent">mouseReleaseEvent</a></td> |
277 <td><a href="#IconEditorGrid.mouseReleaseEvent">mouseReleaseEvent</a></td> |
278 <td>Protected method to handle mouse button release events.</td> |
278 <td>Protected method to handle mouse button release events.</td> |
279 </tr><tr> |
279 </tr><tr> |
280 <td><a href="#IconEditorGrid.paintEvent">paintEvent</a></td> |
280 <td><a href="#IconEditorGrid.paintEvent">paintEvent</a></td> |
281 <td>Protected method called to repaint some of the widget.</td> |
281 <td>Protected method called to repaint some of the widget.</td> |
282 </tr><tr> |
282 </tr><tr> |
283 <td><a href="#IconEditorGrid.penColor">penColor</a></td> |
283 <td><a href="#IconEditorGrid.penColor">penColor</a></td> |
284 <td>Public method to get the current drawing color.</td> |
284 <td>Public method to get the current drawing color.</td> |
285 </tr><tr> |
285 </tr><tr> |
286 <td><a href="#IconEditorGrid.previewPixmap">previewPixmap</a></td> |
286 <td><a href="#IconEditorGrid.previewPixmap">previewPixmap</a></td> |
287 <td>Public method to generate a preview pixmap.</td> |
287 <td>Public method to generate a preview pixmap.</td> |
288 </tr><tr> |
288 </tr><tr> |
289 <td><a href="#IconEditorGrid.setDirty">setDirty</a></td> |
289 <td><a href="#IconEditorGrid.setDirty">setDirty</a></td> |
290 <td>Public slot to set the dirty flag.</td> |
290 <td>Public slot to set the dirty flag.</td> |
291 </tr><tr> |
291 </tr><tr> |
292 <td><a href="#IconEditorGrid.setGridEnabled">setGridEnabled</a></td> |
292 <td><a href="#IconEditorGrid.setGridEnabled">setGridEnabled</a></td> |
293 <td>Public method to enable the display of grid lines.</td> |
293 <td>Public method to enable the display of grid lines.</td> |
294 </tr><tr> |
294 </tr><tr> |
295 <td><a href="#IconEditorGrid.setIconImage">setIconImage</a></td> |
295 <td><a href="#IconEditorGrid.setIconImage">setIconImage</a></td> |
296 <td>Public method to set a new icon image.</td> |
296 <td>Public method to set a new icon image.</td> |
297 </tr><tr> |
297 </tr><tr> |
298 <td><a href="#IconEditorGrid.setPenColor">setPenColor</a></td> |
298 <td><a href="#IconEditorGrid.setPenColor">setPenColor</a></td> |
299 <td>Public method to set the drawing color.</td> |
299 <td>Public method to set the drawing color.</td> |
300 </tr><tr> |
300 </tr><tr> |
301 <td><a href="#IconEditorGrid.setTool">setTool</a></td> |
301 <td><a href="#IconEditorGrid.setTool">setTool</a></td> |
302 <td>Public method to set the current drawing tool.</td> |
302 <td>Public method to set the current drawing tool.</td> |
303 </tr><tr> |
303 </tr><tr> |
304 <td><a href="#IconEditorGrid.setZoomFactor">setZoomFactor</a></td> |
304 <td><a href="#IconEditorGrid.setZoomFactor">setZoomFactor</a></td> |
305 <td>Public method to set the zoom factor.</td> |
305 <td>Public method to set the zoom factor.</td> |
306 </tr><tr> |
306 </tr><tr> |
307 <td><a href="#IconEditorGrid.shutdown">shutdown</a></td> |
307 <td><a href="#IconEditorGrid.shutdown">shutdown</a></td> |
308 <td>Public slot to perform some shutdown actions.</td> |
308 <td>Public slot to perform some shutdown actions.</td> |
309 </tr><tr> |
309 </tr><tr> |
310 <td><a href="#IconEditorGrid.sizeHint">sizeHint</a></td> |
310 <td><a href="#IconEditorGrid.sizeHint">sizeHint</a></td> |
311 <td>Public method to report the size hint.</td> |
311 <td>Public method to report the size hint.</td> |
312 </tr><tr> |
312 </tr><tr> |
313 <td><a href="#IconEditorGrid.tool">tool</a></td> |
313 <td><a href="#IconEditorGrid.tool">tool</a></td> |
314 <td>Public method to get the current drawing tool.</td> |
314 <td>Public method to get the current drawing tool.</td> |
315 </tr><tr> |
315 </tr><tr> |
316 <td><a href="#IconEditorGrid.zoomFactor">zoomFactor</a></td> |
316 <td><a href="#IconEditorGrid.zoomFactor">zoomFactor</a></td> |
317 <td>Public method to get the current zoom factor.</td> |
317 <td>Public method to get the current zoom factor.</td> |
318 </tr> |
318 </tr> |
319 </table> |
319 </table> |
320 <a NAME="IconEditorGrid.__init__" ID="IconEditorGrid.__init__"></a> |
320 <a NAME="IconEditorGrid.__init__" ID="IconEditorGrid.__init__"></a> |
321 <h4>IconEditorGrid (Constructor)</h4> |
321 <h4>IconEditorGrid (Constructor)</h4> |
322 <b>IconEditorGrid</b>(<i>parent = None</i>) |
322 <b>IconEditorGrid</b>(<i>parent = None</i>) |
323 <p> |
323 <p> |
324 Constructor |
324 Constructor |
325 </p><dl> |
325 </p><dl> |
326 <dt><i>parent</i></dt> |
326 <dt><i>parent</i></dt> |
327 <dd> |
327 <dd> |
328 reference to the parent widget (QWidget) |
328 reference to the parent widget (QWidget) |
329 </dd> |
329 </dd> |
330 </dl><a NAME="IconEditorGrid.__checkClipboard" ID="IconEditorGrid.__checkClipboard"></a> |
330 </dl><a NAME="IconEditorGrid.__checkClipboard" ID="IconEditorGrid.__checkClipboard"></a> |
331 <h4>IconEditorGrid.__checkClipboard</h4> |
331 <h4>IconEditorGrid.__checkClipboard</h4> |
332 <b>__checkClipboard</b>(<i></i>) |
332 <b>__checkClipboard</b>(<i></i>) |
333 <p> |
333 <p> |
334 Private slot to check, if the clipboard contains a valid image, and signal |
334 Private slot to check, if the clipboard contains a valid image, and signal |
335 the result. |
335 the result. |
336 </p><a NAME="IconEditorGrid.__cleanChanged" ID="IconEditorGrid.__cleanChanged"></a> |
336 </p><a NAME="IconEditorGrid.__cleanChanged" ID="IconEditorGrid.__cleanChanged"></a> |
337 <h4>IconEditorGrid.__cleanChanged</h4> |
337 <h4>IconEditorGrid.__cleanChanged</h4> |
338 <b>__cleanChanged</b>(<i>clean</i>) |
338 <b>__cleanChanged</b>(<i>clean</i>) |
339 <p> |
339 <p> |
340 Private slot to handle the undo stack clean state change. |
340 Private slot to handle the undo stack clean state change. |
341 </p><dl> |
341 </p><dl> |
342 <dt><i>clean</i></dt> |
342 <dt><i>clean</i></dt> |
343 <dd> |
343 <dd> |
344 flag indicating the clean state (boolean) |
344 flag indicating the clean state (boolean) |
345 </dd> |
345 </dd> |
346 </dl><a NAME="IconEditorGrid.__clipboardImage" ID="IconEditorGrid.__clipboardImage"></a> |
346 </dl><a NAME="IconEditorGrid.__clipboardImage" ID="IconEditorGrid.__clipboardImage"></a> |
347 <h4>IconEditorGrid.__clipboardImage</h4> |
347 <h4>IconEditorGrid.__clipboardImage</h4> |
348 <b>__clipboardImage</b>(<i></i>) |
348 <b>__clipboardImage</b>(<i></i>) |
349 <p> |
349 <p> |
350 Private method to get an image from the clipboard. |
350 Private method to get an image from the clipboard. |
351 </p><dl> |
351 </p><dl> |
352 <dt>Returns:</dt> |
352 <dt>Returns:</dt> |
353 <dd> |
353 <dd> |
354 tuple with the image (QImage) and a flag indicating a |
354 tuple with the image (QImage) and a flag indicating a |
355 valid image (boolean) |
355 valid image (boolean) |
356 </dd> |
356 </dd> |
357 </dl><a NAME="IconEditorGrid.__drawFlood" ID="IconEditorGrid.__drawFlood"></a> |
357 </dl><a NAME="IconEditorGrid.__drawFlood" ID="IconEditorGrid.__drawFlood"></a> |
358 <h4>IconEditorGrid.__drawFlood</h4> |
358 <h4>IconEditorGrid.__drawFlood</h4> |
359 <b>__drawFlood</b>(<i>i, j, oldColor, doUpdate = True</i>) |
359 <b>__drawFlood</b>(<i>i, j, oldColor, doUpdate = True</i>) |
360 <p> |
360 <p> |
361 Private method to perform a flood fill operation. |
361 Private method to perform a flood fill operation. |
362 </p><dl> |
362 </p><dl> |
363 <dt><i>i</i></dt> |
363 <dt><i>i</i></dt> |
364 <dd> |
364 <dd> |
365 x-value in image coordinates (integer) |
365 x-value in image coordinates (integer) |
366 </dd><dt><i>j</i></dt> |
366 </dd><dt><i>j</i></dt> |
367 <dd> |
367 <dd> |
368 y-value in image coordinates (integer) |
368 y-value in image coordinates (integer) |
369 </dd><dt><i>oldColor</i></dt> |
369 </dd><dt><i>oldColor</i></dt> |
370 <dd> |
370 <dd> |
371 reference to the color at position i, j (QColor) |
371 reference to the color at position i, j (QColor) |
372 </dd><dt><i>doUpdate</i></dt> |
372 </dd><dt><i>doUpdate</i></dt> |
373 <dd> |
373 <dd> |
374 flag indicating an update is requested (boolean) |
374 flag indicating an update is requested (boolean) |
375 (used for speed optimizations) |
375 (used for speed optimizations) |
376 </dd> |
376 </dd> |
377 </dl><a NAME="IconEditorGrid.__drawPasteRect" ID="IconEditorGrid.__drawPasteRect"></a> |
377 </dl><a NAME="IconEditorGrid.__drawPasteRect" ID="IconEditorGrid.__drawPasteRect"></a> |
378 <h4>IconEditorGrid.__drawPasteRect</h4> |
378 <h4>IconEditorGrid.__drawPasteRect</h4> |
379 <b>__drawPasteRect</b>(<i>pos</i>) |
379 <b>__drawPasteRect</b>(<i>pos</i>) |
380 <p> |
380 <p> |
381 Private slot to draw a rectangle for signaling a paste operation. |
381 Private slot to draw a rectangle for signaling a paste operation. |
382 </p><dl> |
382 </p><dl> |
383 <dt><i>pos</i></dt> |
383 <dt><i>pos</i></dt> |
384 <dd> |
384 <dd> |
385 widget position of the paste rectangle (QPoint) |
385 widget position of the paste rectangle (QPoint) |
386 </dd> |
386 </dd> |
387 </dl><a NAME="IconEditorGrid.__drawTool" ID="IconEditorGrid.__drawTool"></a> |
387 </dl><a NAME="IconEditorGrid.__drawTool" ID="IconEditorGrid.__drawTool"></a> |
388 <h4>IconEditorGrid.__drawTool</h4> |
388 <h4>IconEditorGrid.__drawTool</h4> |
389 <b>__drawTool</b>(<i>pos, mark</i>) |
389 <b>__drawTool</b>(<i>pos, mark</i>) |
390 <p> |
390 <p> |
391 Public method to perform a draw operation depending of the current tool. |
391 Public method to perform a draw operation depending of the current tool. |
392 </p><dl> |
392 </p><dl> |
393 <dt><i>pos</i></dt> |
393 <dt><i>pos</i></dt> |
394 <dd> |
394 <dd> |
395 widget coordinate to perform the draw operation at (QPoint) |
395 widget coordinate to perform the draw operation at (QPoint) |
396 </dd><dt><i>mark</i></dt> |
396 </dd><dt><i>mark</i></dt> |
397 <dd> |
397 <dd> |
398 flag indicating a mark operation (boolean) |
398 flag indicating a mark operation (boolean) |
399 </dd><dt><i>flag</i></dt> |
399 </dd><dt><i>flag</i></dt> |
400 <dd> |
400 <dd> |
401 indicating a successful draw (boolean) |
401 indicating a successful draw (boolean) |
402 </dd> |
402 </dd> |
403 </dl><a NAME="IconEditorGrid.__getSelectionImage" ID="IconEditorGrid.__getSelectionImage"></a> |
403 </dl><a NAME="IconEditorGrid.__getSelectionImage" ID="IconEditorGrid.__getSelectionImage"></a> |
404 <h4>IconEditorGrid.__getSelectionImage</h4> |
404 <h4>IconEditorGrid.__getSelectionImage</h4> |
405 <b>__getSelectionImage</b>(<i>cut</i>) |
405 <b>__getSelectionImage</b>(<i>cut</i>) |
406 <p> |
406 <p> |
407 Private method to get an image from the selection. |
407 Private method to get an image from the selection. |
408 </p><dl> |
408 </p><dl> |
409 <dt><i>cut</i></dt> |
409 <dt><i>cut</i></dt> |
410 <dd> |
410 <dd> |
411 flag indicating to cut the selection (boolean) |
411 flag indicating to cut the selection (boolean) |
412 </dd> |
412 </dd> |
413 </dl><dl> |
413 </dl><dl> |
414 <dt>Returns:</dt> |
414 <dt>Returns:</dt> |
415 <dd> |
415 <dd> |
416 image of the selection (QImage) |
416 image of the selection (QImage) |
417 </dd> |
417 </dd> |
418 </dl><a NAME="IconEditorGrid.__imageCoordinates" ID="IconEditorGrid.__imageCoordinates"></a> |
418 </dl><a NAME="IconEditorGrid.__imageCoordinates" ID="IconEditorGrid.__imageCoordinates"></a> |
419 <h4>IconEditorGrid.__imageCoordinates</h4> |
419 <h4>IconEditorGrid.__imageCoordinates</h4> |
420 <b>__imageCoordinates</b>(<i>pos</i>) |
420 <b>__imageCoordinates</b>(<i>pos</i>) |
421 <p> |
421 <p> |
422 Private method to convert from widget to image coordinates. |
422 Private method to convert from widget to image coordinates. |
423 </p><dl> |
423 </p><dl> |
424 <dt><i>pos</i></dt> |
424 <dt><i>pos</i></dt> |
425 <dd> |
425 <dd> |
426 widget coordinate (QPoint) |
426 widget coordinate (QPoint) |
427 </dd> |
427 </dd> |
428 </dl><dl> |
428 </dl><dl> |
429 <dt>Returns:</dt> |
429 <dt>Returns:</dt> |
430 <dd> |
430 <dd> |
431 tuple with the image coordinates (tuple of two integers) |
431 tuple with the image coordinates (tuple of two integers) |
432 </dd> |
432 </dd> |
433 </dl><a NAME="IconEditorGrid.__initCursors" ID="IconEditorGrid.__initCursors"></a> |
433 </dl><a NAME="IconEditorGrid.__initCursors" ID="IconEditorGrid.__initCursors"></a> |
434 <h4>IconEditorGrid.__initCursors</h4> |
434 <h4>IconEditorGrid.__initCursors</h4> |
435 <b>__initCursors</b>(<i></i>) |
435 <b>__initCursors</b>(<i></i>) |
436 <p> |
436 <p> |
437 Private method to initialize the various cursors. |
437 Private method to initialize the various cursors. |
438 </p><a NAME="IconEditorGrid.__initUndoTexts" ID="IconEditorGrid.__initUndoTexts"></a> |
438 </p><a NAME="IconEditorGrid.__initUndoTexts" ID="IconEditorGrid.__initUndoTexts"></a> |
439 <h4>IconEditorGrid.__initUndoTexts</h4> |
439 <h4>IconEditorGrid.__initUndoTexts</h4> |
440 <b>__initUndoTexts</b>(<i></i>) |
440 <b>__initUndoTexts</b>(<i></i>) |
441 <p> |
441 <p> |
442 Private method to initialize texts to be associated with undo commands for |
442 Private method to initialize texts to be associated with undo commands for |
443 the various drawing tools. |
443 the various drawing tools. |
444 </p><a NAME="IconEditorGrid.__isMarked" ID="IconEditorGrid.__isMarked"></a> |
444 </p><a NAME="IconEditorGrid.__isMarked" ID="IconEditorGrid.__isMarked"></a> |
445 <h4>IconEditorGrid.__isMarked</h4> |
445 <h4>IconEditorGrid.__isMarked</h4> |
446 <b>__isMarked</b>(<i>i, j</i>) |
446 <b>__isMarked</b>(<i>i, j</i>) |
447 <p> |
447 <p> |
448 Private method to check, if a pixel is marked. |
448 Private method to check, if a pixel is marked. |
449 </p><dl> |
449 </p><dl> |
450 <dt><i>i</i></dt> |
450 <dt><i>i</i></dt> |
451 <dd> |
451 <dd> |
452 x-value in image coordinates (integer) |
452 x-value in image coordinates (integer) |
453 </dd><dt><i>j</i></dt> |
453 </dd><dt><i>j</i></dt> |
454 <dd> |
454 <dd> |
455 y-value in image coordinates (integer) |
455 y-value in image coordinates (integer) |
456 </dd> |
456 </dd> |
457 </dl><dl> |
457 </dl><dl> |
458 <dt>Returns:</dt> |
458 <dt>Returns:</dt> |
459 <dd> |
459 <dd> |
460 flag indicating a marked pixel (boolean) |
460 flag indicating a marked pixel (boolean) |
461 </dd> |
461 </dd> |
462 </dl><a NAME="IconEditorGrid.__pixelRect" ID="IconEditorGrid.__pixelRect"></a> |
462 </dl><a NAME="IconEditorGrid.__pixelRect" ID="IconEditorGrid.__pixelRect"></a> |
463 <h4>IconEditorGrid.__pixelRect</h4> |
463 <h4>IconEditorGrid.__pixelRect</h4> |
464 <b>__pixelRect</b>(<i>i, j</i>) |
464 <b>__pixelRect</b>(<i>i, j</i>) |
465 <p> |
465 <p> |
466 Private method to determine the rectangle for a given pixel coordinate. |
466 Private method to determine the rectangle for a given pixel coordinate. |
467 </p><dl> |
467 </p><dl> |
468 <dt><i>i</i></dt> |
468 <dt><i>i</i></dt> |
469 <dd> |
469 <dd> |
470 x-coordinate of the pixel in the image (integer) |
470 x-coordinate of the pixel in the image (integer) |
471 </dd><dt><i>j</i></dt> |
471 </dd><dt><i>j</i></dt> |
472 <dd> |
472 <dd> |
473 y-coordinate of the pixel in the image (integer) |
473 y-coordinate of the pixel in the image (integer) |
474 return rectangle for the given pixel coordinates (QRect) |
474 return rectangle for the given pixel coordinates (QRect) |
475 </dd> |
475 </dd> |
476 </dl><a NAME="IconEditorGrid.__setImagePixel" ID="IconEditorGrid.__setImagePixel"></a> |
476 </dl><a NAME="IconEditorGrid.__setImagePixel" ID="IconEditorGrid.__setImagePixel"></a> |
477 <h4>IconEditorGrid.__setImagePixel</h4> |
477 <h4>IconEditorGrid.__setImagePixel</h4> |
478 <b>__setImagePixel</b>(<i>pos, opaque</i>) |
478 <b>__setImagePixel</b>(<i>pos, opaque</i>) |
479 <p> |
479 <p> |
480 Private slot to set or erase a pixel. |
480 Private slot to set or erase a pixel. |
481 </p><dl> |
481 </p><dl> |
482 <dt><i>pos</i></dt> |
482 <dt><i>pos</i></dt> |
483 <dd> |
483 <dd> |
484 position of the pixel in the widget (QPoint) |
484 position of the pixel in the widget (QPoint) |
485 </dd><dt><i>opaque</i></dt> |
485 </dd><dt><i>opaque</i></dt> |
486 <dd> |
486 <dd> |
487 flag indicating a set operation (boolean) |
487 flag indicating a set operation (boolean) |
488 </dd> |
488 </dd> |
489 </dl><a NAME="IconEditorGrid.__unMark" ID="IconEditorGrid.__unMark"></a> |
489 </dl><a NAME="IconEditorGrid.__unMark" ID="IconEditorGrid.__unMark"></a> |
490 <h4>IconEditorGrid.__unMark</h4> |
490 <h4>IconEditorGrid.__unMark</h4> |
491 <b>__unMark</b>(<i></i>) |
491 <b>__unMark</b>(<i></i>) |
492 <p> |
492 <p> |
493 Private slot to remove the mark indicator. |
493 Private slot to remove the mark indicator. |
494 </p><a NAME="IconEditorGrid.__updateImageRect" ID="IconEditorGrid.__updateImageRect"></a> |
494 </p><a NAME="IconEditorGrid.__updateImageRect" ID="IconEditorGrid.__updateImageRect"></a> |
495 <h4>IconEditorGrid.__updateImageRect</h4> |
495 <h4>IconEditorGrid.__updateImageRect</h4> |
496 <b>__updateImageRect</b>(<i>ipos1, ipos2</i>) |
496 <b>__updateImageRect</b>(<i>ipos1, ipos2</i>) |
497 <p> |
497 <p> |
498 Private slot to update parts of the widget. |
498 Private slot to update parts of the widget. |
499 </p><dl> |
499 </p><dl> |
500 <dt><i>ipos1</i></dt> |
500 <dt><i>ipos1</i></dt> |
501 <dd> |
501 <dd> |
502 top, left position for the update in image coordinates (QPoint) |
502 top, left position for the update in image coordinates (QPoint) |
503 </dd><dt><i>ipos2</i></dt> |
503 </dd><dt><i>ipos2</i></dt> |
504 <dd> |
504 <dd> |
505 bottom, right position for the update in image coordinates (QPoint) |
505 bottom, right position for the update in image coordinates (QPoint) |
506 </dd> |
506 </dd> |
507 </dl><a NAME="IconEditorGrid.__updatePreviewPixmap" ID="IconEditorGrid.__updatePreviewPixmap"></a> |
507 </dl><a NAME="IconEditorGrid.__updatePreviewPixmap" ID="IconEditorGrid.__updatePreviewPixmap"></a> |
508 <h4>IconEditorGrid.__updatePreviewPixmap</h4> |
508 <h4>IconEditorGrid.__updatePreviewPixmap</h4> |
509 <b>__updatePreviewPixmap</b>(<i></i>) |
509 <b>__updatePreviewPixmap</b>(<i></i>) |
510 <p> |
510 <p> |
511 Private slot to generate and signal an updated preview pixmap. |
511 Private slot to generate and signal an updated preview pixmap. |
512 </p><a NAME="IconEditorGrid.__updateRect" ID="IconEditorGrid.__updateRect"></a> |
512 </p><a NAME="IconEditorGrid.__updateRect" ID="IconEditorGrid.__updateRect"></a> |
513 <h4>IconEditorGrid.__updateRect</h4> |
513 <h4>IconEditorGrid.__updateRect</h4> |
514 <b>__updateRect</b>(<i>pos1, pos2</i>) |
514 <b>__updateRect</b>(<i>pos1, pos2</i>) |
515 <p> |
515 <p> |
516 Private slot to update parts of the widget. |
516 Private slot to update parts of the widget. |
517 </p><dl> |
517 </p><dl> |
518 <dt><i>pos1</i></dt> |
518 <dt><i>pos1</i></dt> |
519 <dd> |
519 <dd> |
520 top, left position for the update in widget coordinates (QPoint) |
520 top, left position for the update in widget coordinates (QPoint) |
521 </dd><dt><i>pos2</i></dt> |
521 </dd><dt><i>pos2</i></dt> |
522 <dd> |
522 <dd> |
523 bottom, right position for the update in widget coordinates (QPoint) |
523 bottom, right position for the update in widget coordinates (QPoint) |
524 </dd> |
524 </dd> |
525 </dl><a NAME="IconEditorGrid.canPaste" ID="IconEditorGrid.canPaste"></a> |
525 </dl><a NAME="IconEditorGrid.canPaste" ID="IconEditorGrid.canPaste"></a> |
526 <h4>IconEditorGrid.canPaste</h4> |
526 <h4>IconEditorGrid.canPaste</h4> |
527 <b>canPaste</b>(<i></i>) |
527 <b>canPaste</b>(<i></i>) |
528 <p> |
528 <p> |
529 Public slot to check the availability of the paste operation. |
529 Public slot to check the availability of the paste operation. |
530 </p><dl> |
530 </p><dl> |
531 <dt>Returns:</dt> |
531 <dt>Returns:</dt> |
532 <dd> |
532 <dd> |
533 flag indicating availability of paste (boolean) |
533 flag indicating availability of paste (boolean) |
534 </dd> |
534 </dd> |
535 </dl><a NAME="IconEditorGrid.canRedo" ID="IconEditorGrid.canRedo"></a> |
535 </dl><a NAME="IconEditorGrid.canRedo" ID="IconEditorGrid.canRedo"></a> |
536 <h4>IconEditorGrid.canRedo</h4> |
536 <h4>IconEditorGrid.canRedo</h4> |
537 <b>canRedo</b>(<i></i>) |
537 <b>canRedo</b>(<i></i>) |
538 <p> |
538 <p> |
539 Public method to return the redo status. |
539 Public method to return the redo status. |
540 </p><dl> |
540 </p><dl> |
541 <dt>Returns:</dt> |
541 <dt>Returns:</dt> |
542 <dd> |
542 <dd> |
543 flag indicating the availability of redo (boolean) |
543 flag indicating the availability of redo (boolean) |
544 </dd> |
544 </dd> |
545 </dl><a NAME="IconEditorGrid.canUndo" ID="IconEditorGrid.canUndo"></a> |
545 </dl><a NAME="IconEditorGrid.canUndo" ID="IconEditorGrid.canUndo"></a> |
546 <h4>IconEditorGrid.canUndo</h4> |
546 <h4>IconEditorGrid.canUndo</h4> |
547 <b>canUndo</b>(<i></i>) |
547 <b>canUndo</b>(<i></i>) |
548 <p> |
548 <p> |
549 Public method to return the undo status. |
549 Public method to return the undo status. |
550 </p><dl> |
550 </p><dl> |
551 <dt>Returns:</dt> |
551 <dt>Returns:</dt> |
552 <dd> |
552 <dd> |
553 flag indicating the availability of undo (boolean) |
553 flag indicating the availability of undo (boolean) |
554 </dd> |
554 </dd> |
555 </dl><a NAME="IconEditorGrid.editClear" ID="IconEditorGrid.editClear"></a> |
555 </dl><a NAME="IconEditorGrid.editClear" ID="IconEditorGrid.editClear"></a> |
556 <h4>IconEditorGrid.editClear</h4> |
556 <h4>IconEditorGrid.editClear</h4> |
557 <b>editClear</b>(<i></i>) |
557 <b>editClear</b>(<i></i>) |
558 <p> |
558 <p> |
559 Public slot to clear the image. |
559 Public slot to clear the image. |
560 </p><a NAME="IconEditorGrid.editCopy" ID="IconEditorGrid.editCopy"></a> |
560 </p><a NAME="IconEditorGrid.editCopy" ID="IconEditorGrid.editCopy"></a> |
561 <h4>IconEditorGrid.editCopy</h4> |
561 <h4>IconEditorGrid.editCopy</h4> |
562 <b>editCopy</b>(<i></i>) |
562 <b>editCopy</b>(<i></i>) |
563 <p> |
563 <p> |
564 Public slot to copy the selection. |
564 Public slot to copy the selection. |
565 </p><a NAME="IconEditorGrid.editCut" ID="IconEditorGrid.editCut"></a> |
565 </p><a NAME="IconEditorGrid.editCut" ID="IconEditorGrid.editCut"></a> |
566 <h4>IconEditorGrid.editCut</h4> |
566 <h4>IconEditorGrid.editCut</h4> |
567 <b>editCut</b>(<i></i>) |
567 <b>editCut</b>(<i></i>) |
568 <p> |
568 <p> |
569 Public slot to cut the selection. |
569 Public slot to cut the selection. |
570 </p><a NAME="IconEditorGrid.editNew" ID="IconEditorGrid.editNew"></a> |
570 </p><a NAME="IconEditorGrid.editNew" ID="IconEditorGrid.editNew"></a> |
571 <h4>IconEditorGrid.editNew</h4> |
571 <h4>IconEditorGrid.editNew</h4> |
572 <b>editNew</b>(<i></i>) |
572 <b>editNew</b>(<i></i>) |
573 <p> |
573 <p> |
574 Public slot to generate a new, empty image. |
574 Public slot to generate a new, empty image. |
575 </p><a NAME="IconEditorGrid.editPaste" ID="IconEditorGrid.editPaste"></a> |
575 </p><a NAME="IconEditorGrid.editPaste" ID="IconEditorGrid.editPaste"></a> |
576 <h4>IconEditorGrid.editPaste</h4> |
576 <h4>IconEditorGrid.editPaste</h4> |
577 <b>editPaste</b>(<i>pasting = False</i>) |
577 <b>editPaste</b>(<i>pasting = False</i>) |
578 <p> |
578 <p> |
579 Public slot to paste an image from the clipboard. |
579 Public slot to paste an image from the clipboard. |
580 </p><dl> |
580 </p><dl> |
581 <dt><i>pasting</i></dt> |
581 <dt><i>pasting</i></dt> |
582 <dd> |
582 <dd> |
583 flag indicating part two of the paste operation (boolean) |
583 flag indicating part two of the paste operation (boolean) |
584 </dd> |
584 </dd> |
585 </dl><a NAME="IconEditorGrid.editPasteAsNew" ID="IconEditorGrid.editPasteAsNew"></a> |
585 </dl><a NAME="IconEditorGrid.editPasteAsNew" ID="IconEditorGrid.editPasteAsNew"></a> |
586 <h4>IconEditorGrid.editPasteAsNew</h4> |
586 <h4>IconEditorGrid.editPasteAsNew</h4> |
587 <b>editPasteAsNew</b>(<i></i>) |
587 <b>editPasteAsNew</b>(<i></i>) |
588 <p> |
588 <p> |
589 Public slot to paste the clipboard as a new image. |
589 Public slot to paste the clipboard as a new image. |
590 </p><a NAME="IconEditorGrid.editRedo" ID="IconEditorGrid.editRedo"></a> |
590 </p><a NAME="IconEditorGrid.editRedo" ID="IconEditorGrid.editRedo"></a> |
591 <h4>IconEditorGrid.editRedo</h4> |
591 <h4>IconEditorGrid.editRedo</h4> |
592 <b>editRedo</b>(<i></i>) |
592 <b>editRedo</b>(<i></i>) |
593 <p> |
593 <p> |
594 Public slot to perform a redo operation. |
594 Public slot to perform a redo operation. |
595 </p><a NAME="IconEditorGrid.editResize" ID="IconEditorGrid.editResize"></a> |
595 </p><a NAME="IconEditorGrid.editResize" ID="IconEditorGrid.editResize"></a> |
596 <h4>IconEditorGrid.editResize</h4> |
596 <h4>IconEditorGrid.editResize</h4> |
597 <b>editResize</b>(<i></i>) |
597 <b>editResize</b>(<i></i>) |
598 <p> |
598 <p> |
599 Public slot to resize the image. |
599 Public slot to resize the image. |
600 </p><a NAME="IconEditorGrid.editSelectAll" ID="IconEditorGrid.editSelectAll"></a> |
600 </p><a NAME="IconEditorGrid.editSelectAll" ID="IconEditorGrid.editSelectAll"></a> |
601 <h4>IconEditorGrid.editSelectAll</h4> |
601 <h4>IconEditorGrid.editSelectAll</h4> |
602 <b>editSelectAll</b>(<i></i>) |
602 <b>editSelectAll</b>(<i></i>) |
603 <p> |
603 <p> |
604 Public slot to select the complete image. |
604 Public slot to select the complete image. |
605 </p><a NAME="IconEditorGrid.editUndo" ID="IconEditorGrid.editUndo"></a> |
605 </p><a NAME="IconEditorGrid.editUndo" ID="IconEditorGrid.editUndo"></a> |
606 <h4>IconEditorGrid.editUndo</h4> |
606 <h4>IconEditorGrid.editUndo</h4> |
607 <b>editUndo</b>(<i></i>) |
607 <b>editUndo</b>(<i></i>) |
608 <p> |
608 <p> |
609 Public slot to perform an undo operation. |
609 Public slot to perform an undo operation. |
610 </p><a NAME="IconEditorGrid.grayScale" ID="IconEditorGrid.grayScale"></a> |
610 </p><a NAME="IconEditorGrid.grayScale" ID="IconEditorGrid.grayScale"></a> |
611 <h4>IconEditorGrid.grayScale</h4> |
611 <h4>IconEditorGrid.grayScale</h4> |
612 <b>grayScale</b>(<i></i>) |
612 <b>grayScale</b>(<i></i>) |
613 <p> |
613 <p> |
614 Public slot to convert the image to gray preserving transparency. |
614 Public slot to convert the image to gray preserving transparency. |
615 </p><a NAME="IconEditorGrid.iconImage" ID="IconEditorGrid.iconImage"></a> |
615 </p><a NAME="IconEditorGrid.iconImage" ID="IconEditorGrid.iconImage"></a> |
616 <h4>IconEditorGrid.iconImage</h4> |
616 <h4>IconEditorGrid.iconImage</h4> |
617 <b>iconImage</b>(<i></i>) |
617 <b>iconImage</b>(<i></i>) |
618 <p> |
618 <p> |
619 Public method to get a copy of the icon image. |
619 Public method to get a copy of the icon image. |
620 </p><dl> |
620 </p><dl> |
621 <dt>Returns:</dt> |
621 <dt>Returns:</dt> |
622 <dd> |
622 <dd> |
623 copy of the icon image (QImage) |
623 copy of the icon image (QImage) |
624 </dd> |
624 </dd> |
625 </dl><a NAME="IconEditorGrid.iconSize" ID="IconEditorGrid.iconSize"></a> |
625 </dl><a NAME="IconEditorGrid.iconSize" ID="IconEditorGrid.iconSize"></a> |
626 <h4>IconEditorGrid.iconSize</h4> |
626 <h4>IconEditorGrid.iconSize</h4> |
627 <b>iconSize</b>(<i></i>) |
627 <b>iconSize</b>(<i></i>) |
628 <p> |
628 <p> |
629 Public method to get the size of the icon. |
629 Public method to get the size of the icon. |
630 </p><dl> |
630 </p><dl> |
631 <dt>Returns:</dt> |
631 <dt>Returns:</dt> |
632 <dd> |
632 <dd> |
633 width and height of the image as a tuple (integer, integer) |
633 width and height of the image as a tuple (integer, integer) |
634 </dd> |
634 </dd> |
635 </dl><a NAME="IconEditorGrid.isDirty" ID="IconEditorGrid.isDirty"></a> |
635 </dl><a NAME="IconEditorGrid.isDirty" ID="IconEditorGrid.isDirty"></a> |
636 <h4>IconEditorGrid.isDirty</h4> |
636 <h4>IconEditorGrid.isDirty</h4> |
637 <b>isDirty</b>(<i></i>) |
637 <b>isDirty</b>(<i></i>) |
638 <p> |
638 <p> |
639 Public method to check the dirty status. |
639 Public method to check the dirty status. |
640 </p><dl> |
640 </p><dl> |
641 <dt>Returns:</dt> |
641 <dt>Returns:</dt> |
642 <dd> |
642 <dd> |
643 flag indicating a modified status (boolean) |
643 flag indicating a modified status (boolean) |
644 </dd> |
644 </dd> |
645 </dl><a NAME="IconEditorGrid.isGridEnabled" ID="IconEditorGrid.isGridEnabled"></a> |
645 </dl><a NAME="IconEditorGrid.isGridEnabled" ID="IconEditorGrid.isGridEnabled"></a> |
646 <h4>IconEditorGrid.isGridEnabled</h4> |
646 <h4>IconEditorGrid.isGridEnabled</h4> |
647 <b>isGridEnabled</b>(<i></i>) |
647 <b>isGridEnabled</b>(<i></i>) |
648 <p> |
648 <p> |
649 Public method to get the grid lines status. |
649 Public method to get the grid lines status. |
650 </p><dl> |
650 </p><dl> |
651 <dt>Returns:</dt> |
651 <dt>Returns:</dt> |
652 <dd> |
652 <dd> |
653 enabled status of the grid lines (boolean) |
653 enabled status of the grid lines (boolean) |
654 </dd> |
654 </dd> |
655 </dl><a NAME="IconEditorGrid.isSelectionAvailable" ID="IconEditorGrid.isSelectionAvailable"></a> |
655 </dl><a NAME="IconEditorGrid.isSelectionAvailable" ID="IconEditorGrid.isSelectionAvailable"></a> |
656 <h4>IconEditorGrid.isSelectionAvailable</h4> |
656 <h4>IconEditorGrid.isSelectionAvailable</h4> |
657 <b>isSelectionAvailable</b>(<i></i>) |
657 <b>isSelectionAvailable</b>(<i></i>) |
658 <p> |
658 <p> |
659 Public method to check the availability of a selection. |
659 Public method to check the availability of a selection. |
660 </p><dl> |
660 </p><dl> |
661 <dt>Returns:</dt> |
661 <dt>Returns:</dt> |
662 <dd> |
662 <dd> |
663 flag indicating the availability of a selection (boolean) |
663 flag indicating the availability of a selection (boolean) |
664 </dd> |
664 </dd> |
665 </dl><a NAME="IconEditorGrid.mouseMoveEvent" ID="IconEditorGrid.mouseMoveEvent"></a> |
665 </dl><a NAME="IconEditorGrid.mouseMoveEvent" ID="IconEditorGrid.mouseMoveEvent"></a> |
666 <h4>IconEditorGrid.mouseMoveEvent</h4> |
666 <h4>IconEditorGrid.mouseMoveEvent</h4> |
667 <b>mouseMoveEvent</b>(<i>evt</i>) |
667 <b>mouseMoveEvent</b>(<i>evt</i>) |
668 <p> |
668 <p> |
669 Protected method to handle mouse move events. |
669 Protected method to handle mouse move events. |
670 </p><dl> |
670 </p><dl> |
671 <dt><i>evt</i></dt> |
671 <dt><i>evt</i></dt> |
672 <dd> |
672 <dd> |
673 reference to the mouse event object (QMouseEvent) |
673 reference to the mouse event object (QMouseEvent) |
674 </dd> |
674 </dd> |
675 </dl><a NAME="IconEditorGrid.mousePressEvent" ID="IconEditorGrid.mousePressEvent"></a> |
675 </dl><a NAME="IconEditorGrid.mousePressEvent" ID="IconEditorGrid.mousePressEvent"></a> |
676 <h4>IconEditorGrid.mousePressEvent</h4> |
676 <h4>IconEditorGrid.mousePressEvent</h4> |
677 <b>mousePressEvent</b>(<i>evt</i>) |
677 <b>mousePressEvent</b>(<i>evt</i>) |
678 <p> |
678 <p> |
679 Protected method to handle mouse button press events. |
679 Protected method to handle mouse button press events. |
680 </p><dl> |
680 </p><dl> |
681 <dt><i>evt</i></dt> |
681 <dt><i>evt</i></dt> |
682 <dd> |
682 <dd> |
683 reference to the mouse event object (QMouseEvent) |
683 reference to the mouse event object (QMouseEvent) |
684 </dd> |
684 </dd> |
685 </dl><a NAME="IconEditorGrid.mouseReleaseEvent" ID="IconEditorGrid.mouseReleaseEvent"></a> |
685 </dl><a NAME="IconEditorGrid.mouseReleaseEvent" ID="IconEditorGrid.mouseReleaseEvent"></a> |
686 <h4>IconEditorGrid.mouseReleaseEvent</h4> |
686 <h4>IconEditorGrid.mouseReleaseEvent</h4> |
687 <b>mouseReleaseEvent</b>(<i>evt</i>) |
687 <b>mouseReleaseEvent</b>(<i>evt</i>) |
688 <p> |
688 <p> |
689 Protected method to handle mouse button release events. |
689 Protected method to handle mouse button release events. |
690 </p><dl> |
690 </p><dl> |
691 <dt><i>evt</i></dt> |
691 <dt><i>evt</i></dt> |
692 <dd> |
692 <dd> |
693 reference to the mouse event object (QMouseEvent) |
693 reference to the mouse event object (QMouseEvent) |
694 </dd> |
694 </dd> |
695 </dl><a NAME="IconEditorGrid.paintEvent" ID="IconEditorGrid.paintEvent"></a> |
695 </dl><a NAME="IconEditorGrid.paintEvent" ID="IconEditorGrid.paintEvent"></a> |
696 <h4>IconEditorGrid.paintEvent</h4> |
696 <h4>IconEditorGrid.paintEvent</h4> |
697 <b>paintEvent</b>(<i>evt</i>) |
697 <b>paintEvent</b>(<i>evt</i>) |
698 <p> |
698 <p> |
699 Protected method called to repaint some of the widget. |
699 Protected method called to repaint some of the widget. |
700 </p><dl> |
700 </p><dl> |
701 <dt><i>evt</i></dt> |
701 <dt><i>evt</i></dt> |
702 <dd> |
702 <dd> |
703 reference to the paint event object (QPaintEvent) |
703 reference to the paint event object (QPaintEvent) |
704 </dd> |
704 </dd> |
705 </dl><a NAME="IconEditorGrid.penColor" ID="IconEditorGrid.penColor"></a> |
705 </dl><a NAME="IconEditorGrid.penColor" ID="IconEditorGrid.penColor"></a> |
706 <h4>IconEditorGrid.penColor</h4> |
706 <h4>IconEditorGrid.penColor</h4> |
707 <b>penColor</b>(<i></i>) |
707 <b>penColor</b>(<i></i>) |
708 <p> |
708 <p> |
709 Public method to get the current drawing color. |
709 Public method to get the current drawing color. |
710 </p><dl> |
710 </p><dl> |
711 <dt>Returns:</dt> |
711 <dt>Returns:</dt> |
712 <dd> |
712 <dd> |
713 current drawing color (QColor) |
713 current drawing color (QColor) |
714 </dd> |
714 </dd> |
715 </dl><a NAME="IconEditorGrid.previewPixmap" ID="IconEditorGrid.previewPixmap"></a> |
715 </dl><a NAME="IconEditorGrid.previewPixmap" ID="IconEditorGrid.previewPixmap"></a> |
716 <h4>IconEditorGrid.previewPixmap</h4> |
716 <h4>IconEditorGrid.previewPixmap</h4> |
717 <b>previewPixmap</b>(<i></i>) |
717 <b>previewPixmap</b>(<i></i>) |
718 <p> |
718 <p> |
719 Public method to generate a preview pixmap. |
719 Public method to generate a preview pixmap. |
720 </p><dl> |
720 </p><dl> |
721 <dt>Returns:</dt> |
721 <dt>Returns:</dt> |
722 <dd> |
722 <dd> |
723 preview pixmap (QPixmap) |
723 preview pixmap (QPixmap) |
724 </dd> |
724 </dd> |
725 </dl><a NAME="IconEditorGrid.setDirty" ID="IconEditorGrid.setDirty"></a> |
725 </dl><a NAME="IconEditorGrid.setDirty" ID="IconEditorGrid.setDirty"></a> |
726 <h4>IconEditorGrid.setDirty</h4> |
726 <h4>IconEditorGrid.setDirty</h4> |
727 <b>setDirty</b>(<i>dirty, setCleanState = False</i>) |
727 <b>setDirty</b>(<i>dirty, setCleanState = False</i>) |
728 <p> |
728 <p> |
729 Public slot to set the dirty flag. |
729 Public slot to set the dirty flag. |
730 </p><dl> |
730 </p><dl> |
731 <dt><i>dirty</i></dt> |
731 <dt><i>dirty</i></dt> |
732 <dd> |
732 <dd> |
733 flag indicating the new modification status (boolean) |
733 flag indicating the new modification status (boolean) |
734 </dd><dt><i>setCleanState</i></dt> |
734 </dd><dt><i>setCleanState</i></dt> |
735 <dd> |
735 <dd> |
736 flag indicating to set the undo stack to clean (boolean) |
736 flag indicating to set the undo stack to clean (boolean) |
737 </dd> |
737 </dd> |
738 </dl><a NAME="IconEditorGrid.setGridEnabled" ID="IconEditorGrid.setGridEnabled"></a> |
738 </dl><a NAME="IconEditorGrid.setGridEnabled" ID="IconEditorGrid.setGridEnabled"></a> |
739 <h4>IconEditorGrid.setGridEnabled</h4> |
739 <h4>IconEditorGrid.setGridEnabled</h4> |
740 <b>setGridEnabled</b>(<i>enable</i>) |
740 <b>setGridEnabled</b>(<i>enable</i>) |
741 <p> |
741 <p> |
742 Public method to enable the display of grid lines. |
742 Public method to enable the display of grid lines. |
743 </p><dl> |
743 </p><dl> |
744 <dt><i>enable</i></dt> |
744 <dt><i>enable</i></dt> |
745 <dd> |
745 <dd> |
746 enabled status of the grid lines (boolean) |
746 enabled status of the grid lines (boolean) |
747 </dd> |
747 </dd> |
748 </dl><a NAME="IconEditorGrid.setIconImage" ID="IconEditorGrid.setIconImage"></a> |
748 </dl><a NAME="IconEditorGrid.setIconImage" ID="IconEditorGrid.setIconImage"></a> |
749 <h4>IconEditorGrid.setIconImage</h4> |
749 <h4>IconEditorGrid.setIconImage</h4> |
750 <b>setIconImage</b>(<i>newImage, undoRedo = False, clearUndo = False</i>) |
750 <b>setIconImage</b>(<i>newImage, undoRedo = False, clearUndo = False</i>) |
751 <p> |
751 <p> |
752 Public method to set a new icon image. |
752 Public method to set a new icon image. |
753 </p><dl> |
753 </p><dl> |
754 <dt><i>newImage</i></dt> |
754 <dt><i>newImage</i></dt> |
755 <dd> |
755 <dd> |
756 reference to the new image (QImage) |
756 reference to the new image (QImage) |
757 </dd><dt><i>undoRedo=</i></dt> |
757 </dd><dt><i>undoRedo=</i></dt> |
758 <dd> |
758 <dd> |
759 flag indicating an undo or redo operation (boolean) |
759 flag indicating an undo or redo operation (boolean) |
760 </dd><dt><i>clearUndo=</i></dt> |
760 </dd><dt><i>clearUndo=</i></dt> |
761 <dd> |
761 <dd> |
762 flag indicating to clear the undo stack (boolean) |
762 flag indicating to clear the undo stack (boolean) |
763 </dd> |
763 </dd> |
764 </dl><a NAME="IconEditorGrid.setPenColor" ID="IconEditorGrid.setPenColor"></a> |
764 </dl><a NAME="IconEditorGrid.setPenColor" ID="IconEditorGrid.setPenColor"></a> |
765 <h4>IconEditorGrid.setPenColor</h4> |
765 <h4>IconEditorGrid.setPenColor</h4> |
766 <b>setPenColor</b>(<i>newColor</i>) |
766 <b>setPenColor</b>(<i>newColor</i>) |
767 <p> |
767 <p> |
768 Public method to set the drawing color. |
768 Public method to set the drawing color. |
769 </p><dl> |
769 </p><dl> |
770 <dt><i>newColor</i></dt> |
770 <dt><i>newColor</i></dt> |
771 <dd> |
771 <dd> |
772 reference to the new color (QColor) |
772 reference to the new color (QColor) |
773 </dd> |
773 </dd> |
774 </dl><a NAME="IconEditorGrid.setTool" ID="IconEditorGrid.setTool"></a> |
774 </dl><a NAME="IconEditorGrid.setTool" ID="IconEditorGrid.setTool"></a> |
775 <h4>IconEditorGrid.setTool</h4> |
775 <h4>IconEditorGrid.setTool</h4> |
776 <b>setTool</b>(<i>tool</i>) |
776 <b>setTool</b>(<i>tool</i>) |
777 <p> |
777 <p> |
778 Public method to set the current drawing tool. |
778 Public method to set the current drawing tool. |
779 </p><dl> |
779 </p><dl> |
780 <dt><i>tool</i></dt> |
780 <dt><i>tool</i></dt> |
781 <dd> |
781 <dd> |
782 drawing tool to be used |
782 drawing tool to be used |
783 (IconEditorGrid.Pencil ... IconEditorGrid.CircleSelection) |
783 (IconEditorGrid.Pencil ... IconEditorGrid.CircleSelection) |
784 </dd> |
784 </dd> |
785 </dl><a NAME="IconEditorGrid.setZoomFactor" ID="IconEditorGrid.setZoomFactor"></a> |
785 </dl><a NAME="IconEditorGrid.setZoomFactor" ID="IconEditorGrid.setZoomFactor"></a> |
786 <h4>IconEditorGrid.setZoomFactor</h4> |
786 <h4>IconEditorGrid.setZoomFactor</h4> |
787 <b>setZoomFactor</b>(<i>newZoom</i>) |
787 <b>setZoomFactor</b>(<i>newZoom</i>) |
788 <p> |
788 <p> |
789 Public method to set the zoom factor. |
789 Public method to set the zoom factor. |
790 </p><dl> |
790 </p><dl> |
791 <dt><i>newZoom</i></dt> |
791 <dt><i>newZoom</i></dt> |
792 <dd> |
792 <dd> |
793 zoom factor (integer >= 1) |
793 zoom factor (integer >= 1) |
794 </dd> |
794 </dd> |
795 </dl><a NAME="IconEditorGrid.shutdown" ID="IconEditorGrid.shutdown"></a> |
795 </dl><a NAME="IconEditorGrid.shutdown" ID="IconEditorGrid.shutdown"></a> |
796 <h4>IconEditorGrid.shutdown</h4> |
796 <h4>IconEditorGrid.shutdown</h4> |
797 <b>shutdown</b>(<i></i>) |
797 <b>shutdown</b>(<i></i>) |
798 <p> |
798 <p> |
799 Public slot to perform some shutdown actions. |
799 Public slot to perform some shutdown actions. |
800 </p><a NAME="IconEditorGrid.sizeHint" ID="IconEditorGrid.sizeHint"></a> |
800 </p><a NAME="IconEditorGrid.sizeHint" ID="IconEditorGrid.sizeHint"></a> |
801 <h4>IconEditorGrid.sizeHint</h4> |
801 <h4>IconEditorGrid.sizeHint</h4> |
802 <b>sizeHint</b>(<i></i>) |
802 <b>sizeHint</b>(<i></i>) |
803 <p> |
803 <p> |
804 Public method to report the size hint. |
804 Public method to report the size hint. |
805 </p><dl> |
805 </p><dl> |
806 <dt>Returns:</dt> |
806 <dt>Returns:</dt> |
807 <dd> |
807 <dd> |
808 size hint (QSize) |
808 size hint (QSize) |
809 </dd> |
809 </dd> |
810 </dl><a NAME="IconEditorGrid.tool" ID="IconEditorGrid.tool"></a> |
810 </dl><a NAME="IconEditorGrid.tool" ID="IconEditorGrid.tool"></a> |
811 <h4>IconEditorGrid.tool</h4> |
811 <h4>IconEditorGrid.tool</h4> |
812 <b>tool</b>(<i></i>) |
812 <b>tool</b>(<i></i>) |
813 <p> |
813 <p> |
814 Public method to get the current drawing tool. |
814 Public method to get the current drawing tool. |
815 </p><dl> |
815 </p><dl> |
816 <dt>Returns:</dt> |
816 <dt>Returns:</dt> |
817 <dd> |
817 <dd> |
818 current drawing tool |
818 current drawing tool |
819 (IconEditorGrid.Pencil ... IconEditorGrid.CircleSelection) |
819 (IconEditorGrid.Pencil ... IconEditorGrid.CircleSelection) |
820 </dd> |
820 </dd> |
821 </dl><a NAME="IconEditorGrid.zoomFactor" ID="IconEditorGrid.zoomFactor"></a> |
821 </dl><a NAME="IconEditorGrid.zoomFactor" ID="IconEditorGrid.zoomFactor"></a> |
822 <h4>IconEditorGrid.zoomFactor</h4> |
822 <h4>IconEditorGrid.zoomFactor</h4> |
823 <b>zoomFactor</b>(<i></i>) |
823 <b>zoomFactor</b>(<i></i>) |
824 <p> |
824 <p> |
825 Public method to get the current zoom factor. |
825 Public method to get the current zoom factor. |
826 </p><dl> |
826 </p><dl> |
827 <dt>Returns:</dt> |
827 <dt>Returns:</dt> |
828 <dd> |
828 <dd> |
829 zoom factor (integer) |
829 zoom factor (integer) |
830 </dd> |
830 </dd> |
831 </dl> |
831 </dl> |
832 <div align="right"><a href="#top">Up</a></div> |
832 <div align="right"><a href="#top">Up</a></div> |
833 <hr /> |
833 <hr /> |
834 </body></html> |
834 </body></html> |