eric6/Graphics/SvgDiagram.py

changeset 8289
871b40c5a77a
parent 8218
7c09585bd960
child 8298
83ddb87b3bc1
--- a/eric6/Graphics/SvgDiagram.py	Tue May 04 19:30:25 2021 +0200
+++ b/eric6/Graphics/SvgDiagram.py	Tue May 04 20:03:40 2021 +0200
@@ -38,9 +38,12 @@
         """
         Constructor
         
-        @param svgFile filename of a SVG graphics file to show (string)
-        @param parent parent widget of the view (QWidget)
-        @param name name of the view widget (string)
+        @param svgFile filename of a SVG graphics file to show
+        @type str
+        @param parent parent widget of the view
+        @type QWidget
+        @param name name of the view widget
+        @type str
         """
         super().__init__(parent)
         if name:
@@ -121,7 +124,8 @@
         """
         Private slot to show the context menu of the listview.
         
-        @param coord the position of the mouse pointer (QPoint)
+        @param coord the position of the mouse pointer
+        @type QPoint
         """
         self.__menu.popup(self.mapToGlobal(coord))
         
@@ -146,6 +150,7 @@
         Public method to retrieve a name for the diagram.
         
         @return name for the diagram
+        @rtype str
         """
         return self.svgFile
     
@@ -153,7 +158,8 @@
         """
         Protected method to handle wheel events.
         
-        @param evt reference to the wheel event (QWheelEvent)
+        @param evt reference to the wheel event
+        @type QWheelEvent
         """
         if evt.modifiers() & Qt.KeyboardModifier.ControlModifier:
             delta = evt.angleDelta().y()
@@ -170,8 +176,10 @@
         """
         Public method handling events.
         
-        @param evt reference to the event (QEvent)
-        @return flag indicating, if the event was handled (boolean)
+        @param evt reference to the event
+        @type QEvent
+        @return flag indicating, if the event was handled
+        @rtype bool
         """
         if evt.type() == QEvent.Type.Gesture:
             self.gestureEvent(evt)
@@ -183,7 +191,8 @@
         """
         Protected method handling gesture events.
         
-        @param evt reference to the gesture event (QGestureEvent
+        @param evt reference to the gesture event
+        @type QGestureEvent
         """
         pinch = evt.gesture(Qt.GestureType.PinchGesture)
         if pinch:
@@ -201,8 +210,10 @@
         """
         Private method to adjust a scrollbar by a certain factor.
         
-        @param scrollBar reference to the scrollbar object (QScrollBar)
-        @param factor factor to adjust by (float)
+        @param scrollBar reference to the scrollbar object
+        @type QScrollBar
+        @param factor factor to adjust by
+        @type float
         """
         scrollBar.setValue(
             int(factor * scrollBar.value() +
@@ -212,8 +223,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 = SvgDiagram.ZoomLevels.index(zoom)
@@ -227,7 +240,8 @@
         """
         Private method to set the zoom value in percent.
         
-        @param value zoom value in percent (integer)
+        @param value zoom value in percent
+        @type int
         """
         oldValue = self.__zoom()
         if value != oldValue:
@@ -265,7 +279,8 @@
         """
         Private 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.svgWidget.width() /
                    self.svgWidget.sizeHint().width() * 100.0)
@@ -327,7 +342,8 @@
         """
         Private slot to the actual printing.
         
-        @param printer reference to the printer object (QPrinter)
+        @param printer reference to the printer object
+        @type QPrinter
         """
         painter = QPainter()
         painter.begin(printer)

eric ide

mercurial