src/eric7/EricWidgets/EricMessageBox.py

branch
eric7
changeset 10423
299802979277
parent 10091
ac6edcfe7831
child 10439
21c28b0f9e41
--- a/src/eric7/EricWidgets/EricMessageBox.py	Tue Dec 19 11:04:03 2023 +0100
+++ b/src/eric7/EricWidgets/EricMessageBox.py	Tue Dec 19 19:57:08 2023 +0100
@@ -76,12 +76,18 @@
         """
         Constructor
 
-        @param icon type of icon to be shown (QMessageBox.Icon)
-        @param title caption of the message box (string)
-        @param text text to be shown by the message box (string)
-        @param modal flag indicating a modal dialog (boolean)
-        @param buttons set of standard buttons to generate (StandardButtons)
-        @param parent parent widget of the message box (QWidget)
+        @param icon type of icon to be shown
+        @type QMessageBox.Icon
+        @param title caption of the message box
+        @type str
+        @param text text to be shown by the message box
+        @type str
+        @param modal flag indicating a modal dialog
+        @type bool
+        @param buttons set of standard buttons to generate
+        @type StandardButtons
+        @param parent parent widget of the message box
+        @type QWidget
         """
         super().__init__(parent)
         self.setIcon(icon)
@@ -119,16 +125,22 @@
     """
     Private module function to show a modal message box.
 
-    @param parent parent widget of the message box (QWidget)
-    @param title caption of the message box (string)
-    @param text text to be shown by the message box (string)
-    @param icon type of icon to be shown (QMessageBox.Icon)
+    @param parent parent widget of the message box
+    @type QWidget
+    @param title caption of the message box
+    @type str
+    @param text text to be shown by the message box
+    @type str
+    @param icon type of icon to be shown
+    @type QMessageBox.Icon
     @param buttons flags indicating which buttons to show
-        (QMessageBox.StandardButtons)
+    @type QMessageBox.StandardButtons
     @param defaultButton flag indicating the default button
-        (QMessageBox.StandardButton)
-    @param textFormat format of the text (Qt.TextFormat)
-    @return button pressed by the user (QMessageBox.StandardButton)
+    @type QMessageBox.StandardButton
+    @param textFormat format of the text
+    @type Qt.TextFormat
+    @return button pressed by the user
+    @rtype QMessageBox.StandardButton
     """
     messageBox = QMessageBox(parent)
     messageBox.setIcon(icon)
