46 |
46 |
47 def columnCount(self, parent=QModelIndex()): |
47 def columnCount(self, parent=QModelIndex()): |
48 """ |
48 """ |
49 Public method to get the current column count. |
49 Public method to get the current column count. |
50 |
50 |
|
51 @param parent reference to parent index (QModelIndex) |
51 @return column count (integer) |
52 @return column count (integer) |
52 """ |
53 """ |
53 return len(self.header) |
54 return len(self.header) |
54 |
55 |
55 def rowCount(self, parent=QModelIndex()): |
56 def rowCount(self, parent=QModelIndex()): |
56 """ |
57 """ |
57 Public method to get the current row count. |
58 Public method to get the current row count. |
58 |
59 |
|
60 @param parent reference to parent index (QModelIndex) |
59 @return row count (integer) |
61 @return row count (integer) |
60 """ |
62 """ |
61 # we do not have a tree, parent should always be invalid |
63 # we do not have a tree, parent should always be invalid |
62 if not parent.isValid(): |
64 if not parent.isValid(): |
63 return len(self.breakpoints) |
65 return len(self.breakpoints) |
176 if not parent.isValid(): |
178 if not parent.isValid(): |
177 return len(self.breakpoints) > 0 |
179 return len(self.breakpoints) > 0 |
178 else: |
180 else: |
179 return False |
181 return False |
180 |
182 |
181 ############################################################################ |
183 ########################################################################### |
182 |
184 |
183 def addBreakPoint(self, fn, line, properties): |
185 def addBreakPoint(self, fn, line, properties): |
184 """ |
186 """ |
185 Public method to add a new breakpoint to the list. |
187 Public method to add a new breakpoint to the list. |
186 |
188 |
281 else: |
283 else: |
282 return [] |
284 return [] |
283 |
285 |
284 def getBreakPointIndex(self, fn, lineno): |
286 def getBreakPointIndex(self, fn, lineno): |
285 """ |
287 """ |
286 Public method to get the index of a breakpoint given by filename and line number. |
288 Public method to get the index of a breakpoint given by filename and |
|
289 line number. |
287 |
290 |
288 @param fn filename of the breakpoint (string) |
291 @param fn filename of the breakpoint (string) |
289 @param line line number of the breakpoint (integer) |
292 @param lineno line number of the breakpoint (integer) |
290 @return index (QModelIndex) |
293 @return index (QModelIndex) |
291 """ |
294 """ |
292 for row in range(len(self.breakpoints)): |
295 for row in range(len(self.breakpoints)): |
293 bp = self.breakpoints[row] |
296 bp = self.breakpoints[row] |
294 if bp[0] == fn and bp[1] == lineno: |
297 if bp[0] == fn and bp[1] == lineno: |