IconEditor/IconEditorPalette.py

changeset 495
b31b0bffa5b0
parent 464
a2b1d1770ef0
child 618
42580bfc0777
diff -r 01f3384d535a -r b31b0bffa5b0 IconEditor/IconEditorPalette.py
--- a/IconEditor/IconEditorPalette.py	Wed Aug 11 17:12:04 2010 +0200
+++ b/IconEditor/IconEditorPalette.py	Wed Aug 11 19:55:34 2010 +0200
@@ -16,6 +16,8 @@
     
     @signal colorSelected(QColor) emitted after a new color has been selected
     """
+    colorSelected = pyqtSignal(QColor)
+    
     def __init__(self, parent = None):
         """
         Constructor
@@ -74,8 +76,7 @@
             """<p>Select the value for the alpha channel of the current color.</p>"""
         ))
         self.__layout.addWidget(self.__colorAlpha)
-        self.connect(self.__colorAlpha, SIGNAL("valueChanged(int)"), 
-                     self.__alphaChanged)
+        self.__colorAlpha.valueChanged[int].connect(self.__alphaChanged)
         
         spacer = QSpacerItem(10, 10, QSizePolicy.Minimum, QSizePolicy.Expanding)
         self.__layout.addItem(spacer)
@@ -111,7 +112,7 @@
         col.setAlpha(self.__currentAlpha)
         
         if col.isValid():
-            self.emit(SIGNAL("colorSelected(QColor)"), col)
+            self.colorSelected.emit(col)
     
     def __alphaChanged(self, val):
         """
@@ -122,4 +123,4 @@
         if val != self.__currentAlpha:
            col = QColor(self.__currentColor) 
            col.setAlpha(val)
-           self.emit(SIGNAL("colorSelected(QColor)"), col)
\ No newline at end of file
+           self.colorSelected.emit(col)

eric ide

mercurial