11 from PyQt4.QtGui import QTreeView, QAbstractItemView, QMenu, QSortFilterProxyModel, \ |
11 from PyQt4.QtGui import QTreeView, QAbstractItemView, QMenu, QSortFilterProxyModel, \ |
12 QHeaderView, QItemSelectionModel, QDialog |
12 QHeaderView, QItemSelectionModel, QDialog |
13 |
13 |
14 from E5Gui.E5Application import e5App |
14 from E5Gui.E5Application import e5App |
15 from E5Gui import E5MessageBox |
15 from E5Gui import E5MessageBox |
16 |
|
17 from .EditWatchpointDialog import EditWatchpointDialog |
|
18 |
16 |
19 import Utilities |
17 import Utilities |
20 |
18 |
21 |
19 |
22 class WatchPointViewer(QTreeView): |
20 class WatchPointViewer(QTreeView): |
240 |
238 |
241 def __addWatchPoint(self): |
239 def __addWatchPoint(self): |
242 """ |
240 """ |
243 Private slot to handle the add watch expression context menu entry. |
241 Private slot to handle the add watch expression context menu entry. |
244 """ |
242 """ |
|
243 from .EditWatchpointDialog import EditWatchpointDialog |
245 dlg = EditWatchpointDialog(("", False, True, 0, ""), self) |
244 dlg = EditWatchpointDialog(("", False, True, 0, ""), self) |
246 if dlg.exec_() == QDialog.Accepted: |
245 if dlg.exec_() == QDialog.Accepted: |
247 cond, temp, enabled, ignorecount, special = dlg.getData() |
246 cond, temp, enabled, ignorecount, special = dlg.getData() |
248 if not self.__findDuplicates(cond, special, True): |
247 if not self.__findDuplicates(cond, special, True): |
249 self.__model.addWatchPoint(cond, special, (temp, enabled, ignorecount)) |
248 self.__model.addWatchPoint(cond, special, (temp, enabled, ignorecount)) |
279 if not wp: |
278 if not wp: |
280 return |
279 return |
281 |
280 |
282 cond, special, temp, enabled, count = wp[:5] |
281 cond, special, temp, enabled, count = wp[:5] |
283 |
282 |
|
283 from .EditWatchpointDialog import EditWatchpointDialog |
284 dlg = EditWatchpointDialog( |
284 dlg = EditWatchpointDialog( |
285 (cond, temp, enabled, count, special), self) |
285 (cond, temp, enabled, count, special), self) |
286 if dlg.exec_() == QDialog.Accepted: |
286 if dlg.exec_() == QDialog.Accepted: |
287 cond, temp, enabled, count, special = dlg.getData() |
287 cond, temp, enabled, count, special = dlg.getData() |
288 if not self.__findDuplicates(cond, special, True, sindex): |
288 if not self.__findDuplicates(cond, special, True, sindex): |