Example #1
0
    def color(self, value):
        if value is None:
            if self._color is None:
                return
            self._color = None
            self._update()
            return

        c = self._color
        if isinstance(value, QtGui.QColor):
            self._color = value
        else:
            self._color = ColorQValue(value).qColor

        if not ColorQValue.compareQColors(value, c):
            self._update()
Example #2
0
    def updateStyles(
            self, fontFamily =None, fontSize =None, color =None, fontWeight =None, isBold =None,
            isItalic =None, isBorderless =None
    ):
        """updateStyle doc..."""
        if fontFamily:
            self._fontFamily = fontFamily
        if fontSize:
            self._fontSize = fontSize
        if fontWeight:
            self._fontWeight = fontWeight
        if isBold is not None:
            self._isBold = isBold
        if isItalic is not None:
            self._isItalic = isItalic
        if isBorderless is not None:
            self._isBorderless = isBorderless

        if color:
            self._color = ColorQValue.getAsQColor(color)
        self._update()