Graphics/AssociationItem.py

branch
Py2 comp.
changeset 3058
0a02c433f52d
parent 3057
10516539f238
parent 3022
57179e4cdadd
child 3145
a9de05d4a22f
equal deleted inserted replaced
3057:10516539f238 3058:0a02c433f52d
67 elif type == Generalisation: 67 elif type == Generalisation:
68 arrowType = WideArrow 68 arrowType = WideArrow
69 arrowFilled = False 69 arrowFilled = False
70 70
71 E5ArrowItem.__init__(self, QPointF(0, 0), QPointF(100, 100), 71 E5ArrowItem.__init__(self, QPointF(0, 0), QPointF(100, 100),
72 arrowFilled, arrowType, parent) 72 arrowFilled, arrowType, parent)
73 73
74 self.setFlag(QGraphicsItem.ItemIsMovable, False) 74 self.setFlag(QGraphicsItem.ItemIsMovable, False)
75 self.setFlag(QGraphicsItem.ItemIsSelectable, False) 75 self.setFlag(QGraphicsItem.ItemIsSelectable, False)
76 76
77 if topToBottom: 77 if topToBottom:
128 startP = QPointF(rectA.x() + rectA.width() / 2.0, rectA.y()) 128 startP = QPointF(rectA.x() + rectA.width() / 2.0, rectA.y())
129 endP = QPointF(rectB.x() + rectB.width() / 2.0, 129 endP = QPointF(rectB.x() + rectB.width() / 2.0,
130 rectB.y() + rectB.height()) 130 rectB.y() + rectB.height())
131 else: 131 else:
132 startP = QPointF(rectA.x() + rectA.width() / 2.0, 132 startP = QPointF(rectA.x() + rectA.width() / 2.0,
133 rectA.y() + rectA.height()) 133 rectA.y() + rectA.height())
134 endP = QPointF(rectB.x() + rectB.width() / 2.0, rectB.y()) 134 endP = QPointF(rectB.x() + rectB.width() / 2.0, rectB.y())
135 self.setPoints(startP.x(), startP.y(), endP.x(), endP.y()) 135 self.setPoints(startP.x(), startP.y(), endP.x(), endP.y())
136 136
137 def __calculateEndingPoints_center(self): 137 def __calculateEndingPoints_center(self):
138 """ 138 """

eric ide

mercurial