# eric7.Debugger.WatchPointViewer

Module implementing the watch expression viewer widget.

### Global Attributes

None

### Classes

WatchPointViewer | Class implementing the watch expression viewer widget.

### Functions

None

## WatchPointViewer

Class implementing the watch expression viewer widget.

Watch expressions will be shown with all their details. They can be modified through the context menu of this widget.

### Derived from

QTreeView

### Class Attributes

None

### Class Methods

None

### Methods

WatchPointViewer | Constructor
__addWatchPoint | Private slot to handle the add watch expression context menu entry.
__clearSelection | Private slot to clear the selection.
__configure | Private method to open the configuration dialog.
__createPopupMenus | Private method to generate the popup menus.
__deleteAllWatchPoints | Private slot to handle the delete all watch expressions context menu entry.
__deleteSelectedWatchPoints | Private slot to handle the delete selected watch expressions context menu entry.
__deleteWatchPoint | Private slot to handle the delete watch expression context menu entry.
__disableAllWatchPoints | Private slot to handle the disable all watch expressions context menu entry.
__disableSelectedWatchPoints | Private slot to handle the disable selected watch expressions context menu entry.
__disableWatchPoint | Private slot to handle the disable watch expression context menu entry.
__doEditWatchPoint | Private slot to edit a watch expression.
__doubleClicked | Private slot to handle the double clicked signal.
__editWatchPoint | Private slot to handle the edit watch expression context menu entry.
__enableAllWatchPoints | Private slot to handle the enable all watch expressions context menu entry.
__enableSelectedWatchPoints | Private slot to handle the enable selected watch expressions context menu entry.
__enableWatchPoint | Private slot to handle the enable watch expression context menu entry.
__findDuplicates | Private method to check, if an entry already exists.
__fromSourceIndex | Private slot to convert a source index to an index.
__getSelectedItemsCount | Private method to get the count of items selected.
__layoutDisplay | Private slot to perform a layout operation.
__resizeColumns | Private slot to resize the view when items get added, edited or deleted.
__resort | Private slot to resort the tree.
__setRowSelected | Private slot to select a complete row.
__setWpEnabled | Private method to set the enabled status of a watch expression.
__showBackMenu | Private slot to handle the aboutToShow signal of the background menu.
__showContextMenu | Private slot to show the context menu.
__toSourceIndex | Private slot to convert an index to a source index.
setModel | Public slot to set the watch expression model.

### Static Methods

None

#### WatchPointViewer (Constructor)

WatchPointViewer(parent=None)

Constructor

parent
  the parent (QWidget)

#### WatchPointViewer.__addWatchPoint

__addWatchPoint()

Private slot to handle the add watch expression context menu entry.

#### WatchPointViewer.__clearSelection

__clearSelection()

Private slot to clear the selection.

#### WatchPointViewer.__configure

__configure()

Private method to open the configuration dialog.

#### WatchPointViewer.__createPopupMenus

__createPopupMenus()

Private method to generate the popup menus.

#### WatchPointViewer.__deleteAllWatchPoints

__deleteAllWatchPoints()

Private slot to handle the delete all watch expressions context menu entry.

#### WatchPointViewer.__deleteSelectedWatchPoints

__deleteSelectedWatchPoints()

Private slot to handle the delete selected watch expressions context menu entry.

#### WatchPointViewer.__deleteWatchPoint

__deleteWatchPoint()

Private slot to handle the delete watch expression context menu entry.

#### WatchPointViewer.__disableAllWatchPoints

__disableAllWatchPoints()

Private slot to handle the disable all watch expressions context menu entry.

#### WatchPointViewer.__disableSelectedWatchPoints

__disableSelectedWatchPoints()

Private slot to handle the disable selected watch expressions context menu entry.

#### WatchPointViewer.__disableWatchPoint

__disableWatchPoint()

Private slot to handle the disable watch expression context menu entry.

#### WatchPointViewer.__doEditWatchPoint

__doEditWatchPoint(index)

Private slot to edit a watch expression.

index
  index of watch expression to be edited (QModelIndex)

#### WatchPointViewer.__doubleClicked

__doubleClicked(index)

Private slot to handle the double clicked signal.

index
  index of the entry that was double clicked (QModelIndex)

#### WatchPointViewer.__editWatchPoint

__editWatchPoint()

Private slot to handle the edit watch expression context menu entry.

#### WatchPointViewer.__enableAllWatchPoints

__enableAllWatchPoints()

Private slot to handle the enable all watch expressions context menu entry.

#### WatchPointViewer.__enableSelectedWatchPoints

__enableSelectedWatchPoints()

Private slot to handle the enable selected watch expressions context menu entry.

#### WatchPointViewer.__enableWatchPoint

__enableWatchPoint()

Private slot to handle the enable watch expression context menu entry.

#### WatchPointViewer.__findDuplicates

__findDuplicates(cond, special, showMessage=False, index=None)

Private method to check, if an entry already exists.

cond
  condition to check (string)
special
  special condition to check (string)
showMessage
  flag indicating a message should be shown, if a duplicate entry is found (boolean)
index
  index that should not be considered duplicate (QModelIndex)

Return:
  flag indicating a duplicate entry (boolean)

#### WatchPointViewer.__fromSourceIndex

__fromSourceIndex(sindex)

Private slot to convert a source index to an index.

sindex
  source index to be converted (QModelIndex)

Return:
  mapped index (QModelIndex)

#### WatchPointViewer.__getSelectedItemsCount

__getSelectedItemsCount()

Private method to get the count of items selected.

Return:
  count of items selected (integer)

#### WatchPointViewer.__layoutDisplay

__layoutDisplay()

Private slot to perform a layout operation.

#### WatchPointViewer.__resizeColumns

__resizeColumns()

Private slot to resize the view when items get added, edited or deleted.

#### WatchPointViewer.__resort

__resort()

Private slot to resort the tree.

#### WatchPointViewer.__setRowSelected

__setRowSelected(index, selected=True)

Private slot to select a complete row.

index
  index determining the row to be selected (QModelIndex)
selected
  flag indicating the action (bool)

#### WatchPointViewer.__setWpEnabled

__setWpEnabled(index, enabled)

Private method to set the enabled status of a watch expression.

index
  index of watch expression to be enabled/disabled (QModelIndex)
enabled
  flag indicating the enabled status to be set (boolean)

#### WatchPointViewer.__showBackMenu

__showBackMenu()

Private slot to handle the aboutToShow signal of the background menu.

#### WatchPointViewer.__showContextMenu

__showContextMenu(coord)

Private slot to show the context menu.

coord
  the position of the mouse pointer (QPoint)

#### WatchPointViewer.__toSourceIndex

__toSourceIndex(index)

Private slot to convert an index to a source index.

index
  index to be converted (QModelIndex)

Return:
  mapped index (QModelIndex)

#### WatchPointViewer.setModel

setModel(model)

Public slot to set the watch expression model.

model
  reference to the watch expression model (WatchPointModel)

Up