개정판 26838931
issue #000: package
Change-Id: Ia413b927f86e727d7b32601bf0bf1af9ad00535f
DTI_PID/DTI_PID/LineNoTracer.py | ||
---|---|---|
440 | 440 |
lineNos = [] |
441 | 441 |
spec_breaks = [] |
442 | 442 |
lineIndicator = [] |
443 |
vendor_packages = [item for item in worker.graphicsView.scene.items() if type(item) is QEngineeringVendorItem] |
|
443 |
vendor_packages = [item for item in worker.graphicsView.scene.items() if type(item) is QEngineeringVendorItem and item.type == 'Vendor Package'] |
|
444 |
equip_packages = [item for item in worker.graphicsView.scene.items() if type(item) is QEngineeringVendorItem and item.type == 'Equipment Package'] |
|
444 | 445 |
end_breaks = [] |
445 | 446 |
notes = [] |
446 | 447 |
flow_marks = [] |
... | ... | |
571 | 572 |
|
572 | 573 |
worker.need_update_texts = [] |
573 | 574 |
for text in targetText: |
574 |
ret = text.findOwner(symbols) |
|
575 |
ret = text.findOwner(symbols) if type(text) is not QEngineeringTagNoTextItem else text.findOwner(symbols + equip_packages)
|
|
575 | 576 |
if ret: |
576 | 577 |
worker.need_update_texts.append([text, ret]) |
577 | 578 |
|
DTI_PID/DTI_PID/Shapes/EngineeringEquipmentItem.py | ||
---|---|---|
30 | 30 |
|
31 | 31 |
self._properties = \ |
32 | 32 |
{ \ |
33 |
SymbolProp(None, 'Desc', 'String', Expression="self.desc"): None |
|
33 |
#SymbolProp(None, 'Desc', 'String', Expression="self.desc"): None |
|
34 |
SymbolProp(None, 'Name', 'Text Item', Expression='self.EvaluatedName'): None |
|
34 | 35 |
} |
35 | 36 |
|
36 | 37 |
if QEngineeringEquipmentItem.EQUIP_COLUMN_LIST is None: |
... | ... | |
160 | 161 |
sys.exc_info()[-1].tb_lineno) |
161 | 162 |
App.mainWnd().addMessage.emit(MessageType.Error, message) |
162 | 163 |
|
164 |
@property |
|
165 |
def NameText(self): |
|
166 |
from EngineeringTextItem import QEngineeringTextItem |
|
167 |
|
|
168 |
if self.associations(): |
|
169 |
matches = [assoc for assoc in self.associations() if type(assoc) is QEngineeringTextItem] |
|
170 |
if matches: |
|
171 |
return matches[0].text() |
|
172 |
else: |
|
173 |
matches = [prop for prop, _ in self._properties.items() if prop.Attribute == 'Name'] |
|
174 |
if matches: return self._properties[matches[0]] |
|
175 |
|
|
176 |
return None |
|
177 |
|
|
178 |
@property |
|
179 |
def EvaluatedName(self): |
|
180 |
return self.NameText |
|
181 |
|
|
163 | 182 |
''' |
164 | 183 |
@brief generate xml code for equipment |
165 | 184 |
@author humkyung |
166 | 185 |
@date 2018.05.09 |
167 | 186 |
''' |
168 |
|
|
169 | 187 |
def toXml(self): |
170 | 188 |
from xml.etree.ElementTree import Element, SubElement, dump, ElementTree |
171 | 189 |
|
내보내기 Unified diff