148 if val != self.__currentAlpha: |
148 if val != self.__currentAlpha: |
149 col = QColor(self.__currentColor) |
149 col = QColor(self.__currentColor) |
150 col.setAlpha(val) |
150 col.setAlpha(val) |
151 self.colorSelected.emit(col) |
151 self.colorSelected.emit(col) |
152 |
152 |
|
153 def setCompositingMode(self, mode): |
|
154 """ |
|
155 Public method to set the compositing mode. |
|
156 |
|
157 @param mode compositing mode to set (QPainter.CompositionMode) |
|
158 """ |
|
159 if mode == QPainter.CompositionMode_Source: |
|
160 self.__sourceButton.setChecked(True) |
|
161 elif mode == QPainter.CompositionMode_SourceOver: |
|
162 self.__sourceOverButton.setChecked(True) |
|
163 |
153 def __compositingChanged(self, on): |
164 def __compositingChanged(self, on): |
154 """ |
165 """ |
155 Private slot to handle a change of the compositing mode. |
166 Private slot to handle a change of the compositing mode. |
156 |
167 |
157 @param on flag indicating the checked state of the compositing button (boolean) |
168 @param on flag indicating the checked state of the compositing button (boolean) |