개정판 26f1c12b
issue #000: add line item type
Change-Id: I203b2ab7977673f655818044c6150aad3a6efd72
DTI_PID/DTI_PID/AppDocData.py | ||
---|---|---|
868 | 868 |
cursor.execute(sql) |
869 | 869 |
|
870 | 870 |
for titleBlockProp in titleBlockProps: |
871 |
sql = "insert into TitleBlockProperties values(?,?,?)"
|
|
871 |
sql = self.project.database.to_sql("insert into [TitleBlockProperties]([UID], [NAME], [AREA]) values(?,?,?)")
|
|
872 | 872 |
param = (titleBlockProp[0], titleBlockProp[1], titleBlockProp[2]) # uid, name, area |
873 | 873 |
cursor.execute(sql, param) |
874 | 874 |
conn.commit() |
DTI_PID/DTI_PID/Commands/SelectAttributeCommand.py | ||
---|---|---|
63 | 63 |
|
64 | 64 |
if self._attr is not None and type(self._attr) is SymbolAttr: |
65 | 65 |
item = self.imageViewer.scene.itemAt(scenePos, QTransform()) |
66 |
if item is not None and self._attr.AttributeType == 'Line Item' and issubclass(type(item), QEngineeringLineItem): |
|
66 |
if False:#item is not None and self._attr.AttributeType == 'Line Item' and issubclass(type(item), QEngineeringLineItem): |
|
67 |
# unused code |
|
67 | 68 |
self._item.conns.clear() |
68 | 69 |
self._item.conns.append(item) |
69 | 70 |
self.onSuccess.emit() |
... | ... | |
89 | 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': |
90 | 91 |
self._item.owner = item |
91 | 92 |
self.onSuccess.emit() |
92 |
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')):
|
|
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 | 94 |
if self._attr.Freeze: |
94 | 95 |
self.onSuccess.emit() |
95 | 96 |
return |
DTI_PID/DTI_PID/ItemPropertyTableWidget.py | ||
---|---|---|
927 | 927 |
elif self.item(row, column).flags() != Qt.ItemIsEnabled: |
928 | 928 |
self.editItem(self.item(row, column)) |
929 | 929 |
elif keyCell.text() == 'CONN' and type(items[0]) is QEngineeringLineNoTextItem: |
930 |
# unused code |
|
930 | 931 |
from SymbolAttr import SymbolAttr |
931 | 932 |
attr = SymbolAttr() |
932 | 933 |
attr.AttributeType = "Line Item" |
DTI_PID/DTI_PID/Shapes/EngineeringAbstractItem.py | ||
---|---|---|
275 | 275 |
else: |
276 | 276 |
item = attr.AssocItem = self.get_assoc_item(attr.AssocItem) |
277 | 277 |
_attrs[attr] = eval(attr.Expression) if attr.Expression and ((item and 'item' in attr.Expression) or 'self' in attr.Expression) else '' |
278 |
elif attr.AttributeType == 'Symbol Item' or attr.AttributeType == 'Comp Item': |
|
278 |
elif attr.AttributeType == 'Symbol Item' or attr.AttributeType == 'Line Item' or attr.AttributeType == 'Comp Item':
|
|
279 | 279 |
at = int(attr.AttrAt) |
280 | 280 |
if not attr.AssocItem and len(_symbols) > at: |
281 | 281 |
attr.AssocItem = _symbols[at] |
... | ... | |
339 | 339 |
_type = 'Text Item' |
340 | 340 |
elif type(item) is SymbolSvgItem or issubclass(type(item), SymbolSvgItem): |
341 | 341 |
_type = 'Symbol Item' |
342 |
elif type(item) is QEngineeringLineItem: |
|
343 |
_type = 'Line Item' |
|
342 | 344 |
elif issubclass(type(item), SymbolSvgItem) or type(item) is QEngineeringLineItem: |
343 | 345 |
_type = 'Comp Item' |
344 | 346 |
|
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, '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, '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