개정판 88c56bef
issue #000: add symbol move
Change-Id: I6dbfffa0720b963e8c184aece15fcf7dde4766f9
DTI_PID/DTI_PID/Shapes/SymbolSvgItem.py | ||
---|---|---|
813 | 813 |
''' |
814 | 814 |
def mouseDoubleClickEvent(self, event): |
815 | 815 |
from RotateSymbolDialog import QRotateSymbolDialog |
816 |
dialog = QRotateSymbolDialog(None, self.angle) |
|
817 |
(isAccept, angle) = dialog.showDialog() |
|
816 |
dialog = QRotateSymbolDialog(None, self.angle, self.loc)
|
|
817 |
(isAccept, angle, x, y) = dialog.showDialog()
|
|
818 | 818 |
|
819 | 819 |
if isAccept: |
820 |
self.rotateSymbol(angle) |
|
820 |
self.angle = angle |
|
821 |
self.loc = [x, y] |
|
822 |
self.origin = [x + self.symbolOrigin[0], y + self.symbolOrigin[1]] |
|
823 |
scene = self.scene() |
|
824 |
scene.removeItem(self) |
|
825 |
self.addSvgItemToScene(scene) |
|
826 |
|
|
827 |
self.reSettingConnetors() |
|
821 | 828 |
|
822 | 829 |
''' |
823 | 830 |
@brief get attribute |
... | ... | |
1480 | 1487 |
transform.translate(-self.size[0], 0) |
1481 | 1488 |
|
1482 | 1489 |
self.setTransform(transform) |
1490 |
self.reSettingConnetors() |
|
1491 |
|
|
1492 |
def reSettingConnetors(self): |
|
1493 |
for conn in self.connectors: |
|
1494 |
conn.sceneConnectPoint = (conn.sceneBoundingRect().center().x(), conn.sceneBoundingRect().center().y()) |
|
1483 | 1495 |
|
1484 | 1496 |
from EngineeringLineItem import QEngineeringLineItem |
1485 | 1497 |
for connector in self.connectors: |
1486 | 1498 |
if connector.connectedItem is not None and type(connector.connectedItem) == QEngineeringLineItem: |
1487 | 1499 |
line = connector.connectedItem |
1488 | 1500 |
line.reDrawLine(self, connector.center()) |
1489 |
|
|
1490 |
for conn in self.connectors: |
|
1491 |
conn.sceneConnectPoint = (conn.sceneBoundingRect().center().x(), conn.sceneBoundingRect().center().y()) |
|
1501 |
line.update_arrow() |
|
1492 | 1502 |
|
1493 | 1503 |
''' |
1494 | 1504 |
@brief change Conn point |
내보내기 Unified diff