개정판 47e4a29d
issue #503: equip area ongoing
Change-Id: I7dee7f896ffcdec4ec717c955087374b9aee8476
DTI_PID/DTI_PID/Scripts/MSSQL/ID2.sql | ||
---|---|---|
129 | 129 |
INSERT INTO SymbolType |
130 | 130 |
(UID, Category, "Type") |
131 | 131 |
VALUES(38, 'Piping', 'End Break'); |
132 |
INSERT INTO SymbolType |
|
133 |
(UID, Category, "Type") |
|
134 |
VALUES(39, 'Package', 'Package'); |
|
132 | 135 |
|
133 | 136 |
CREATE TABLE SymbolName ( |
134 | 137 |
UID INTEGER NOT NULL |
... | ... | |
1506 | 1509 |
(UID, SymbolType_UID, "Attribute", DisplayAttribute, AttributeType, Expression, "index", AttrAt, "Length", Target, Property) |
1507 | 1510 |
VALUES('2dda2e01-ad37-4ff3-a4d1-0fbf54944d7b', '19', 'SP Tag', 'SP Tag', 'Text Item', 'item.text()', 6, 1, NULL, 'ALL', 0); |
1508 | 1511 |
|
1509 |
|
|
1510 | 1512 |
CREATE TABLE Attributes ( |
1511 | 1513 |
UID VARCHAR (37) PRIMARY KEY, |
1512 | 1514 |
Components_UID VARCHAR (37) NOT NULL |
DTI_PID/DTI_PID/Shapes/EngineeringAbstractItem.py | ||
---|---|---|
279 | 279 |
_attrs[attr] = eval(attr.Expression) if attr.Expression else '' |
280 | 280 |
else: |
281 | 281 |
_attrs[attr] = '' |
282 |
elif attr.AttributeType == 'Size Text Item': |
|
282 |
elif attr.AttributeType == 'Size Text Item' or attr.AttributeType == 'Tag No':
|
|
283 | 283 |
at = int(attr.AttrAt) |
284 | 284 |
items = [text for text in _texts if QEngineeringAbstractItem.assoc_type(text) == attr.AttributeType] |
285 | 285 |
if not attr.AssocItem and len(items) > at: |
... | ... | |
300 | 300 |
_attrs[attr] = eval(attr.Expression) if attr.Expression else '' |
301 | 301 |
else: |
302 | 302 |
_attrs[attr] = '' |
303 |
elif attr.AttributeType == 'Tag No': |
|
304 |
_attrs[attr] = eval(attr.Expression) if attr.Expression and not _attrs[attr] else _attrs[attr] |
|
303 |
#elif attr.AttributeType == 'Tag No':
|
|
304 |
# _attrs[attr] = eval(attr.Expression) if attr.Expression and not _attrs[attr] else _attrs[attr]
|
|
305 | 305 |
elif attr.AttributeType == 'String': |
306 | 306 |
_attrs[attr] = attr.Expression if attr.Expression and not _attrs[attr] else _attrs[attr] |
307 | 307 |
|
DTI_PID/DTI_PID/Shapes/EngineeringEquipmentItem.py | ||
---|---|---|
31 | 31 |
self._properties = \ |
32 | 32 |
{ \ |
33 | 33 |
#SymbolProp(None, 'Desc', 'String', Expression="self.desc"): None |
34 |
SymbolProp(None, 'Name', 'Text Item', Expression='self.EvaluatedName'): None
|
|
34 |
SymbolProp(None, 'Name', 'Tag No', Expression='self.EvaluatedName'): None
|
|
35 | 35 |
} |
36 | 36 |
|
37 | 37 |
''' |
... | ... | |
165 | 165 |
|
166 | 166 |
@property |
167 | 167 |
def NameText(self): |
168 |
from EngineeringTextItem import QEngineeringTextItem |
|
168 |
#from EngineeringTextItem import QEngineeringTextItem |
|
169 |
from QEngineeringTagNoTextItem import QEngineeringTagNoTextItem |
|
169 | 170 |
|
170 | 171 |
if self.associations(): |
171 |
matches = [assoc for assoc in self.associations() if type(assoc) is QEngineeringTextItem] |
|
172 |
matches = [assoc for assoc in self.associations() if type(assoc) is QEngineeringTagNoTextItem]
|
|
172 | 173 |
if matches: |
173 | 174 |
return matches[0].text() |
174 | 175 |
else: |
DTI_PID/DTI_PID/Shapes/EngineeringLineNoTextItem.py | ||
---|---|---|
37 | 37 |
|
38 | 38 |
QEngineeringTextItem.__init__(self, uid, parent) |
39 | 39 |
|
40 |
self._properties = {SymbolProp(None, 'From', 'Comp Item'):None, SymbolProp(None, 'To', 'Comp Item'):None, SymbolProp(None, 'Freeze', 'Boolean'):False} |
|
40 |
self._properties = {SymbolProp(None, 'From', 'Comp Item'):None, SymbolProp(None, 'To', 'Comp Item'):None}#, SymbolProp(None, 'Freeze', 'Boolean'):False}
|
|
41 | 41 |
self._runs = [] |
42 | 42 |
|
43 | 43 |
""" create freeze control """ |
DTI_PID/DTI_PID/Shapes/EngineeringVendorItem.py | ||
---|---|---|
41 | 41 |
self.setColor(self._color if pack_type == 'Vendor Package' else QEngineeringVendorItem.EQUIPMENT_PACKAGE_COLOR) |
42 | 42 |
self._savedColor = None |
43 | 43 |
|
44 |
#self._properties = {SymbolProp(None, 'Name', 'Text Item', Expression='self.EvaluatedName'): None}
|
|
45 |
self._properties = {} |
|
44 |
self._properties = {SymbolProp(None, 'Name', 'Tag No', Expression='self.EvaluatedName'): None}
|
|
45 |
#self._properties = {}
|
|
46 | 46 |
self._pack_type = pack_type |
47 | 47 |
|
48 | 48 |
self.setFlags(QGraphicsItem.ItemIsSelectable | QGraphicsItem.ItemIsFocusable) |
... | ... | |
219 | 219 |
rect = self.sceneBoundingRect() |
220 | 220 |
param = [ |
221 | 221 |
(str(self.uid), str(app_doc_data.activeDrawing.UID), rect.x(), rect.y(), rect.width(), rect.height(), 0, |
222 |
self.area, self.type, str(self.owner) if self.owner else None, |
|
222 |
self.area, self.pack_type, str(self.owner) if self.owner else None,
|
|
223 | 223 |
str(self.special_item_type) if self.special_item_type else None)] |
224 | 224 |
sql = 'insert into Components({}) values({})'.format(','.join(cols), ','.join(values)) |
225 | 225 |
res.append((sql, tuple(param))) |
... | ... | |
288 | 288 |
|
289 | 289 |
try: |
290 | 290 |
node = Element('VENDOR') |
291 |
node.attrib['Type'] = self.type |
|
291 |
node.attrib['Type'] = self.pack_type
|
|
292 | 292 |
uidNode = Element('UID') |
293 | 293 |
uidNode.text = str(self.uid) |
294 | 294 |
node.append(uidNode) |
... | ... | |
393 | 393 |
""" set property with given value """ |
394 | 394 |
if issubclass(type(value), QEngineeringAbstractItem): |
395 | 395 |
self.add_assoc_item(value, 0) |
396 |
else: |
|
397 |
self._associations.clear() |
|
398 | 396 |
matches = [prop for prop, _ in self._properties.items() if prop.Attribute == property] |
399 | 397 |
if matches: self._properties[matches[0]] = value |
400 | 398 |
|
DTI_PID/DTI_PID/SymbolEditorDialog.py | ||
---|---|---|
275 | 275 |
self.ui.immediateInsertCheckBox.setDisabled(True) |
276 | 276 |
|
277 | 277 |
self.ui.nameLineEdit.setText(self.selectedSymbol.getName()) |
278 |
self.ui.spinBoxThreshold.setValue(int(self.selectedSymbol.getThreshold() * 100))
|
|
278 |
self.ui.spinBoxThreshold.setValue(round(self.selectedSymbol.getThreshold() * 100))
|
|
279 | 279 |
self.ui.minMatchPointLineEdit.setText(str(self.selectedSymbol.getMinMatchCount())) |
280 | 280 |
self.ui.rotationCountSpinBox.setValue(self.selectedSymbol.getRotationCount() * 90) |
281 | 281 |
self.ui.isContainChildCheckBox.setChecked(True if self.selectedSymbol.getIsContainChild() else False) |
내보내기 Unified diff