src/eric7/EricGui/EricAction.py

branch
eric7
changeset 10423
299802979277
parent 9653
e67609152c5e
child 10439
21c28b0f9e41
--- a/src/eric7/EricGui/EricAction.py	Tue Dec 19 11:04:03 2023 +0100
+++ b/src/eric7/EricGui/EricAction.py	Tue Dec 19 19:57:08 2023 +0100
@@ -25,7 +25,8 @@
         """
         Constructor
 
-        @param error error message of the exception (string)
+        @param error error message of the exception
+        @type str
         """
         self.errorMessage = str(error)
 
@@ -34,6 +35,7 @@
         Special method returning a representation of the exception.
 
         @return string representing the error message
+        @rtype str
         """
         return str(self.errorMessage)
 
@@ -42,6 +44,7 @@
         Special method returning a string representation of the exception.
 
         @return string representing the error message
+        @rtype str
         """
         return str(self.errorMessage)
 
@@ -57,20 +60,20 @@
 
         @param args argument list of the constructor. This list is one of
             <ul>
-            <li>text (string), icon (QIcon), menu text (string),
-                accelarator (QKeySequence), alternative accelerator
-                (QKeySequence), parent (QObject), name (string), toggle
-                (boolean)</li>
-            <li>text (string), icon (QIcon), menu text (string),
-                accelarator (QKeySequence), alternative accelerator
-                (QKeySequence), parent (QObject), name (string)</li>
-            <li>text (string), menu text (string),
-                accelarator (QKeySequence), alternative accelerator
-                (QKeySequence), parent (QObject), name (string), toggle
-                (boolean)</li>
-            <li>text (string), menu text (string),
-                accelarator (QKeySequence), alternative accelerator
-                (QKeySequence), parent (QObject), name (string)</li>
+            <li>text, icon, menu text, accelarator, alternative accelerator, parent,
+                name, toggle</li>
+            <li>text, icon, menu text, accelarator, alternative accelerator, parent,
+                name</li>
+            <li>text, menu text, accelarator, alternative accelerator, parent, name,
+                toggle</li>
+            <li>text, menu text, accelarator, alternative accelerator, parent, name</li>
+            </ul>
+        @type list of one of the following
+            <ul>
+            <li>str, QIcon, str, QKeySequence, QKeySequence, QObject, str, bool</li>
+            <li>str, QIcon, str, QKeySequence, QKeySequemce, QObject, str</li>
+            <li>str, str, QKeySequence, QKeySequence, QObject, str, bool</li>
+            <li>str, str, QKeySequence, QKeySequence, QObject, str</li>
             </ul>
         @exception ArgumentsError raised to indicate invalid arguments
         """
@@ -122,9 +125,11 @@
         """
         Public slot to set the alternative keyboard shortcut.
 
-        @param shortcut the alternative accelerator (QKeySequence)
+        @param shortcut the alternative accelerator
+        @type QKeySequence
         @param removeEmpty flag indicating to remove the alternate shortcut,
-            if it is empty (boolean)
+            if it is empty
+        @type bool
         """
         if not shortcut.isEmpty():
             shortcuts = self.shortcuts()
@@ -144,7 +149,8 @@
         """
         Public method to retrieve the alternative keyboard shortcut.
 
-        @return the alternative accelerator (QKeySequence)
+        @return the alternative accelerator
+        @rtype QKeySequence
         """
         shortcuts = self.shortcuts()
         if len(shortcuts) < 2:
@@ -156,7 +162,8 @@
         """
         Public slot to set the keyboard shortcut.
 
-        @param shortcut the accelerator (QKeySequence)
+        @param shortcut the accelerator
+        @type QKeySequence
         """
         super().setShortcut(shortcut)
         self.__ammendToolTip()
@@ -165,9 +172,9 @@
         """
         Public slot to set the list of keyboard shortcuts.
 
-        @param shortcuts list of keyboard accelerators (list of QKeySequence)
-            or key for a platform dependent list of accelerators
-            (QKeySequence.StandardKey)
+        @param shortcuts list of keyboard accelerators or key for a platform
+            dependent list of accelerators
+        @type list of QKeySequence or QKeySequence.StandardKey
         """
         super().setShortcuts(shortcuts)
         self.__ammendToolTip()
@@ -176,7 +183,8 @@
         """
         Public slot to set the icon text of the action.
 
-        @param text new icon text (string)
+        @param text new icon text
+        @type str
         """
         super().setIconText(text)
         self.__ammendToolTip()
@@ -198,9 +206,11 @@
     """
     Module function to add a list of actions to a widget.
 
-    @param target reference to the target widget (QWidget)
+    @param target reference to the target widget
+    @type QWidget
     @param actions list of actions to be added to the target. A
-        None indicates a separator (list of QActions)
+        None indicates a separator
+    @type list of QAction
     """
     if target is None:
         return
@@ -216,10 +226,14 @@
     """
     Module function to create an action group.
 
-    @param parent parent object of the action group (QObject)
-    @param name name of the action group object (string)
-    @param exclusive flag indicating an exclusive action group (boolean)
-    @return reference to the created action group (QActionGroup)
+    @param parent parent object of the action group
+    @type QObject
+    @param name name of the action group object
+        @type str
+    @param exclusive flag indicating an exclusive action group
+        @type bool
+    @return reference to the created action group
+    @rtype QActionGroup
     """
     actGrp = QActionGroup(parent)
     if name:

eric ide

mercurial