Change the appearance of the breakpoint and watchpoint viewers (via the models).

Mon, 30 Aug 2010 12:30:29 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Mon, 30 Aug 2010 12:30:29 +0200
changeset 531
26efb720a299
parent 529
86332f558b7b
child 532
a3c0f1e2594a

Change the appearance of the breakpoint and watchpoint viewers (via the models).

Debugger/BreakPointModel.py file | annotate | diff | comparison | revisions
Debugger/WatchPointModel.py file | annotate | diff | comparison | revisions
Debugger/WatchPointViewer.py file | annotate | diff | comparison | revisions
--- a/Debugger/BreakPointModel.py	Mon Aug 30 11:05:37 2010 +0200
+++ b/Debugger/BreakPointModel.py	Mon Aug 30 12:30:29 2010 +0200
@@ -47,7 +47,7 @@
         
         @return column count (integer)
         """
-        return len(self.header) + 1
+        return len(self.header)
     
     def rowCount(self, parent = QModelIndex()):
         """
@@ -72,8 +72,16 @@
         if not index.isValid():
             return None
         
-        if role == Qt.DisplayRole or role == Qt.ToolTipRole:
-            if index.column() < len(self.header):
+        if role == Qt.DisplayRole:
+            if index.column() in [0, 1, 2, 5]:
+                return self.breakpoints[index.row()][index.column()]
+        
+        if role == Qt.CheckStateRole:
+            if index.column() in [3, 4]:
+                return self.breakpoints[index.row()][index.column()]
+        
+        if role == Qt.ToolTipRole:
+            if index.column() in [0, 2]:
                 return self.breakpoints[index.row()][index.column()]
         
         if role == Qt.TextAlignmentRole:
--- a/Debugger/WatchPointModel.py	Mon Aug 30 11:05:37 2010 +0200
+++ b/Debugger/WatchPointModel.py	Mon Aug 30 12:30:29 2010 +0200
@@ -44,7 +44,7 @@
         
         @return column count (integer)
         """
-        return len(self.header) + 1
+        return len(self.header)
     
     def rowCount(self, parent = QModelIndex()):
         """
@@ -69,8 +69,16 @@
         if not index.isValid():
             return None
         
-        if role == Qt.DisplayRole or role == Qt.ToolTipRole:
-            if index.column() < len(self.header):
+        if role == Qt.DisplayRole:
+            if index.column() in [0, 1, 4]:
+                return self.watchpoints[index.row()][index.column()]
+        
+        if role == Qt.CheckStateRole:
+            if index.column() in [2, 3]:
+                return self.watchpoints[index.row()][index.column()]
+        
+        if role == Qt.ToolTipRole:
+            if index.column() in [0, 1]:
                 return self.watchpoints[index.row()][index.column()]
         
         if role == Qt.TextAlignmentRole:
--- a/Debugger/WatchPointViewer.py	Mon Aug 30 11:05:37 2010 +0200
+++ b/Debugger/WatchPointViewer.py	Mon Aug 30 12:30:29 2010 +0200
@@ -279,7 +279,7 @@
                 (cond, temp, enabled, count, special), self)
             if dlg.exec_() == QDialog.Accepted:
                 cond, temp, enabled, count, special = dlg.getData()
-                if not self.__findDuplicates(cond, special, True, index):
+                if not self.__findDuplicates(cond, special, True, sindex):
                     self.__model.setWatchPointByIndex(sindex, 
                         cond, special, (temp, enabled, count))
                     self.__resizeColumns()

eric ide

mercurial