프로젝트

일반

사용자정보

개정판 064816ac

ID064816acee4683f45ded32a33c12fa48b5080942
상위 cdea96b5
하위 1e2a12f9, 17e67b4f

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

issue #563: line no eq from to manual setup testing, line no tracer not yet

Change-Id: I5b4a725e0db1f3bfa6a4b05acb3cca670c5a7844

차이점 보기:

DTI_PID/DTI_PID/Commands/SelectAttributeCommand.py
90 90
                    elif item is not None and (type(self._item) is QEngineeringEndBreakItem or issubclass(type(self._item), QEngineeringTextItem)) and (type(item) is QEngineeringLineItem or issubclass(type(item), SymbolSvgItem)) and self._attr.AttributeType == 'OWNER':
91 91
                        self._item.owner = item
92 92
                        self.onSuccess.emit()
93
                    elif item is not None and (self._attr.AttributeType == QEngineeringAbstractItem.assoc_type(item) or (self._attr.AttributeType == 'Comp Item' and (QEngineeringAbstractItem.assoc_type(item) == 'Symbol Item' or QEngineeringAbstractItem.assoc_type(item) == 'Line Item'))):
93
                    elif item is not None and (self._attr.AttributeType == QEngineeringAbstractItem.assoc_type(item) or \
94
                                                (self._attr.AttributeType == 'Comp Item' and (QEngineeringAbstractItem.assoc_type(item) == 'Symbol Item' or QEngineeringAbstractItem.assoc_type(item) == 'Line Item')) or \
95
                                                (self._attr.AttributeType == 'EQ Item' and QEngineeringAbstractItem.assoc_type(item) == 'EQ Item')):
94 96
                        if self._attr.Freeze:
95 97
                            self.onSuccess.emit()
96 98
                            return
DTI_PID/DTI_PID/ItemPropertyTableWidget.py
786 786
                item = QTableWidgetItem(key.DisplayAttribute if key.DisplayAttribute else key.Attribute)
787 787
                item.setFlags(Qt.ItemIsEnabled)
788 788
                #item.setBackground(Qt.lightGray)
789
                item.tag = key
789
                item.setData(Qt.UserRole, key)
790 790
                self.setItem(row, 1, item)
791 791

  
792 792
                """ show icon item """
......
825 825
                        self.streamNoComboBox.addItem(streamNo)
826 826
                    self.setCellWidget(row, 3, self.streamNoComboBox)
827 827
                    self.streamNoComboBox.setCurrentText(value)
828
                    
829
                self.setItem(row, 3, valueCell)
828
                else:
829
                    self.setItem(row, 3, valueCell)
830 830

  
831 831
                row = row + 1
832 832

  
......
870 870
            if selectedIndexes and selectedIndexes[0].column() == 3 and self.item(selectedIndexes[0].row(), 1).text() == 'OWNER':
871 871
                items[0].owner = None
872 872
                self.show_item_property(items[0])
873
            elif len(items) == 1 and len(selectedIndexes) == 1 and (type(items[0]) is QEngineeringLineItem or issubclass(type(items[0]), SymbolSvgItem)):
873
            elif len(items) == 1 and len(selectedIndexes) == 1 and (type(items[0]) is QEngineeringLineItem or issubclass(type(items[0]), SymbolSvgItem) or \
874
                        type(items[0]) is QEngineeringLineNoTextItem or type(items[0]) is QEngineeringVendorItem):
874 875
                key_cell = self.item(selectedIndexes[0].row(), 1)
875 876
                data = key_cell.data(Qt.UserRole)
876 877
                if selectedIndexes[0].column() == 3 and key_cell.text().find('CONN') is 0:
