225 cnt = len(self.breakpoints) |
227 cnt = len(self.breakpoints) |
226 self.beginInsertRows(QModelIndex(), cnt, cnt) |
228 self.beginInsertRows(QModelIndex(), cnt, cnt) |
227 self.breakpoints.append(bp) |
229 self.breakpoints.append(bp) |
228 self.endInsertRows() |
230 self.endInsertRows() |
229 |
231 |
|
232 def addBreakPoints(self, breakpoints): |
|
233 """ |
|
234 Public method to add multiple breakpoints to the list. |
|
235 |
|
236 @param breakpoints list of breakpoints with file name, line number, |
|
237 condition, temporary flag, enabled flag and ignore count each |
|
238 @type list of (str, int, str, bool, bool, int) |
|
239 """ |
|
240 cnt = len(self.breakpoints) |
|
241 self.beginInsertRows(QModelIndex(), cnt, cnt + len(breakpoints) - 1) |
|
242 self.breakpoints += breakpoints |
|
243 self.endInsertRows() |
|
244 |
230 def setBreakPointByIndex(self, index, fn, line, properties): |
245 def setBreakPointByIndex(self, index, fn, line, properties): |
231 """ |
246 """ |
232 Public method to set the values of a breakpoint given by index. |
247 Public method to set the values of a breakpoint given by index. |
233 |
248 |
234 @param index index of the breakpoint |
249 @param index index of the breakpoint |
319 """ |
334 """ |
320 if index.isValid(): |
335 if index.isValid(): |
321 return self.breakpoints[index.row()][:] # return a copy |
336 return self.breakpoints[index.row()][:] # return a copy |
322 else: |
337 else: |
323 return [] |
338 return [] |
324 |
339 |
|
340 def getAllBreakpoints(self): |
|
341 """ |
|
342 Public method to get a copy of the breakpoints. |
|
343 |
|
344 @return list of breakpoints |
|
345 @rtype list of list of [str, int, str, bool, bool, int] |
|
346 """ |
|
347 return copy.deepcopy(self.breakpoints) |
|
348 |
325 def getBreakPointIndex(self, fn, lineno): |
349 def getBreakPointIndex(self, fn, lineno): |
326 """ |
350 """ |
327 Public method to get the index of a breakpoint given by filename and |
351 Public method to get the index of a breakpoint given by filename and |
328 line number. |
352 line number. |
329 |
353 |