24 @param x x-coordinate (integer) |
24 @param x x-coordinate (integer) |
25 @param y y-coordinate (integer) |
25 @param y y-coordinate (integer) |
26 @param rounded flag indicating a rounded corner (boolean) |
26 @param rounded flag indicating a rounded corner (boolean) |
27 @keyparam parent reference to the parent object (QGraphicsItem) |
27 @keyparam parent reference to the parent object (QGraphicsItem) |
28 """ |
28 """ |
29 QGraphicsRectItem.__init__(self, parent) |
29 super().__init__(parent) |
30 self.font = Preferences.getGraphics("Font") |
30 self.font = Preferences.getGraphics("Font") |
31 self.margin = 5 |
31 self.margin = 5 |
32 self.associations = [] |
32 self.associations = [] |
33 self.shouldAdjustAssociations = False |
33 self.shouldAdjustAssociations = False |
34 |
34 |
99 Overriden method to move the widget relative. |
99 Overriden method to move the widget relative. |
100 |
100 |
101 @param dx relative movement in x-direction (float) |
101 @param dx relative movement in x-direction (float) |
102 @param dy relative movement in y-direction (float) |
102 @param dy relative movement in y-direction (float) |
103 """ |
103 """ |
104 QGraphicsRectItem.moveBy(self, dx, dy) |
104 super().moveBy(dx, dy) |
105 self.adjustAssociations() |
105 self.adjustAssociations() |
106 |
106 |
107 def setPos(self, x, y): |
107 def setPos(self, x, y): |
108 """ |
108 """ |
109 Overriden method to set the items position. |
109 Overriden method to set the items position. |
110 |
110 |
111 @param x absolute x-position (float) |
111 @param x absolute x-position (float) |
112 @param y absolute y-position (float) |
112 @param y absolute y-position (float) |
113 """ |
113 """ |
114 QGraphicsRectItem.setPos(self, x, y) |
114 super().setPos(x, y) |
115 self.adjustAssociations() |
115 self.adjustAssociations() |
116 |
116 |
117 def itemChange(self, change, value): |
117 def itemChange(self, change, value): |
118 """ |
118 """ |
119 Protected method called when an items state changes. |
119 Protected method called when an items state changes. |