def __editBreakpoint(self, index):
     """
     Private slot to edit a breakpoint.
     
     @param index index of breakpoint to be edited (QModelIndex)
     """
     sindex = self.__toSourceIndex(index)
     if sindex.isValid():
         bp = self.__model.getBreakPointByIndex(sindex)
         if not bp:
             return
         
         fn, line, cond, temp, enabled, count = bp[:6]
         
         dlg = EditBreakpointDialog((fn, line), (cond, temp, enabled, count),
             self.condHistory, self, modal = True)
         if dlg.exec_() == QDialog.Accepted:
             cond, temp, enabled, count = dlg.getData()
             if not cond.isEmpty():
                 self.condHistory.removeAll(cond)
                 self.condHistory.prepend(cond)
             
             self.__model.setBreakPointByIndex(sindex, 
                 fn, line, (unicode(cond), temp, enabled, count))
             self.__resizeColumns()
             self.__resort()
 def __addBreak(self):
     """
     Private slot to handle the add breakpoint context menu entry.
     """
     dlg = EditBreakpointDialog((self.fnHistory[0], None), None,
         self.condHistory, self, modal = 1, addMode = 1,
         filenameHistory = self.fnHistory)
     if dlg.exec_() == QDialog.Accepted:
         fn, line, cond, temp, enabled, count = dlg.getAddData()
         if fn is not None:
             self.fnHistory.removeAll(fn)
             self.fnHistory.prepend(fn)
         
         if not cond.isEmpty():
             self.condHistory.removeAll(cond)
             self.condHistory.prepend(cond)
         
         self.__model.addBreakPoint(fn, line, (unicode(cond), temp, enabled, count))
         self.__resizeColumns()
         self.__resort()