src/eric7/UI/CompareDialog.py

branch
eric7
changeset 10433
328f3ec4b77a
parent 10303
ee1aadab1215
child 10439
21c28b0f9e41
--- a/src/eric7/UI/CompareDialog.py	Thu Dec 21 15:46:22 2023 +0100
+++ b/src/eric7/UI/CompareDialog.py	Thu Dec 21 19:50:01 2023 +0100
@@ -30,9 +30,12 @@
     Compare two sequences of lines; generate the delta for display side by
     side.
 
-    @param a first sequence of lines (list of strings)
-    @param b second sequence of lines (list of strings)
-    @param linenumberwidth width (in characters) of the linenumbers (integer)
+    @param a first sequence of lines
+    @type list of str
+    @param b second sequence of lines
+    @type list of str
+    @param linenumberwidth width (in characters) of the linenumbers
+    @type int
     @yield tuples of differences. Each tuple is composed of strings as follows.
         <ul>
             <li>opcode -- one of e, d, i, r for equal, delete, insert,
@@ -49,8 +52,10 @@
         """
         Internal function to remove all diff markers.
 
-        @param line line to work on (string)
-        @return line without diff markers (string)
+        @param line line to work on
+        @type str
+        @return line without diff markers
+        @rtype str
         """
         return (
             line.replace("\0+", "")
@@ -104,7 +109,7 @@
         Constructor
 
         @param files list of files to compare and their label
-        @type list of two tuples of (str, str)
+        @type list of tuples of (str, str)
         @param parent parent widget
         @type QWidget
         """
@@ -200,7 +205,8 @@
         """
         Public slot to show the dialog.
 
-        @param filename name of a file to use as the first file (string)
+        @param filename name of a file to use as the first file
+        @type str
         """
         if filename:
             self.file1Picker.setText(filename)
@@ -210,11 +216,16 @@
         """
         Private method to append text to the end of the contents pane.
 
-        @param pane text edit widget to append text to (QTextedit)
-        @param linenumber number of line to insert (string)
-        @param line text to insert (string)
-        @param charFormat text format to be used (QTextCharFormat)
-        @param interLine flag indicating interline changes (boolean)
+        @param pane text edit widget to append text to
+        @type QTextedit
+        @param linenumber number of line to insert
+        @type str
+        @param line text to insert
+        @type str
+        @param charFormat text format to be used
+        @type QTextCharFormat
+        @param interLine flag indicating interline changes
+        @type bool
         """
         tc = pane.textCursor()
         tc.movePosition(QTextCursor.MoveOperation.End)
@@ -243,7 +254,8 @@
         """
         Private slot called by a button of the button box clicked.
 
-        @param button button that was clicked (QAbstractButton)
+        @param button button that was clicked
+        @type QAbstractButton
         """
         if button == self.diffButton:
             self.on_diffButton_clicked()
@@ -291,10 +303,14 @@
         """
         Public method to compare two lists of text.
 
-        @param lines1 text to compare against (string or list of strings)
-        @param lines2 text to compare (string or list of strings)
-        @param name1 name to be shown for the first text (string)
-        @param name2 name to be shown for the second text (string)
+        @param lines1 text to compare against
+        @type str or list of str
+        @param lines2 text to compare
+        @type str or list of str)
+        @param name1 name to be shown for the first text
+        @type str
+        @param name2 name to be shown for the second text
+        @type str
         """
         if name1 == "" or name2 == "":
             self.filesGroup.hide()
@@ -317,8 +333,10 @@
         """
         Private method to compare two lists of text.
 
-        @param lines1 text to compare against (list of strings)
-        @param lines2 text to compare (list of strings)
+        @param lines1 text to compare against
+        @type list of str
+        @param lines2 text to compare
+        @type list of str
         """
         self.contents_1.clear()
         self.contents_2.clear()
@@ -404,7 +422,8 @@
         Private slot to enable the buttons and set the current diff position
         depending on scrollbar position.
 
-        @param value scrollbar position (integer)
+        @param value scrollbar position
+        @type int
         """
         tPos = value / self.fontHeight + 1
         bPos = (value + self.vsb1.pageStep()) / self.fontHeight + 1
@@ -469,7 +488,8 @@
         """
         Private slot to connect or disconnect the scrollbars of the displays.
 
-        @param sync flag indicating synchronisation status (boolean)
+        @param sync flag indicating synchronisation status
+        @type bool
         """
         if sync:
             self.hsb2.setValue(self.hsb1.value())
@@ -490,8 +510,9 @@
         Constructor
 
         @param files list of files to compare and their label
-            (list of two tuples of two strings)
-        @param parent reference to the parent widget (QWidget)
+        @type list of [(str, str), (str, str)]
+        @param parent reference to the parent widget
+        @type QWidget
         """
         super().__init__(parent)
 
@@ -507,9 +528,12 @@
         """
         Public method to filter events.
 
-        @param obj reference to the object the event is meant for (QObject)
-        @param event reference to the event object (QEvent)
-        @return flag indicating, whether the event was handled (boolean)
+        @param obj reference to the object the event is meant for
+        @type QObject
+        @param event reference to the event object
+        @type QEvent
+        @return flag indicating, whether the event was handled
+        @rtype bool
         """
         if event.type() == QEvent.Type.Close:
             QApplication.exit()

eric ide

mercurial