개정판 737f1add
issue #703: onsuccess
DTI_PID/DTI_PID/Commands/SelectAttributeCommand.py | ||
---|---|---|
1 | 1 |
import os.path |
2 | 2 |
import AbstractCommand |
3 |
from EngineeringLineItem import QEngineeringLineItem |
|
4 | 3 |
try: |
5 | 4 |
from PyQt5.QtCore import Qt, QRectF, pyqtSignal, QT_VERSION_STR, QEvent |
6 | 5 |
from PyQt5.QtGui import QImage, QPixmap, QPainterPath, QCursor, QMouseEvent, QTransform |
... | ... | |
19 | 18 |
''' |
20 | 19 |
class SelectAttributeCommand(AbstractCommand.AbstractCommand): |
21 | 20 |
|
22 |
onSuccess = pyqtSignal(QEngineeringLineItem)
|
|
21 |
onSuccess = pyqtSignal() |
|
23 | 22 |
|
24 | 23 |
def __init__(self, item, attr, imageViewer): |
25 | 24 |
super(SelectAttributeCommand, self).__init__(imageViewer) |
... | ... | |
41 | 40 |
if 'mouseReleaseEvent' == param[0] and event.button() == Qt.LeftButton: |
42 | 41 |
from SymbolSvgItem import SymbolSvgItem |
43 | 42 |
from EngineeringTextItem import QEngineeringTextItem |
43 |
from EngineeringLineItem import QEngineeringLineItem |
|
44 | 44 |
if self._attr is not None: |
45 | 45 |
item = self.imageViewer.scene.itemAt(scenePos, QTransform()) |
46 | 46 |
if item is not None and self._attr.AttributeType == 'Text Item' and type(item) is QEngineeringTextItem: |
... | ... | |
81 | 81 |
elif item is not None and self._attr.AttributeType == 'Line Conn' and issubclass(type(item), QEngineeringLineItem): |
82 | 82 |
self._item.connectors[self._attr.ConnNum - 1].connectedItem = item |
83 | 83 |
|
84 |
self.onSuccess.emit(self._item)
|
|
84 |
self.onSuccess.emit() |
|
85 | 85 |
|
86 | 86 |
self.isTreated = True |
87 | 87 |
|
DTI_PID/DTI_PID/MainWindow.py | ||
---|---|---|
508 | 508 |
def refreshResultPropertyTableWidget(self): |
509 | 509 |
items = self.graphicsView.scene.selectedItems() |
510 | 510 |
if len(items) == 1: |
511 |
self.resultPropertyTableWidget.onSymbolClicked(items[0])
|
|
511 |
self.resultPropertyTableWidget.showItemProperty(items[0])
|
|
512 | 512 |
|
513 | 513 |
''' |
514 | 514 |
@brief resultPropertyTableWidget Cell Click Event |
내보내기 Unified diff