eric6/Debugger/BreakPointModel.py

branch
maintenance
changeset 8043
0acf98cd089a
parent 7924
8a96736d465e
parent 7923
91e843545d9a
child 8142
43248bafe9b2
diff -r 866adc8c315b -r 0acf98cd089a eric6/Debugger/BreakPointModel.py
--- a/eric6/Debugger/BreakPointModel.py	Sun Jan 17 13:53:08 2021 +0100
+++ b/eric6/Debugger/BreakPointModel.py	Mon Feb 01 10:38:16 2021 +0100
@@ -23,7 +23,8 @@
         """
         Constructor
         
-        @param parent reference to the parent widget (QObject)
+        @param parent reference to the parent widget
+        @type QObject
         """
         super(BreakPointModel, self).__init__(parent)
         
@@ -49,8 +50,10 @@
         """
         Public method to get the current column count.
         
-        @param parent reference to parent index (QModelIndex) (Unused)
-        @return column count (integer)
+        @param parent reference to parent index (Unused)
+        @type QModelIndex
+        @return column count
+        @rtype int
         """
         return len(self.header)
     
@@ -58,8 +61,10 @@
         """
         Public method to get the current row count.
         
-        @param parent reference to parent index (QModelIndex)
-        @return row count (integer)
+        @param parent reference to parent index
+        @type QModelIndex
+        @return row count
+        @rtype int
         """
         # we do not have a tree, parent should always be invalid
         if parent is None or not parent.isValid():
@@ -71,9 +76,12 @@
         """
         Public method to get the requested data.
         
-        @param index index of the requested data (QModelIndex)
-        @param role role of the requested data (Qt.ItemDataRole)
+        @param index index of the requested data
+        @type QModelIndex
+        @param role role of the requested data
+        @type Qt.ItemDataRole
         @return the requested data
+        @rtype any
         """
         if not index.isValid():
             return None
