Graphics/AssociationItem.py

changeset 3022
57179e4cdadd
parent 2992
dbdf27746da5
child 3058
0a02c433f52d
child 3160
209a07d7e401
equal deleted inserted replaced
3021:801289962f4e 3022:57179e4cdadd
65 elif type == Generalisation: 65 elif type == Generalisation:
66 arrowType = WideArrow 66 arrowType = WideArrow
67 arrowFilled = False 67 arrowFilled = False
68 68
69 E5ArrowItem.__init__(self, QPointF(0, 0), QPointF(100, 100), 69 E5ArrowItem.__init__(self, QPointF(0, 0), QPointF(100, 100),
70 arrowFilled, arrowType, parent) 70 arrowFilled, arrowType, parent)
71 71
72 self.setFlag(QGraphicsItem.ItemIsMovable, False) 72 self.setFlag(QGraphicsItem.ItemIsMovable, False)
73 self.setFlag(QGraphicsItem.ItemIsSelectable, False) 73 self.setFlag(QGraphicsItem.ItemIsSelectable, False)
74 74
75 if topToBottom: 75 if topToBottom:
126 startP = QPointF(rectA.x() + rectA.width() / 2.0, rectA.y()) 126 startP = QPointF(rectA.x() + rectA.width() / 2.0, rectA.y())
127 endP = QPointF(rectB.x() + rectB.width() / 2.0, 127 endP = QPointF(rectB.x() + rectB.width() / 2.0,
128 rectB.y() + rectB.height()) 128 rectB.y() + rectB.height())
129 else: 129 else:
130 startP = QPointF(rectA.x() + rectA.width() / 2.0, 130 startP = QPointF(rectA.x() + rectA.width() / 2.0,
131 rectA.y() + rectA.height()) 131 rectA.y() + rectA.height())
132 endP = QPointF(rectB.x() + rectB.width() / 2.0, rectB.y()) 132 endP = QPointF(rectB.x() + rectB.width() / 2.0, rectB.y())
133 self.setPoints(startP.x(), startP.y(), endP.x(), endP.y()) 133 self.setPoints(startP.x(), startP.y(), endP.x(), endP.y())
134 134
135 def __calculateEndingPoints_center(self): 135 def __calculateEndingPoints_center(self):
136 """ 136 """

eric ide

mercurial