개정판 1b1c469d
issue #503: fix error and add opacity
Change-Id: I827eb50bb9cef47ce070b0eb7f535b0d529b76e2
DTI_PID/DTI_PID/Shapes/EngineeringVendorItem.py | ||
---|---|---|
31 | 31 |
self.uid = uuid.uuid4() |
32 | 32 |
self.points = points |
33 | 33 | |
34 |
self.isEntered = False |
|
34 | 35 |
self.setColor(self._color) |
35 | 36 |
self._savedColor = None |
36 | 37 | |
... | ... | |
51 | 52 |
def setColor(self, color): |
52 | 53 |
c = QColor() |
53 | 54 |
c.setNamedColor(color) |
55 |
c.setAlpha(30) |
|
54 | 56 |
_pen = self.pen() |
55 | 57 |
_pen.setColor(c) |
58 |
_brush = self.brush() |
|
59 |
_brush.setColor(c) |
|
60 |
_brush.setStyle(Qt.SolidPattern) |
|
56 | 61 |
self.setPen(_pen) |
62 |
self.setBrush(_brush) |
|
63 |
self.update() |
|
64 |
|
|
65 |
def hoverEnterEvent(self, event): |
|
66 |
self.isEntered = True |
|
67 |
self.update() |
|
68 | ||
69 |
def hoverLeaveEvent(self, event): |
|
70 |
self.isEntered = False |
|
57 | 71 |
self.update() |
58 | 72 | |
59 | 73 |
def onConnectorPosChaned(self, connector): |
내보내기 Unified diff