src/eric7/EricWidgets/EricSqueezeLabels.py

branch
eric7
changeset 10423
299802979277
parent 9653
e67609152c5e
child 10439
21c28b0f9e41
diff -r e28b89693f37 -r 299802979277 src/eric7/EricWidgets/EricSqueezeLabels.py
--- a/src/eric7/EricWidgets/EricSqueezeLabels.py	Tue Dec 19 11:04:03 2023 +0100
+++ b/src/eric7/EricWidgets/EricSqueezeLabels.py	Tue Dec 19 19:57:08 2023 +0100
@@ -23,7 +23,8 @@
         """
         Constructor
 
-        @param parent reference to the parent Widget (QWidget)
+        @param parent reference to the parent Widget
+        @type QWidget
         """
         super().__init__(parent)
 
@@ -34,7 +35,8 @@
         """
         Protected method called when some painting is required.
 
-        @param event reference to the paint event (QPaintEvent)
+        @param event reference to the paint event
+        @type QPaintEvent
         """
         fm = self.fontMetrics()
         pixelLength = fm.horizontalAdvance(self.__text)
@@ -51,7 +53,8 @@
         """
         Public method to set the label's text.
 
-        @param txt the text to be shown (string)
+        @param txt the text to be shown
+        @type str
         """
         self.__text = txt
         super().setText(self.__text)
@@ -66,7 +69,8 @@
         """
         Constructor
 
-        @param parent reference to the parent Widget (QWidget)
+        @param parent reference to the parent Widget
+        @type QWidget
         """
         super().__init__(parent)
 
@@ -77,8 +81,8 @@
         """
         Public method to set the surrounding of the path string.
 
-        @param surrounding the a string containg placeholders for the path
-            (string)
+        @param surrounding the a string containing placeholders for the path
+        @type str
         """
         self.__surrounding = surrounding
         super().setText(self.__surrounding.format(self.__path))
@@ -87,7 +91,8 @@
         """
         Public method to set the path of the label.
 
-        @param path path to be shown (string)
+        @param path path to be shown
+        @type str
         """
         self.__path = path
         super().setText(self.__surrounding.format(self.__path))
@@ -96,9 +101,10 @@
         """
         Public method to set the surrounding and the path of the label.
 
-        @param surrounding the a string containg placeholders for the path
-            (string)
-        @param path path to be shown (string)
+        @param surrounding the a string containing placeholders for the path
+        @type str
+        @param path path to be shown
+        @type str
         """
         self.__surrounding = surrounding
         self.__path = path
@@ -108,7 +114,8 @@
         """
         Protected method called when some painting is required.
 
-        @param event reference to the paint event (QPaintEvent)
+        @param event reference to the paint event
+        @type QPaintEvent
         """
         if self.length(self.__path) > self.contentsRect().width():
             super().setText(
@@ -126,8 +133,10 @@
         """
         Public method to return the length of a text in pixels.
 
-        @param txt text to calculate the length for after wrapped (string)
-        @return length of the wrapped text in pixels (integer)
+        @param txt text to calculate the length for after wrapped
+        @type str
+        @return length of the wrapped text in pixels
+        @rtype int
         """
         fm = self.fontMetrics()
         return fm.horizontalAdvance(self.__surrounding.format(txt))

eric ide

mercurial