DTI_PID/DTI_PID/Scripts/MSSQL/ID2.sql
1516 1516
VALUES('a0b800a7-bb02-458c-8a06-061c86c24b5c', '39', 'Name', 'Name', 'Tag No', 'self.EvaluatedName', 0, 0, NULL, 'ALL', 1);
1517 1517
INSERT INTO SymbolAttribute
1518 1518
(UID, SymbolType_UID, "Attribute", DisplayAttribute, AttributeType, Expression, "index", AttrAt, "Length", Target, Property)
1519
VALUES('d50c31b9-595f-4f4c-a2bd-afc6d8112b86', '40', 'From_eq', 'From_eq', 'Symbol Item', 'item.EvaluatedName', 0, 0, NULL, 'ALL', 1);
1519
VALUES('d50c31b9-595f-4f4c-a2bd-afc6d8112b86', '40', 'From_eq', 'From_eq', 'EQ Item', 'item.EvaluatedName', 0, 0, NULL, 'ALL', 1);
1520 1520
INSERT INTO SymbolAttribute
1521 1521
(UID, SymbolType_UID, "Attribute", DisplayAttribute, AttributeType, Expression, "index", AttrAt, "Length", Target, Property)
1522
VALUES('83ffef92-3c94-47ce-a6ec-737ba4a79a93', '40', 'To_eq', 'To_eq', 'Symbol Item', 'item.EvaluatedName', 1, 1, NULL, 'ALL', 1);
1522
VALUES('83ffef92-3c94-47ce-a6ec-737ba4a79a93', '40', 'To_eq', 'To_eq', 'EQ Item', 'item.EvaluatedName', 1, 1, NULL, 'ALL', 1);
1523 1523

  
1524 1524
CREATE TABLE Attributes (
1525 1525
    UID                 VARCHAR (37) PRIMARY KEY,
DTI_PID/DTI_PID/Shapes/EngineeringAbstractItem.py
293 293
                    else:
294 294
                        item = attr.AssocItem = self.get_assoc_item(attr.AssocItem)
295 295
                        _attrs[attr] = eval(attr.Expression) if attr.Expression and ((item and 'item' in attr.Expression) or 'self' in attr.Expression) else ''
296
                elif attr.AttributeType == 'Symbol Item' or attr.AttributeType == 'Line Item' or attr.AttributeType == 'Comp Item':
296
                elif attr.AttributeType == 'Symbol Item' or attr.AttributeType == 'Line Item' or attr.AttributeType == 'Comp Item' or attr.AttributeType == 'EQ Item':
297 297
                    at = int(attr.AttrAt)
298 298
                    if not attr.AssocItem and len(_symbols) > at:
299 299
                        attr.AssocItem = _symbols[at]
......
344 344
        from QEngineeringSizeTextItem import QEngineeringSizeTextItem
345 345
        from QEngineeringTagNoTextItem import QEngineeringTagNoTextItem
346 346
        from EngineeringLineItem import QEngineeringLineItem
347
        from EngineeringEquipmentItem import QEngineeringEquipmentItem
348
        from EngineeringVendorItem import QEngineeringVendorItem
347 349

  
348 350
        _type = None
349 351

  
......
355 357
            _type = 'Tag No'
356 358
        elif type(item) is QEngineeringTextItem or issubclass(type(item), QEngineeringTextItem):
357 359
            _type = 'Text Item'
360
        elif type(item) is QEngineeringEquipmentItem or type(item) is QEngineeringVendorItem:
361
            _type = 'EQ Item'
358 362
        elif type(item) is SymbolSvgItem or issubclass(type(item), SymbolSvgItem):
359 363
            _type = 'Symbol Item'
360 364
        elif type(item) is QEngineeringLineItem:
DTI_PID/DTI_PID/SymbolAttr.py
28 28
        from EngineeringAbstractItem import QEngineeringAbstractItem
29 29
        from SymbolSvgItem import SymbolSvgItem
30 30
        from EngineeringLineItem import QEngineeringLineItem
31
        from EngineeringEquipmentItem import QEngineeringEquipmentItem
32
        from EngineeringVendorItem import QEngineeringVendorItem
31 33

  
32 34
        if self.AttributeType == 'Comp Item':
33 35
            return issubclass(type(item), SymbolSvgItem) or type(item) is QEngineeringLineItem
36
        if self.AttributeType == 'EQ Item':
37
            return type(item) is QEngineeringEquipmentItem or type(item) is QEngineeringVendorItem
34 38
        elif self.AttributeType == QEngineeringAbstractItem.assoc_type(item):
35 39
            return True
36 40

  
DTI_PID/DTI_PID/SymbolAttrEditorDialog.py
19 19
class QSymbolAttrEditorDialog(QDialog):
20 20
    """ This is symbol attribute editor dialog class """
21 21
    
22
    SYMBOL_ATTR_DATA_TYPES = {'Symbol Item':-1, 'Size Text Item':-1, 'Text Item':-1, 'Tag No':-1, 'Valve Oper Code':-1, 'Line Item':-1, 'Comp Item':-1, 'Int':1, 'String':1}
22
    SYMBOL_ATTR_DATA_TYPES = {'Symbol Item':-1, 'Size Text Item':-1, 'Text Item':-1, 'Tag No':-1, 'Valve Oper Code':-1, 'Line Item':-1, 'Comp Item':-1, 'EQ Item':-1, 'Int':1, 'String':1}
23 23
    LINE_NO_ATTR_TYPES = ['Code Table', 'Int', 'String', 'Symbol']
24 24

  
25 25
    def __init__(self, parent, symbolType = None):

내보내기 Unified diff

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