--- a/eric6/Graphics/UMLItem.py Tue May 04 19:30:25 2021 +0200 +++ b/eric6/Graphics/UMLItem.py Tue May 04 20:03:40 2021 +0200 @@ -22,7 +22,8 @@ """ Constructor - @param name package name (string) + @param name package name + @type str """ self.name = name @@ -30,7 +31,8 @@ """ Public method to retrieve the model name. - @return model name (string) + @return model name + @rtype str """ return self.name @@ -91,7 +93,8 @@ """ Public method to retrieve the item name. - @return item name (string) + @return item name + @rtype str """ if self.model: return self.model.name @@ -102,8 +105,10 @@ """ Public method to set the rectangles size. - @param width width of the rectangle (float) - @param height height of the rectangle (float) + @param width width of the rectangle + @type float + @param height height of the rectangle + @type float """ rect = self.rect() rect.setSize(QSizeF(width, height)) @@ -113,7 +118,8 @@ """ Public method to add an association to this widget. - @param assoc association to be added (AssociationWidget) + @param assoc association to be added + @type AssociationWidget """ if assoc and assoc not in self.associations: self.associations.append(assoc) @@ -122,7 +128,8 @@ """ Public method to remove an association to this widget. - @param assoc association to be removed (AssociationWidget) + @param assoc association to be removed + @type AssociationWidget """ if assoc and assoc in self.associations: self.associations.remove(assoc) @@ -149,8 +156,10 @@ """ Public overriden method to move the widget relative. - @param dx relative movement in x-direction (float) - @param dy relative movement in y-direction (float) + @param dx relative movement in x-direction + @type float + @param dy relative movement in y-direction + @type float """ super().moveBy(dx, dy) self.adjustAssociations() @@ -159,8 +168,10 @@ """ Public overriden method to set the items position. - @param x absolute x-position (float) - @param y absolute y-position (float) + @param x absolute x-position + @type float + @param y absolute y-position + @type float """ super().setPos(x, y) self.adjustAssociations() @@ -169,7 +180,8 @@ """ Public method called when an items state changes. - @param change the item's change (QGraphicsItem.GraphicsItemChange) + @param change the item's change + @type QGraphicsItem.GraphicsItemChange @param value the value of the change @return adjusted values """ @@ -191,9 +203,12 @@ """ Public method to paint the item in local coordinates. - @param painter reference to the painter object (QPainter) - @param option style options (QStyleOptionGraphicsItem) - @param widget optional reference to the widget painted on (QWidget) + @param painter reference to the painter object + @type QPainter + @param option style options + @type QStyleOptionGraphicsItem + @param widget optional reference to the widget painted on + @type QWidget """ pen = self.pen() if ( @@ -213,7 +228,8 @@ """ Public method to assign an ID to the item. - @param itemId assigned ID (integer) + @param itemId assigned ID + @type int """ self.__id = itemId @@ -221,7 +237,8 @@ """ Public method to get the item ID. - @return ID of the item (integer) + @return ID of the item + @rtype int """ return self.__id @@ -229,7 +246,8 @@ """ Public method to get the item's type. - @return item type (string) + @return item type + @rtype str """ return self.ItemType @@ -241,7 +259,8 @@ "attribute=value" with pairs separated by ", ". value must not contain ", " or newlines. - @return persistence data (string) + @return persistence data + @rtype str """ return "" @@ -249,8 +268,11 @@ """ Public method to parse the given persistence data. - @param version version of the data (string) - @param data persisted data to be parsed (string) - @return flag indicating success (boolean) + @param version version of the data + @type str + @param data persisted data to be parsed + @type str + @return flag indicating success + @rtype bool """ return True