50:a36eecf45b2e | 51:7d80b0f20ca6 |
---|---|
8 """ | 8 """ |
9 | 9 |
10 from PyQt4.QtCore import * | 10 from PyQt4.QtCore import * |
11 from PyQt4.QtGui import * | 11 from PyQt4.QtGui import * |
12 | 12 |
13 from E4Graphics.E4ArrowItem import E4ArrowItem, NormalArrow, WideArrow | 13 from E5Graphics.E5ArrowItem import E5ArrowItem, NormalArrow, WideArrow |
14 | 14 |
15 Normal = 0 | 15 Normal = 0 |
16 Generalisation = 1 | 16 Generalisation = 1 |
17 Imports = 2 | 17 Imports = 2 |
18 | 18 |
25 NorthEast = 6 | 25 NorthEast = 6 |
26 SouthEast = 7 | 26 SouthEast = 7 |
27 SouthWest = 8 | 27 SouthWest = 8 |
28 Center = 9 | 28 Center = 9 |
29 | 29 |
30 class AssociationItem(E4ArrowItem): | 30 class AssociationItem(E5ArrowItem): |
31 """ | 31 """ |
32 Class implementing a graphics item for an association between two items. | 32 Class implementing a graphics item for an association between two items. |
33 | 33 |
34 The association is drawn as an arrow starting at the first items and | 34 The association is drawn as an arrow starting at the first items and |
35 ending at the second. | 35 ending at the second. |
56 arrowFilled = True | 56 arrowFilled = True |
57 elif type == Generalisation: | 57 elif type == Generalisation: |
58 arrowType = WideArrow | 58 arrowType = WideArrow |
59 arrowFilled = False | 59 arrowFilled = False |
60 | 60 |
61 E4ArrowItem.__init__(self, QPointF(0, 0), QPointF(100, 100), | 61 E5ArrowItem.__init__(self, QPointF(0, 0), QPointF(100, 100), |
62 arrowFilled, arrowType, parent) | 62 arrowFilled, arrowType, parent) |
63 | 63 |
64 self.setFlag(QGraphicsItem.ItemIsMovable, False) | 64 self.setFlag(QGraphicsItem.ItemIsMovable, False) |
65 self.setFlag(QGraphicsItem.ItemIsSelectable, False) | 65 self.setFlag(QGraphicsItem.ItemIsSelectable, False) |
66 | 66 |