src/eric7/EricWidgets/EricTreeWidget.py

branch
eric7
changeset 10423
299802979277
parent 9653
e67609152c5e
child 10439
21c28b0f9e41
diff -r e28b89693f37 -r 299802979277 src/eric7/EricWidgets/EricTreeWidget.py
--- a/src/eric7/EricWidgets/EricTreeWidget.py	Tue Dec 19 11:04:03 2023 +0100
+++ b/src/eric7/EricWidgets/EricTreeWidget.py	Tue Dec 19 19:57:08 2023 +0100
@@ -39,7 +39,8 @@
         """
         Constructor
 
-        @param parent reference to the parent widget (QWidget)
+        @param parent reference to the parent widget
+        @type QWidget
         """
         super().__init__(parent)
 
@@ -64,7 +65,8 @@
         """
         Public method to get a list of all items.
 
-        @return list of all items (list of QTreeWidgetItem)
+        @return list of all items
+        @rtype list of QTreeWidgetItem
         """
         if self.__refreshAllItemsNeeded:
             self.__allTreeItems = []
@@ -77,10 +79,12 @@
         """
         Public method to append an item to a parent item.
 
-        @param parent text of the parent item (string) or
-            the parent item (QTreeWidgetItem)
-        @param item item to be appended (QTreeWidgetItem)
-        @return flag indicating success (boolean)
+        @param parent text of the parent item or the parent item
+        @type str or QTreeWidgetItem
+        @param item item to be appended
+        @type QTreeWidgetItem
+        @return flag indicating success
+        @rtype bool
         @exception RuntimeError raised to indicate an illegal type for
             the parent
         """
@@ -107,10 +111,12 @@
         """
         Public method to prepend an item to a parent item.
 
-        @param parent text of the parent item (string) or
-            the parent item (QTreeWidgetItem)
-        @param item item to be prepended (QTreeWidgetItem)
-        @return flag indicating success (boolean)
+        @param parent text of the parent item or the parent item
+        @type str or QTreeWidgetItem
+        @param item item to be prepended
+        @type QTreeWidgetItem
+        @return flag indicating success
+        @rtype bool
         @exception RuntimeError raised to indicate an illegal type for
             the parent
         """
@@ -137,7 +143,8 @@
         """
         Public method to add a top level item.
 
-        @param item item to be added as a top level item (QTreeWidgetItem)
+        @param item item to be added as a top level item
+        @type QTreeWidgetItem
         """
         self.__allTreeItems.append(item)
         super().addTopLevelItem(item)
@@ -147,7 +154,7 @@
         Public method to add a list of top level items.
 
         @param items items to be added as top level items
-            (list of QTreeWidgetItem)
+        @type list of QTreeWidgetItem
         """
         self.__allTreeItems.extend(items)
         super().addTopLevelItems(items)
@@ -156,8 +163,10 @@
         """
         Public method to insert a top level item.
 
-        @param index index for the insertion (integer)
-        @param item item to be inserted as a top level item (QTreeWidgetItem)
+        @param index index for the insertion
+        @type int
+        @param item item to be inserted as a top level item
+        @type QTreeWidgetItem
         """
         self.__allTreeItems.append(item)
         super().insertTopLevelItem(index, item)
@@ -166,9 +175,10 @@
         """
         Public method to insert a list of top level items.
 
-        @param index index for the insertion (integer)
+        @param index index for the insertion
+        @type int
         @param items items to be inserted as top level items
-            (list of QTreeWidgetItem)
+        @type list of QTreeWidgetItem
         """
         self.__allTreeItems.extend(items)
         super().insertTopLevelItems(index, items)
@@ -177,7 +187,8 @@
         """
         Public method to delete an item.
 
-        @param item item to be deleted (QTreeWidgetItem)
+        @param item item to be deleted
+        @type QTreeWidgetItem
         """
         if item in self.__allTreeItems:
             self.__allTreeItems.remove(item)
@@ -190,7 +201,8 @@
         """
         Public method to delete a list of items.
 
-        @param items items to be deleted (list of QTreeWidgetItem)
+        @param items items to be deleted
+        @type list of QTreeWidgetItem
         """
         for item in items:
             self.deleteItem(item)
@@ -199,7 +211,8 @@
         """
         Public slot to set a new filter.
 
-        @param filterStr filter to be set (string)
+        @param filterStr filter to be set
+        @type str
         """
         self.expandAll()
         allItems = self.allItems()
@@ -251,7 +264,8 @@
         """
         Protected method handling mouse press events.
 
-        @param evt mouse press event (QMouseEvent)
+        @param evt mouse press event
+        @type QMouseEvent
         """
         if (
             evt.modifiers() == Qt.KeyboardModifier.ControlModifier
@@ -269,7 +283,8 @@
         """
         Private method to iterate over the child items of the parent.
 
-        @param parent parent item to iterate (QTreeWidgetItem)
+        @param parent parent item to iterate
+        @type QTreeWidgetItem
         """
         count = parent.childCount() if parent else self.topLevelItemCount()
 

eric ide

mercurial