Debugger/BreakPointModel.py

changeset 460
6a3899e91d76
parent 13
1af94a91f439
child 531
26efb720a299
--- a/Debugger/BreakPointModel.py	Fri Aug 06 12:40:21 2010 +0200
+++ b/Debugger/BreakPointModel.py	Fri Aug 06 12:55:39 2010 +0200
@@ -13,6 +13,8 @@
     """
     Class implementing a custom model for breakpoints.
     """
+    dataAboutToBeChanged = pyqtSignal(QModelIndex, QModelIndex)
+    
     def __init__(self, parent = None):
         """
         Constructor
@@ -180,15 +182,12 @@
             index1 = self.createIndex(row, 0, self.breakpoints[row])
             index2 = self.createIndex(row, len(self.breakpoints[row]), 
                      self.breakpoints[row])
-            self.emit(\
-                SIGNAL("dataAboutToBeChanged(const QModelIndex &, const QModelIndex &)"),
-                index1, index2)
+            self.dataAboutToBeChanged.emit(index1, index2)
             i = 0
             for value in [fn, line] + list(properties):
                 self.breakpoints[row][i] = value
                 i += 1
-            self.emit(SIGNAL("dataChanged(const QModelIndex &, const QModelIndex &)"),
-                      index1, index2)
+            self.dataChanged.emit(index1, index2)
 
     def setBreakPointEnabledByIndex(self, index, enabled):
         """
@@ -201,12 +200,9 @@
             row = index.row()
             col = 4
             index1 = self.createIndex(row, col, self.breakpoints[row])
-            self.emit(\
-                SIGNAL("dataAboutToBeChanged(const QModelIndex &, const QModelIndex &)"),
-                index1, index1)
+            self.dataAboutToBeChanged.emit(index1, index1)
             self.breakpoints[row][col] = enabled
-            self.emit(SIGNAL("dataChanged(const QModelIndex &, const QModelIndex &)"),
-                      index1, index1)
+            self.dataChanged.emit(index1, index1)
     
     def deleteBreakPointByIndex(self, index):
         """

eric ide

mercurial