326 def setIconImage(self, newImage, undoRedo=False, clearUndo=False): |
326 def setIconImage(self, newImage, undoRedo=False, clearUndo=False): |
327 """ |
327 """ |
328 Public method to set a new icon image. |
328 Public method to set a new icon image. |
329 |
329 |
330 @param newImage reference to the new image (QImage) |
330 @param newImage reference to the new image (QImage) |
331 @keyparam undoRedo flag indicating an undo or redo operation (boolean) |
331 @param undoRedo flag indicating an undo or redo operation (boolean) |
332 @keyparam clearUndo flag indicating to clear the undo stack (boolean) |
332 @param clearUndo flag indicating to clear the undo stack (boolean) |
333 """ |
333 """ |
334 if newImage != self.__image: |
334 if newImage != self.__image: |
335 self.__image = newImage.convertToFormat(QImage.Format_ARGB32) |
335 self.__image = newImage.convertToFormat(QImage.Format_ARGB32) |
336 self.update() |
336 self.update() |
337 self.updateGeometry() |
337 self.updateGeometry() |