@@ -100,10 +108,14 @@
         """
         Public method to change data in the model.
         
-        @param index index of the changed data (QModelIndex)
+        @param index index of the changed data
+        @type QModelIndex
         @param value value of the changed data
-        @param role role of the changed data (Qt.ItemDataRole)
-        @return flag indicating success (boolean)
+        @type  any
+        @param role role of the changed data
+        @type Qt.ItemDataRole
+        @return flag indicating success
+        @rtype bool
         """
         if (not index.isValid() or
             index.column() >= len(self.header) or
@@ -119,8 +131,10 @@
         """
         Public method to get item flags.
         
-        @param index index of the requested flags (QModelIndex)
-        @return item flags for the given index (Qt.ItemFlags)
+        @param index index of the requested flags
+        @type QModelIndex
+        @return item flags for the given index
+        @rtype Qt.ItemFlags
         """
         if not index.isValid():
             return Qt.ItemIsEnabled
@@ -131,10 +145,14 @@
         """
         Public method to get header data.
         
-        @param section section number of the requested header data (integer)
-        @param orientation orientation of the header (Qt.Orientation)
-        @param role role of the requested data (Qt.ItemDataRole)
+        @param section section number of the requested header data
+        @type int
+        @param orientation orientation of the header
+        @type Qt.Orientation
+        @param role role of the requested data
+        @type Qt.ItemDataRole
         @return header data
+        @rtype str
         """
         if orientation == Qt.Horizontal and role == Qt.DisplayRole:
             if section >= len(self.header):
@@ -148,10 +166,14 @@
         """
         Public method to create an index.
         
-        @param row row number for the index (integer)
-        @param column column number for the index (integer)
-        @param parent index of the parent item (QModelIndex)
-        @return requested index (QModelIndex)
+        @param row row number for the index
+        @type int
+        @param column column number for the index
+        @type int
+        @param parent index of the parent item
+        @type QModelIndex
+        @return requested index
+        @rtype QModelIndex
         """
         if ((parent and parent.isValid()) or
             row < 0 or row >= len(self.breakpoints) or
@@ -164,8 +186,10 @@
         """
         Public method to get the parent index.
         
-        @param index index of item to get parent (QModelIndex)
-        @return index of parent (QModelIndex)
+        @param index index of item to get parent
+        @type QModelIndex
+        @return index of parent
+        @rtype QModelIndex
         """
         return QModelIndex()
     
@@ -173,8 +197,10 @@
         """
         Public method to check for the presence of child items.
         
-        @param parent index of parent item (QModelIndex)
-        @return flag indicating the presence of child items (boolean)
+        @param parent index of parent item
+        @type QModelIndex
+        @return flag indicating the presence of child items
+        @rtype bool
         """
         if parent is None or not parent.isValid():
             return len(self.breakpoints) > 0
@@ -187,11 +213,13 @@
         """
         Public method to add a new breakpoint to the list.
         
-        @param fn filename of the breakpoint (string)
-        @param line line number of the breakpoint (integer)
+        @param fn filename of the breakpoint
+        @type str
+        @param line line number of the breakpoint
+        @type int
         @param properties properties of the breakpoint
-            (tuple of condition (string), temporary flag (bool),
-             enabled flag (bool), ignore count (integer))
+            (tuple of condition, temporary flag, enabled flag, ignore count)
+        @type tuple of (str, bool, bool, int)
         """
         bp = [fn, line] + list(properties)
         cnt = len(self.breakpoints)
@@ -203,12 +231,15 @@
         """
         Public method to set the values of a breakpoint given by index.
         
-        @param index index of the breakpoint (QModelIndex)
-        @param fn filename of the breakpoint (string)
-        @param line line number of the breakpoint (integer)
+        @param index index of the breakpoint
+        @type QModelIndex
+        @param fn filename of the breakpoint
+        @type str
+        @param line line number of the breakpoint
+        @type int
         @param properties properties of the breakpoint
-            (tuple of condition (string), temporary flag (bool),
-             enabled flag (bool), ignore count (integer))
+            (tuple of condition, temporary flag, enabled flag, ignore count)
+        @type tuple of (str, bool, bool, int)
         """
         if index.isValid():
             row = index.row()
@@ -223,8 +254,10 @@
         """
         Public method to set the enabled state of a breakpoint given by index.
         
-        @param index index of the breakpoint (QModelIndex)
-        @param enabled flag giving the enabled state (boolean)
+        @param index index of the breakpoint
+        @type QModelIndex
+        @param enabled flag giving the enabled state
+        @type bool
         """
         if index.isValid():
             row = index.row()
@@ -238,7 +271,8 @@
         """
         Public method to set the values of a breakpoint given by index.
         
-        @param index index of the breakpoint (QModelIndex)
+        @param index index of the breakpoint
+        @type QModelIndex
         """
         if index.isValid():
             row = index.row()
@@ -250,7 +284,8 @@
         """
         Public method to delete a list of breakpoints given by their indexes.
         
-        @param idxList list of breakpoint indexes (list of QModelIndex)
+        @param idxList list of breakpoint indexes
+        @type list of QModelIndex
         """
         rows = []
         for index in idxList:
@@ -276,9 +311,11 @@
         """
         Public method to get the values of a breakpoint given by index.
         
-        @param index index of the breakpoint (QModelIndex)
-        @return breakpoint (list of seven values (filename, line number,
+        @param index index of the breakpoint
+        @type QModelIndex
+        @return breakpoint (list of six values (filename, line number,
             condition, temporary flag, enabled flag, ignore count))
+        @rtype list of (str, int, str, bool, bool, int)
         """
         if index.isValid():
             return self.breakpoints[index.row()][:]  # return a copy
@@ -290,9 +327,12 @@
         Public method to get the index of a breakpoint given by filename and
         line number.
         
-        @param fn filename of the breakpoint (string)
-        @param lineno line number of the breakpoint (integer)
-        @return index (QModelIndex)
+        @param fn filename of the breakpoint
+        @type str
+        @param lineno line number of the breakpoint
+        @type int
+        @return index
+        @rtype QModelIndex
         """
         for row in range(len(self.breakpoints)):
             bp = self.breakpoints[row]
@@ -305,8 +345,10 @@
         """
         Public method to test, if a breakpoint given by its index is temporary.
         
-        @param index index of the breakpoint to test (QModelIndex)
-        @return flag indicating a temporary breakpoint (boolean)
+        @param index index of the breakpoint to test
+        @type QModelIndex
+        @return flag indicating a temporary breakpoint
+        @rtype bool
         """
         if index.isValid():
             return self.breakpoints[index.row()][3]

eric ide

mercurial