개정판 442e6a43
issue #000: vendor package can be added as connected item
Change-Id: I1647ad6e4e65505e7e8e126e8db68170c4e7b5ce
DTI_PID/DTI_PID/Commands/SelectAttributeCommand.py | ||
---|---|---|
58 | 58 |
from EngineeringValveOperCodeTextItem import QEngineeringValveOperCodeTextItem |
59 | 59 |
from EngineeringConnectorItem import QEngineeringConnectorItem |
60 | 60 |
from EngineeringEndBreakItem import QEngineeringEndBreakItem |
61 |
from EngineeringVendorItem import QEngineeringVendorItem |
|
61 | 62 |
|
62 | 63 |
if self._attr is not None and type(self._attr) is SymbolAttr: |
63 | 64 |
item = self.imageViewer.scene.itemAt(scenePos, QTransform()) |
... | ... | |
65 | 66 |
self._item.conns.clear() |
66 | 67 |
self._item.conns.append(item) |
67 | 68 |
self.onSuccess.emit() |
68 |
elif item is not None and self._attr.AttributeType == 'CONN' and (issubclass(type(item), QEngineeringLineItem) or issubclass(type(item), SymbolSvgItem)): |
|
69 |
elif item is not None and self._attr.AttributeType == 'CONN' and (issubclass(type(item), QEngineeringLineItem) or issubclass(type(item), SymbolSvgItem) or type(item) is QEngineeringVendorItem):
|
|
69 | 70 |
self._item.connectors[self._attr.AttrAt - 1].connect(item, QEngineeringAbstractItem.CONNECTED_AT_BODY) |
70 | 71 |
self.onSuccess.emit() |
71 | 72 |
elif item is not None and self._attr.AttributeType == 'CONN' and (type(item) is QEngineeringConnectorItem): |
DTI_PID/DTI_PID/Shapes/EngineeringVendorItem.py | ||
---|---|---|
185 | 185 |
|
186 | 186 |
self.setPolygon(vendorArea) |
187 | 187 |
|
188 |
def __str__(self): |
|
189 |
return str(self.uid) |
|
190 |
|
|
188 | 191 |
class Transfer(QObject): |
189 | 192 |
onRemoved = pyqtSignal(QGraphicsItem) |
190 | 193 |
|
내보내기 Unified diff