@@ -167,14 +179,18 @@
     """
     Function to show a modal critical message box.
 
-    @param parent parent widget of the message box (QWidget)
-    @param title caption of the message box (string)
-    @param text text to be shown by the message box (string)
+    @param parent parent widget of the message box
+    @type QWidget
+    @param title caption of the message box
+    @type str
+    @param text text to be shown by the message box
+    @type str
     @param buttons flags indicating which buttons to show
-        (QMessageBox.StandardButtons)
+    @type QMessageBox.StandardButtons
     @param defaultButton flag indicating the default button
-        (QMessageBox.StandardButton)
-    @return button pressed by the user (QMessageBox.StandardButton)
+    @type QMessageBox.StandardButton
+    @return button pressed by the user
+    @rtype QMessageBox.StandardButton
     """
     return __messageBox(
         parent, title, text, QMessageBox.Icon.Critical, buttons, defaultButton
@@ -191,14 +207,18 @@
     """
     Function to show a modal information message box.
 
-    @param parent parent widget of the message box (QWidget)
-    @param title caption of the message box (string)
-    @param text text to be shown by the message box (string)
+    @param parent parent widget of the message box
+    @type QWidget
+    @param title caption of the message box
+    @type str
+    @param text text to be shown by the message box
+    @type str
     @param buttons flags indicating which buttons to show
-        (QMessageBox.StandardButtons)
+    @type QMessageBox.StandardButtons
     @param defaultButton flag indicating the default button
-        (QMessageBox.StandardButton)
-    @return button pressed by the user (QMessageBox.StandardButton)
+    @type QMessageBox.StandardButton
+    @return button pressed by the user
+    @rtype QMessageBox.StandardButton
     """
     return __messageBox(
         parent, title, text, QMessageBox.Icon.Information, buttons, defaultButton
@@ -215,14 +235,18 @@
     """
     Function to show a modal question message box.
 
-    @param parent parent widget of the message box (QWidget)
-    @param title caption of the message box (string)
-    @param text text to be shown by the message box (string)
+    @param parent parent widget of the message box
+    @type QWidget
+    @param title caption of the message box
+    @type str
+    @param text text to be shown by the message box
+    @type str
     @param buttons flags indicating which buttons to show
-        (QMessageBox.StandardButtons)
+    @type QMessageBox.StandardButtons
     @param defaultButton flag indicating the default button
-        (QMessageBox.StandardButton)
-    @return button pressed by the user (QMessageBox.StandardButton)
+    @type QMessageBox.StandardButton
+    @return button pressed by the user
+    @rtype QMessageBox.StandardButton
     """
     return __messageBox(
         parent, title, text, QMessageBox.Icon.Question, buttons, defaultButton
@@ -239,14 +263,18 @@
     """
     Function to show a modal warning message box.
 
-    @param parent parent widget of the message box (QWidget)
-    @param title caption of the message box (string)
-    @param text text to be shown by the message box (string)
+    @param parent parent widget of the message box
+    @type QWidget
+    @param title caption of the message box
+    @type str
+    @param text text to be shown by the message box
+    @type str
     @param buttons flags indicating which buttons to show
-        (QMessageBox.StandardButtons)
+    @type QMessageBox.StandardButtons
     @param defaultButton flag indicating the default button
-        (QMessageBox.StandardButton)
-    @return button pressed by the user (QMessageBox.StandardButton)
+    @type QMessageBox.StandardButton
+    @return button pressed by the user
+    @rtype QMessageBox.StandardButton
     """
     return __messageBox(
         parent, title, text, QMessageBox.Icon.Warning, buttons, defaultButton
@@ -269,15 +297,22 @@
     """
     Function to show a model yes/no message box.
 
-    @param parent parent widget of the message box (QWidget)
-    @param title caption of the message box (string)
-    @param text text to be shown by the message box (string)
+    @param parent parent widget of the message box
+    @type QWidget
+    @param title caption of the message box
+    @type str
+    @param text text to be shown by the message box
+    @type str
     @param icon icon for the dialog (Critical, Information, Question or
         Warning)
+    @type QMessageBox.Icon
     @param yesDefault flag indicating that the Yes button should be the
-        default button (boolean)
-    @param textFormat format of the text (Qt.TextFormat)
-    @return flag indicating the selection of the Yes button (boolean)
+        default button
+    @type bool
+    @param textFormat format of the text
+    @type Qt.TextFormat
+    @return flag indicating the selection of the Yes button
+    @rtype bool
     @exception ValueError raised to indicate a bad parameter value
     """
     if icon not in [Critical, Information, Question, Warning]:
@@ -299,13 +334,19 @@
     """
     Function to show a model abort/retry message box.
 
-    @param parent parent widget of the message box (QWidget)
-    @param title caption of the message box (string)
-    @param text text to be shown by the message box (string)
+    @param parent parent widget of the message box
+    @type QWidget
+    @param title caption of the message box
+    @type str
+    @param text text to be shown by the message box
+    @type str
     @param icon icon for the dialog (Critical, Information, Question or
         Warning)
-    @param textFormat format of the text (Qt.TextFormat)
-    @return flag indicating the selection of the Retry button (boolean)
+    @type QMessageBox.Icon
+    @param textFormat format of the text
+    @type Qt.TextFormat
+    @return flag indicating the selection of the Retry button
+    @rtype bool
     @exception ValueError raised to indicate a bad parameter value
     """
     if icon not in [Critical, Information, Question, Warning]:
@@ -327,13 +368,19 @@
     """
     Function to show a modal message box to ask for clearing the data.
 
-    @param parent parent widget of the message box (QWidget)
-    @param title caption of the message box (string)
-    @param text text to be shown by the message box (string)
+    @param parent parent widget of the message box
+    @type QWidget
+    @param title caption of the message box
+    @type str
+    @param text text to be shown by the message box
+    @type str
     @param saveFunc reference to a function performing the save action. It
         must be a parameterless function returning a flag indicating success.
-    @param textFormat format of the text (Qt.TextFormat)
-    @return flag indicating that it is ok to clear the data (boolean)
+    @type function
+    @param textFormat format of the text
+    @type Qt.TextFormat
+    @return flag indicating that it is ok to clear the data
+    @rtype bool
     """
     buttons = QMessageBox.StandardButton.Abort | QMessageBox.StandardButton.Discard
     if saveFunc:

eric ide

mercurial