src/eric7/EricGraphics/EricGraphicsView.py

branch
eric7
changeset 10423
299802979277
parent 10373
093dcebe5ecb
child 10439
21c28b0f9e41
--- a/src/eric7/EricGraphics/EricGraphicsView.py	Tue Dec 19 11:04:03 2023 +0100
+++ b/src/eric7/EricGraphics/EricGraphicsView.py	Tue Dec 19 19:57:08 2023 +0100
@@ -63,8 +63,10 @@
         """
         Constructor
 
-        @param scene reference to the scene object (QGraphicsScene)
-        @param parent parent widget (QWidget)
+        @param scene reference to the scene object
+        @type QGraphicsScene
+        @param parent parent widget
+        @type QWidget
         """
         super().__init__(scene, parent)
         self.setObjectName("EricGraphicsView")
@@ -139,8 +141,10 @@
         """
         Private method determining the zoom level index given a zoom factor.
 
-        @param zoom zoom factor (integer)
-        @return index of zoom factor (integer)
+        @param zoom zoom factor
+        @type int
+        @return index of zoom factor
+        @rtype int
         """
         try:
             index = EricGraphicsView.ZoomLevels.index(zoom)
@@ -176,7 +180,8 @@
         """
         Public method to set the zoom value in percent.
 
-        @param value zoom value in percent (integer)
+        @param value zoom value in percent
+        @type int
         """
         if value != self.zoom():
             self.resetTransform()
@@ -188,7 +193,8 @@
         """
         Public method to get the current zoom factor in percent.
 
-        @return current zoom factor in percent (integer)
+        @return current zoom factor in percent
+        @rtype int
         """
         return int(self.transform().m11() * 100.0)
 
@@ -196,8 +202,10 @@
         """
         Public method to resize the scene.
 
-        @param amount size increment (integer)
-        @param isWidth flag indicating width is to be resized (boolean)
+        @param amount size increment
+        @type int
+        @param isWidth flag indicating width is to be resized
+        @type bool
         """
         sceneRect = self.scene().sceneRect()
         width = sceneRect.width()
@@ -218,8 +226,10 @@
         """
         Public method to set the scene size.
 
-        @param width width for the scene (real)
-        @param height height for the scene (real)
+        @param width width for the scene
+        @type float
+        @param height height for the scene
+        @type float
         """
         rect = self.scene().sceneRect()
         rect.setHeight(height)
@@ -231,7 +241,8 @@
         Public method to adjust the scene size to the diagram size.
 
         @param limit flag indicating to limit the scene to the
-            initial size (boolean)
+            initial size
+        @type bool
         """
         size = self._getDiagramSize(10)
         if limit:
@@ -247,8 +258,10 @@
         Protected method to calculate the minimum rectangle fitting the
         diagram.
 
-        @param border border width to include in the calculation (integer)
-        @return the minimum rectangle (QRectF)
+        @param border border width to include in the calculation
+        @type int
+        @return the minimum rectangle
+        @rtype QRectF
         """
         startx = sys.maxsize
         starty = sys.maxsize
@@ -280,8 +293,10 @@
         """
         Protected method to calculate the minimum size fitting the diagram.
 
-        @param border border width to include in the calculation (integer)
-        @return the minimum size (QSizeF)
+        @param border border width to include in the calculation
+        @type int
+        @return the minimum size
+        @rtype QSizeF
         """
         endx = 0
         endy = 0
@@ -309,7 +324,7 @@
         @param imageFormat format for the image file
         @type str
         @param filename name of the file for non pixmaps
-        str
+        @type str
         @return paint device containing the diagram
         @rtype QPixmap or QSvgGenerator
         """
@@ -345,9 +360,12 @@
         """
         Public method to save the scene to a file.
 
-        @param filename name of the file to write the image to (string)
-        @param imageFormat format for the image file (string)
-        @return flag indicating success (boolean)
+        @param filename name of the file to write the image to
+        @type float
+        @param imageFormat format for the image file
+        @type float
+        @return flag indicating success
+        @rtype bool
         """
         rect = self._getDiagramRect(self.border)
         if imageFormat == "SVG":
@@ -362,8 +380,9 @@
         Public method to print the diagram.
 
         @param printer reference to a ready configured printer object
-            (QPrinter)
-        @param diagramName name of the diagram (string)
+        @type QPrinter
+        @param diagramName name of the diagram
+        @type float
         """
         painter = QPainter(printer)
 
@@ -432,8 +451,9 @@
         Public method to filter a list of items.
 
         @param items list of items as returned by the scene object
-            (QGraphicsItem)
-        @return list of interesting collision items (QGraphicsItem)
+        @type QGraphicsItem
+        @return list of interesting collision items
+        @rtype QGraphicsItem
         """
         # just return the list unchanged
         return list(items)

eric ide

mercurial