def mousePressEvent(self, event):
        # edit the hue
        r = self.hueRect()
        if (r.contains(event.pos())):
            self._editing = 'hue'
            self.setHueFromPoint(event.pos())
            return QWidget.mousePressEvent(self, event)

        # edit the alpha
        r = self.alphaRect()
        if (r.contains(event.pos())):
            self._editing = 'alpha'
            self.setAlphaFromPoint(event.pos())
            return QWidget.mousePressEvent(self, event)

        # edit the color
        r = self.colorRect()
        if (r.contains(event.pos())):
            self._editing = 'color'
            self.setSaturationAndLightnessFromPoint(event.pos())
            return QWidget.mousePressEvent(self, event)

        return QWidget.mousePressEvent(self, event)
    def mousePressEvent( self, event ):
        # edit the hue
        r = self.hueRect()
        if ( r.contains( event.pos() ) ):
            self._editing = 'hue'
            self.setHueFromPoint( event.pos() )
            return QWidget.mousePressEvent( self, event )

        # edit the alpha
        r = self.alphaRect()
        if ( r.contains( event.pos() ) ):
            self._editing = 'alpha'
            self.setAlphaFromPoint( event.pos() )
            return QWidget.mousePressEvent( self, event )

        # edit the color
        r = self.colorRect()
        if ( r.contains( event.pos() ) ):
            self._editing = 'color'
            self.setSaturationAndLightnessFromPoint( event.pos() )
            return QWidget.mousePressEvent( self, event )

        return QWidget.mousePressEvent( self, event )