개정판 c2a462bc
issue #1062: 속성 수정 후 입력 데이타 유효성을 화면에 표시
Change-Id: Ida2e6dcb10c694cf58720bc296a49fcaf3c80515
HYTOS/HYTOS/Shapes/EngineeringConnectorItem.py | ||
---|---|---|
276 | 276 |
else: |
277 | 277 |
self.connectedItem = None |
278 | 278 |
|
279 |
if self.connectedItem: |
|
280 |
self.setBrush(Qt.red) if self.validate() else self.setBrush(Qt.yellow) |
|
281 |
else: |
|
282 |
self.setBrush(Qt.blue) |
|
279 |
self.update() |
|
283 | 280 |
|
284 | 281 |
def hoverEnterEvent(self, event): |
285 | 282 |
"""highlight connector""" |
... | ... | |
484 | 481 |
def paint(self, painter, options=None, widget=None): |
485 | 482 |
from SymbolSvgItem import SymbolSvgItem |
486 | 483 |
|
484 |
if self.connectedItem: |
|
485 |
self.setBrush(Qt.red) if self.validate() else self.setBrush(Qt.yellow) |
|
486 |
else: |
|
487 |
self.setBrush(Qt.blue) |
|
488 |
|
|
487 | 489 |
QGraphicsEllipseItem.paint(self, painter, options, widget) |
488 | 490 |
if type(self.parentItem()) is SymbolSvgItem: |
489 | 491 |
painter.setFont(self._font) |
내보내기 Unified diff