29 @param grid reference to the icon editor grid (IconEditorGrid) |
29 @param grid reference to the icon editor grid (IconEditorGrid) |
30 @param text text for the undo command (string) |
30 @param text text for the undo command (string) |
31 @param oldImage copy of the icon before the changes were applied (QImage) |
31 @param oldImage copy of the icon before the changes were applied (QImage) |
32 @param parent reference to the parent command (QUndoCommand) |
32 @param parent reference to the parent command (QUndoCommand) |
33 """ |
33 """ |
34 QUndoCommand.__init__(self, text, parent) |
34 super().__init__(text, parent) |
35 |
35 |
36 self.__grid = grid |
36 self.__grid = grid |
37 self.__imageBefore = QImage(oldImage) |
37 self.__imageBefore = QImage(oldImage) |
38 self.__imageAfter = None |
38 self.__imageAfter = None |
39 |
39 |
106 """ |
106 """ |
107 Constructor |
107 Constructor |
108 |
108 |
109 @param parent reference to the parent widget (QWidget) |
109 @param parent reference to the parent widget (QWidget) |
110 """ |
110 """ |
111 QWidget.__init__(self, parent) |
111 super().__init__(parent) |
112 |
112 |
113 self.setAttribute(Qt.WA_StaticContents) |
113 self.setAttribute(Qt.WA_StaticContents) |
114 self.setSizePolicy(QSizePolicy.Minimum, QSizePolicy.Minimum) |
114 self.setSizePolicy(QSizePolicy.Minimum, QSizePolicy.Minimum) |
115 |
115 |
116 self.__curColor = Qt.black |
116 self.__curColor = Qt.black |