44 |
44 |
45 def columnCount(self, parent=QModelIndex()): |
45 def columnCount(self, parent=QModelIndex()): |
46 """ |
46 """ |
47 Public method to get the current column count. |
47 Public method to get the current column count. |
48 |
48 |
|
49 @param parent reference to parent index (QModelIndex) |
49 @return column count (integer) |
50 @return column count (integer) |
50 """ |
51 """ |
51 return len(self.header) |
52 return len(self.header) |
52 |
53 |
53 def rowCount(self, parent=QModelIndex()): |
54 def rowCount(self, parent=QModelIndex()): |
54 """ |
55 """ |
55 Public method to get the current row count. |
56 Public method to get the current row count. |
56 |
57 |
|
58 @param parent reference to parent index (QModelIndex) |
57 @return row count (integer) |
59 @return row count (integer) |
58 """ |
60 """ |
59 # we do not have a tree, parent should always be invalid |
61 # we do not have a tree, parent should always be invalid |
60 if not parent.isValid(): |
62 if not parent.isValid(): |
61 return len(self.breakpoints) |
63 return len(self.breakpoints) |
282 def getBreakPointIndex(self, fn, lineno): |
284 def getBreakPointIndex(self, fn, lineno): |
283 """ |
285 """ |
284 Public method to get the index of a breakpoint given by filename and line number. |
286 Public method to get the index of a breakpoint given by filename and line number. |
285 |
287 |
286 @param fn filename of the breakpoint (string) |
288 @param fn filename of the breakpoint (string) |
287 @param line line number of the breakpoint (integer) |
289 @param lineno line number of the breakpoint (integer) |
288 @return index (QModelIndex) |
290 @return index (QModelIndex) |
289 """ |
291 """ |
290 for row in range(len(self.breakpoints)): |
292 for row in range(len(self.breakpoints)): |
291 bp = self.breakpoints[row] |
293 bp = self.breakpoints[row] |
292 if bp[0] == fn and bp[1] == lineno: |
294 if bp[0] == fn and bp[1] == lineno: |