eric6/Graphics/PixmapDiagram.py

changeset 8289
871b40c5a77a
parent 8218
7c09585bd960
child 8298
83ddb87b3bc1
--- a/eric6/Graphics/PixmapDiagram.py	Tue May 04 19:30:25 2021 +0200
+++ b/eric6/Graphics/PixmapDiagram.py	Tue May 04 20:03:40 2021 +0200
@@ -40,9 +40,12 @@
         """
         Constructor
         
-        @param pixmap filename of a graphics file to show (string)
-        @param parent parent widget of the view (QWidget)
-        @param name name of the view widget (string)
+        @param pixmap filename of a 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:
@@ -122,7 +125,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,8 +150,10 @@
         """
         Private method to show a file.
         
-        @param filename name of the file to be shown (string)
-        @return flag indicating success (boolean)
+        @param filename name of the file to be shown
+        @type str
+        @return flag indicating success
+        @rtype bool
         """
         image = QImage(filename)
         if image.isNull():
@@ -168,6 +174,7 @@
         Public method to retrieve a name for the diagram.
         
         @return name for the diagram
+        @rtype str
         """
         return self.pixmapfile
         
@@ -175,7 +182,8 @@
         """
         Public method to retrieve the status of the canvas.
         
-        @return flag indicating a successful pixmap loading (boolean)
+        @return flag indicating a successful pixmap loading
+        @rtype bool
         """
         return self.status
     
@@ -183,7 +191,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()
@@ -200,8 +209,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)
@@ -213,7 +224,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:
@@ -231,8 +243,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() +
                            ((factor - 1) * scrollBar.pageStep() / 2)))
@@ -241,8 +255,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 = PixmapDiagram.ZoomLevels.index(zoom)
@@ -256,7 +272,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:
@@ -297,7 +314,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.pixmapLabel.width() /
                    self.pixmapLabel.pixmap().width() * 100.0)
@@ -355,7 +373,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