57 @param colors tuple containing the foreground and background colors |
57 @param colors tuple containing the foreground and background colors |
58 @type tuple of (QColor, QColor) |
58 @type tuple of (QColor, QColor) |
59 @param parent reference to the parent object |
59 @param parent reference to the parent object |
60 @type QGraphicsItem |
60 @type QGraphicsItem |
61 """ |
61 """ |
62 super(UMLItem, self).__init__(parent) |
62 super().__init__(parent) |
63 self.model = model |
63 self.model = model |
64 |
64 |
65 if colors is None: |
65 if colors is None: |
66 self._colors = (QColor(Qt.GlobalColor.black), |
66 self._colors = (QColor(Qt.GlobalColor.black), |
67 QColor(Qt.GlobalColor.white)) |
67 QColor(Qt.GlobalColor.white)) |
154 Public overriden method to move the widget relative. |
154 Public overriden method to move the widget relative. |
155 |
155 |
156 @param dx relative movement in x-direction (float) |
156 @param dx relative movement in x-direction (float) |
157 @param dy relative movement in y-direction (float) |
157 @param dy relative movement in y-direction (float) |
158 """ |
158 """ |
159 super(UMLItem, self).moveBy(dx, dy) |
159 super().moveBy(dx, dy) |
160 self.adjustAssociations() |
160 self.adjustAssociations() |
161 |
161 |
162 def setPos(self, x, y): |
162 def setPos(self, x, y): |
163 """ |
163 """ |
164 Public overriden method to set the items position. |
164 Public overriden method to set the items position. |
165 |
165 |
166 @param x absolute x-position (float) |
166 @param x absolute x-position (float) |
167 @param y absolute y-position (float) |
167 @param y absolute y-position (float) |
168 """ |
168 """ |
169 super(UMLItem, self).setPos(x, y) |
169 super().setPos(x, y) |
170 self.adjustAssociations() |
170 self.adjustAssociations() |
171 |
171 |
172 def itemChange(self, change, value): |
172 def itemChange(self, change, value): |
173 """ |
173 """ |
174 Public method called when an items state changes. |
174 Public method called when an items state changes. |