def __addWatchPoint(self):
     """
     Private slot to handle the add watch expression context menu entry.
     """
     dlg = EditWatchpointDialog((QString(""), False, True, 0, QString("")), self)
     if dlg.exec_() == QDialog.Accepted:
         cond, temp, enabled, ignorecount, special = dlg.getData()
         if not self.__findDuplicates(cond, special, True):
             self.__model.addWatchPoint(cond, special, (temp, enabled, ignorecount))
             self.__resizeColumns()
             self.__resort()
 def __doEditWatchPoint(self, index):
     """
     Private slot to edit a watch expression.
     
     @param index index of watch expression to be edited (QModelIndex)
     """
     sindex = self.__toSourceIndex(index)
     if sindex.isValid():
         wp = self.__model.getWatchPointByIndex(sindex)
         if not wp:
             return
         
         cond, special, temp, enabled, count = wp[:5]
         
         dlg = EditWatchpointDialog(\
             (QString(cond), temp, enabled, count, QString(special)), self)
         if dlg.exec_() == QDialog.Accepted:
             cond, temp, enabled, count, special = dlg.getData()
             if not self.__findDuplicates(cond, special, True, sindex):
                 self.__model.setWatchPointByIndex(sindex, 
                     unicode(cond), unicode(special), (temp, enabled, count))
                 self.__resizeColumns()
                 self.__resort()