프로젝트

일반

사용자정보

개정판 737f1add

ID737f1add54187a12b7ba33e7e43a174793f4830f
상위 4195e345
하위 69645d91

함의성이(가) 약 6년 전에 추가함

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

클립보드 이미지 추가 (최대 크기: 500 MB)