개정판 dd9923e3
issue #1060: 계산 오류 발생 시 ERROR 텍스트를 그래픽 뷰에 표시하고, Output, Loop에는 데이타를 표시하지 않는다
Change-Id: I9b8a2d848f0647326668e95389a00654d72978d9
HYTOS/HYTOS/QtImageViewer.py | ||
---|---|---|
413 | 413 |
@date 2018.07.23 |
414 | 414 |
''' |
415 | 415 |
def drawBackground(self, painter, rect): |
416 |
from CalculationValidation import QCalculationValidation |
|
417 |
|
|
416 | 418 |
QGraphicsView.drawBackground(self, painter, rect) |
417 | 419 |
|
418 | 420 |
painter.setPen(Qt.gray) |
... | ... | |
430 | 432 |
rect.setBottom(rect.bottom() - 5) |
431 | 433 |
painter.fillRect(rect, QBrush(Qt.white)) |
432 | 434 |
|
435 |
if QCalculationValidation.ERRORS: |
|
436 |
_pixmap = QPixmap(':/images/error.svg') |
|
437 |
painter.drawPixmap(self.sceneRect(), _pixmap, QRectF(_pixmap.rect())) |
|
438 |
|
|
433 | 439 |
''' |
434 | 440 |
@history 2018.06.11 Jeongwoo Change method to manage guideline items |
435 | 441 |
humkyung 2018.08.28 remove guide lines before drawing |
... | ... | |
498 | 504 |
|
499 | 505 |
event.acceptProposedAction() |
500 | 506 |
|
501 |
''' |
|
502 |
@brief drop event |
|
503 |
@author humkyung |
|
504 |
@date 2018.04.17 |
|
505 |
@history 2018.06.08 Jeongwoo Add Paramter on SymbolSvgItem.buildItem() |
|
506 |
humkyung 2018.08.21 call hoverLeaveEvent if item exists under mouse |
|
507 |
''' |
|
508 | 507 |
def dropEvent(self, event): |
508 |
"""create a symbol""" |
|
509 | 509 |
try: |
510 | 510 |
from AppDocData import AppDocData |
511 | 511 |
import symbol |
512 | 512 |
|
513 | 513 |
scenePos = self.mapToScene(event.pos()) |
514 | 514 |
uid = event.mimeData().text() |
515 |
svg = self.scene.createSymbolObject(uid) |
|
515 |
svg = self.scene.createSymbolObject(uid, scale=None, angle=None)
|
|
516 | 516 |
if svg: |
517 | 517 |
self.scene.place_symbol(svg, scenePos) |
518 | 518 |
|
내보내기 Unified diff