def __onEdit( self ): " Triggered when a breakpoint should be edited " if self.__currentItem is None: return dlg = BreakpointEditDialog( self.__currentItem ) if dlg.exec_() == QDialog.Accepted: newBpoint = dlg.getData() if newBpoint == self.__currentItem: return model = self.bpointsList.model().sourceModel() index = model.getBreakPointIndex( self.__currentItem.getAbsoluteFileName(), self.__currentItem.getLineNumber() ) model.setBreakPointByIndex( index, newBpoint ) self.bpointsList.layoutDisplay() return
def __editBreakpoint( self, index ): " Edits a breakpoint " sindex = self.toSourceIndex( index ) if sindex.isValid(): bp = self.__model.getBreakPointByIndex( sindex ) if not bp: return dlg = BreakpointEditDialog( bp ) if dlg.exec_() == QDialog.Accepted: newBpoint = dlg.getData() if newBpoint == bp: return self.__model.setBreakPointByIndex( sindex, newBpoint ) self.layoutDisplay() return
def __editBreakpoint(self, index): " Edits a breakpoint " sindex = self.toSourceIndex(index) if sindex.isValid(): bp = self.__model.getBreakPointByIndex(sindex) if not bp: return dlg = BreakpointEditDialog(bp) if dlg.exec_() == QDialog.Accepted: newBpoint = dlg.getData() if newBpoint == bp: return self.__model.setBreakPointByIndex(sindex, newBpoint) self.layoutDisplay() return
def __onEdit(self): " Triggered when a breakpoint should be edited " if self.__currentItem is None: return dlg = BreakpointEditDialog(self.__currentItem) if dlg.exec_() == QDialog.Accepted: newBpoint = dlg.getData() if newBpoint == self.__currentItem: return model = self.bpointsList.model().sourceModel() index = model.getBreakPointIndex( self.__currentItem.getAbsoluteFileName(), self.__currentItem.getLineNumber()) model.setBreakPointByIndex(index, newBpoint) self.bpointsList.layoutDisplay() return