프로젝트

일반

사용자정보

개정판 b5112bc4

IDb5112bc4bfe8138f5b0464890e308f1bf01d728d
상위 92dd4783
하위 663f4ac9

백흠경이(가) 약 6년 전에 추가함

build issue #624: add potrace.exe

차이점 보기:

App.spec
6 6
a = Analysis(['C:\\Temp\\workspace\\ID2\\DTI_PID\\DTI_PID\\App.py','C:\\Temp\\workspace\\ID2\\DTI_PID\\DTI_PID\\TrainingImageListDialog.py'],
7 7
             pathex=['C:\\Temp\\workspace\\ID2\\DTI_PID\\DTI_PID', 'C:\\Temp\\workspace\\ID2\\DTI_PID\\DTI_PID\\Commands', 'C:\\Temp\\workspace\\ID2\\DTI_PID\\DTI_PID\\Shapes'],
8 8
             binaries=[('C:\\Temp\\workspace\\ID2\\DTI_PID\\DTI_PID\\bin64\\*.exe', 'bin64'),
9
             ('C:\\Temp\\workspace\\ID2\\DTI_PID\\DTI_PID\\bin64\\*.dll', 'bin64')
9
             ('C:\\Temp\\workspace\\ID2\\DTI_PID\\DTI_PID\\bin64\\*.dll', 'bin64'),
10
             ('C:\\Temp\\workspace\\ID2\\DTI_PID\\DTI_PID\\*.exe', '.')
10 11
             ],
11 12
             datas=[('C:\\Temp\\workspace\\ID2\\DTI_PID\\DTI_PID\\*.qss', '.'),
12 13
             ('C:\\Temp\\workspace\\ID2\\*.BMP', '.'),
DTI_PID/DTI_PID/Shapes/EngineeringConnectorItem.py
39 39
        self.buildItem()
40 40
        self._direction = 'AUTO'
41 41
        self._symbol_idx = '0'
42
        self._spec_break = None
42 43
        self.highlight = False
43 44
        self.connectedItem = None
44 45
        self.sceneConnectPoint = None
......
79 80
        """
80 81
        self._symbol_idx = value
81 82

  
83
    @property
84
    def spec_break(self):
85
        """
86
        getter of spec break
87
        """
88
        return self._spec_break
89

  
90
    @spec_break.setter
91
    def spec_idx(self, value):
92
        """
93
        setter of spec_break
94
        """
95
        self._spec_break = value
96

  
82 97
    '''
83 98
        @brief      return direction vector
84 99
        @author     humkyung
......
348 363
        else:
349 364
            return False
350 365

  
366
    @staticmethod
367
    def fromXml(node):
368
        """
369
        generate connector instance from xml node
370
        """
371

  
372
        attr = QEngineeringConnectorItem()
373

  
374
        return attr
375

  
376
    def toXml(self):
377
        """
378
        generate xml code for connector
379
        """
380
        from xml.etree.ElementTree import Element, SubElement, dump, ElementTree
381

  
382
        node = Element('CONNECTOR')
383

  
384
        return node
351 385
'''
352 386
    @brief      The class transfer pyqtSignal Event. Cause Subclass of QGraphicsRectItem can't use pyqtSignal
353 387
    @author     Jeongwoo
DTI_PID/DTI_PID/Shapes/EngineeringSpecBreakItem.py
14 14
from EngineeringConnectorItem import QEngineeringConnectorItem
15 15

  
16 16
class QEngineeringSpecBreakItem(SymbolSvgItem):
17
    """
18
    This is engineering specbreak item class
19
    """
20

  
17 21
    ZVALUE = 20
18 22
    clicked = pyqtSignal(QGraphicsSvgItem)
19 23

  
......
30 34
        @history    kyouho  2018.07.18  Add only attr QEngineeringTextItem
31 35
    '''
32 36
    def getAttributes(self):
33
        from EngineeringTextItem import QEngineeringTextItem
34
        from EngineeringInstrumentItem import QEngineeringInstrumentItem
35
        from EngineeringSpecBreakItem import QEngineeringSpecBreakItem
36
        attrs = {}
37
        
38
        # 해당 Type의 attribute setting
39
        docData = AppDocData.instance()
40
        
41
        attrs['Up Stream'] = ''
42
        attrs['Down Stream'] = ''
43
        
44
        symbolAttrs = docData.getSymbolAttribute(self.type)
45
        for attr in symbolAttrs:
46
            attrs[attr[0]] = ''
37
        _attrs = {}
38
        try:
39
            from AppDocData import AppDocData
47 40

  
48
        for attr in self.attrs:
49
            if type(attr) is QEngineeringTextItem or issubclass(type(attr), SymbolSvgItem):
50
                attrs[attr.attribute] = attr.uid
51
            elif type(attr) is QEngineeringInstrumentItem:
52
                attrs['Label'] = '{}'.format(attr)
53
            elif type(attr) is UserInputAttribute:
54
                attrs[attr.attribute] = attr.text
55
            elif type(attr) is tuple:
56
                attrs[attr[0]] = attr[1]
57
        
58
        return attrs
41
            # 해당 Type의 attribute setting
42
            docData = AppDocData.instance()
43
            symbolAttrs = docData.getSymbolAttribute(self.type)
59 44

  
45
            for attr in symbolAttrs:
46
                matches = [prop for prop in self.attrs if prop.UID == attr.UID]
47
                if len(matches) == 1:
48
                    _attrs[matches[0]] = self.attrs[matches[0]]
49
                else:
50
                    _attrs[attr] = ''
51
        except Exception as ex:
52
            from App import App 
53
            from AppDocData import MessageType
54

  
55
            message = 'error occured({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, sys.exc_info()[-1].tb_lineno)
56
            App.mainWnd().addMessage.emit(MessageType.Error, message)
57
        
58
        return _attrs
60 59

  
61 60
    '''
62 61
        @brief      generate xml code for nozzle
......
68 67

  
69 68
        try:
70 69
            node = SymbolSvgItem.toXml(self)
71

  
72 70
        except Exception as ex:
73
            print('error occured({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, sys.exc_info()[-1].tb_lineno))
71
            from App import App 
72
            from AppDocData import MessageType
73

  
74
            message = 'error occured({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, sys.exc_info()[-1].tb_lineno)
75
            App.mainWnd().addMessage.emit(MessageType.Error, message)
74 76

  
75
        return node 
77
        return node 
DTI_PID/DTI_PID/Shapes/SymbolSvgItem.py
868 868
                        typeValue = attr.find('TYPEVALUE').text
869 869
                        item[0].attrs.append(UserInputAttribute(typeUID, typeValue))
870 870

  
871
                    """
871 872
                    if type(item[0]) is QEngineeringSpecBreakItem:
872 873
                        upStreamNode = attributes.find('UPSTREAM')
873 874
                        downStreamNode = attributes.find('DOWNSTREAM')
......
875 876
                            item[0].attrs.append(('Up Stream', upStreamNode.text))
876 877
                        if downStreamNode is not None:
877 878
                            item[0].attrs.append(('Down Stream', downStreamNode.text))
879
                    """
878 880

  
879 881
                currentPointModeIndex = node.find('CURRENTPOINTMODEINDEX')
880 882
                if currentPointModeIndex is not None:
DTI_PID/DTI_PID/SymbolAttrEditorDialog.py
17 17
import SymbolAttrEditor_UI
18 18

  
19 19
class QSymbolAttrEditorDialog(QDialog):
20
    """
21
    This is symbol attribute editor dialog class
22
    """
23

  
20 24
    def __init__(self, parent, symbolType = None):
21 25
        QDialog.__init__(self, parent)
22 26

  
......
117 121
            attrTypeComboBox = QComboBox()
118 122
            attrTypeComboBox.addItem('Symbol Item')
119 123
            attrTypeComboBox.addItem('Text Item')
124
            attrTypeComboBox.addItem('Comp Item')
120 125
            attrTypeComboBox.addItem('Int')
121 126
            attrTypeComboBox.addItem('String')
122 127
            self.ui.tableWidgetAttr.setCellWidget(row, 3, attrTypeComboBox)
......
169 174
        attrTypeComboBox = QComboBox()
170 175
        attrTypeComboBox.addItem('Symbol Item')
171 176
        attrTypeComboBox.addItem('Text Item')
177
        attrTypeComboBox.addItem('Comp Item')
172 178
        attrTypeComboBox.addItem('Int')
173 179
        attrTypeComboBox.addItem('String')
174 180
        self.ui.tableWidgetAttr.setCellWidget(rows, 3, attrTypeComboBox)

내보내기 Unified diff

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