class GuideSettings(MayaQWidgetDockableMixin, QtWidgets.QDialog, HelperSlots): # valueChanged = QtCore.Signal(int) greenBrush = QtGui.QBrush() greenBrush.setColor('#179e83') redBrush = QtGui.QBrush() redBrush.setColor('#9b2d22') whiteBrush = QtGui.QBrush() whiteBrush.setColor('#ffffff') whiteDownBrush = QtGui.QBrush() whiteDownBrush.setColor('#E2E2E2') orangeBrush = QtGui.QBrush() orangeBrush.setColor('#e67e22') def __init__(self, parent=None): pass
def unhighlight(self): self._ellipseItem.setBrush(QtGui.QBrush(self._color)) self._ellipseItem.setRect( -self.__radius, -self.__radius, self.__diameter, self.__diameter, )
def highlight(self): self._ellipseItem.setBrush(QtGui.QBrush(self._color.lighter())) # make the port bigger to highlight it can accept the connection. self._ellipseItem.setRect( -self.__radius * 1.3, -self.__radius * 1.3, self.__diameter * 1.3, self.__diameter * 1.3, )
def setColor(self, color): self._color = color self._ellipseItem.setBrush(QtGui.QBrush(self._color))