eric6/Graphics/AssociationItem.py

changeset 8287
30eb7bc13d63
parent 8270
6ba3564b7161
child 8291
3d79b1e5bf3c
--- a/eric6/Graphics/AssociationItem.py	Mon May 03 19:42:27 2021 +0200
+++ b/eric6/Graphics/AssociationItem.py	Mon May 03 19:58:28 2021 +0200
@@ -107,8 +107,10 @@
         Private method to map item's rectangle to this item's coordinate
         system.
         
-        @param item reference to the item to be mapped (QGraphicsRectItem)
-        @return item's rectangle in local coordinates (QRectF)
+        @param item reference to the item to be mapped
+        @type QGraphicsRectItem
+        @return item's rectangle in local coordinates
+        @rtype QRectF
         """
         rect = item.rect()
         tl = self.mapFromItem(item, rect.topLeft())
@@ -260,9 +262,12 @@
         Private method to find out, which region of rectangle rect contains
         the point (PosX, PosY) and returns the region number.
         
-        @param rect rectangle to calculate the region for (QRectF)
-        @param posX x position of point (float)
-        @param posY y position of point (float)
+        @param rect rectangle to calculate the region for
+        @type QRectF
+        @param posX x position of point
+        @type float
+        @param posY y position of point
+        @type float
         @return the calculated region number<br />
             West = Region 1<br />
             North = Region 2<br />
@@ -273,6 +278,7 @@
             SouthEast = On diagonal 2 between Region 3 and 4<br />
             SouthWest = On diagonal 1 between Region4 and 1<br />
             Center = On diagonal 1 and On diagonal 2 (the center)<br />
+        @rtype AssociationPointRegion
         """
         w = rect.width()
         h = rect.height()
@@ -330,8 +336,10 @@
         """
         Private method to update an endpoint.
         
-        @param region the region for the endpoint (integer)
-        @param isWidgetA flag indicating update for itemA is done (boolean)
+        @param region the region for the endpoint
+        @type AssociationPointRegion
+        @param isWidgetA flag indicating update for itemA is done
+        @type bool
         """
         if region == AssociationPointRegion.NO_REGION:
             return
@@ -371,13 +379,17 @@
         
     def __findRectIntersectionPoint(self, item, p1, p2):
         """
-        Private method to find the intersetion point of a line with a
+        Private method to find the intersection point of a line with a
         rectangle.
         
         @param item item to check against
-        @param p1 first point of the line (QPointF)
-        @param p2 second point of the line (QPointF)
-        @return the intersection point (QPointF)
+        @type UMLItem
+        @param p1 first point of the line
+        @type QPointF
+        @param p2 second point of the line
+        @type QPointF
+        @return the intersection point
+        @rtype QPointF
         """
         rect = self.__mapRectFromItem(item)
         lines = [
@@ -419,11 +431,16 @@
         In order for the linear function calculations to work in this method
         we must switch x and y values (x values become y values and viceversa)
         
-        @param p1 first point of first line (QPointF)
-        @param p2 second point of first line (QPointF)
-        @param p3 first point of second line (QPointF)
-        @param p4 second point of second line (QPointF)
-        @return the intersection point (QPointF)
+        @param p1 first point of first line
+        @type QPointF
+        @param p2 second point of first line
+        @type QPointF
+        @param p3 first point of second line
+        @type QPointF
+        @param p4 second point of second line
+        @type QPointF
+        @return the intersection point
+        @rtype QPointF
         """
         x1 = p1.y()
         y1 = p1.x()
@@ -545,7 +562,8 @@
         This string should be built like "attribute=value" with pairs separated
         by ", ". value must not contain ", " or newlines.
         
-        @return persistence data (string)
+        @return persistence data
+        @rtype str
         """
         entries = [
             "src={0}".format(self.itemA.getId()),
@@ -560,10 +578,12 @@
         """
         Class method to parse the given persistence data.
         
-        @param data persisted data to be parsed (string)
+        @param data persisted data to be parsed
+        @type str
         @return tuple with the IDs of the source and destination items,
             the association type and a flag indicating to associate from top
-            to bottom (integer, integer, integer, boolean)
+            to bottom
+        @rtype tuple of (int, int, int, bool)
         """
         src = -1
         dst = -1

eric ide

mercurial