eric7.Debugger.WatchPointModel

Module implementing the Watch expression model.

Global Attributes

None

Classes

WatchPointModel Class implementing a custom model for watch expressions.

Functions

None


WatchPointModel

Class implementing a custom model for watch expressions.

Signals

dataAboutToBeChanged(QModelIndex, QModelIndex)
emitted to indicate a change of the data

Derived from

QAbstractItemModel

Class Attributes

Alignments
ConditionColumn
EnabledColumn
Header
IgnoreCountColumn
SpecialColumn
TemporaryColumn

Class Methods

None

Methods

WatchPointModel Constructor
addWatchPoint Public method to add a new watch expression to the list.
addWatchPoints Public method to add multiple watch expressions to the list.
columnCount Public method to get the current column count.
data Public method to get the requested data.
deleteAll Public method to delete all watch expressions.
deleteWatchPointByIndex Public method to set the values of a watch expression given by index.
deleteWatchPoints Public method to delete a list of watch expressions given by their indexes.
flags Public method to get item flags.
getAllWatchpoints Public method to get the list of watchpoints.
getWatchPointByIndex Public method to get the values of a watch expression given by index.
getWatchPointIndex Public method to get the index of a watch expression given by expression.
hasChildren Public method to check for the presence of child items.
headerData Public method to get header data.
index Public method to create an index.
parent Public method to get the parent index.
rowCount Public method to get the current row count.
setWatchPointByIndex Public method to set the values of a watch expression given by index.
setWatchPointEnabledByIndex Public method to set the enabled state of a watch expression given by index.

Static Methods

None

WatchPointModel (Constructor)

WatchPointModel(parent=None)

Constructor

parent (QObject)
reference to the parent object

WatchPointModel.addWatchPoint

addWatchPoint(cond, special, properties)

Public method to add a new watch expression to the list.

cond (str)
expression of the watch expression
special (str)
special condition of the watch expression
properties (tuple of (bool, bool, int))
properties of the watch expression (tuple of temporary flag, enabled flag, ignore count)

WatchPointModel.addWatchPoints

addWatchPoints(watchpoints)

Public method to add multiple watch expressions to the list.

watchpoints (list of (str, str, bool, bool, int))
list of watch expressions with expression, special condition, temporary flag, enabled flag and ignore count each

WatchPointModel.columnCount

columnCount(parent=None)

Public method to get the current column count.

parent (QModelIndex)
index of the parent item (unused)
Return:
column count
Return Type:
int

WatchPointModel.data

data(index, role)

Public method to get the requested data.

index (QModelIndex)
index of the requested data
role (Qt.ItemDataRole)
role of the requested data
Return:
the requested data
Return Type:
Any

WatchPointModel.deleteAll

deleteAll()

Public method to delete all watch expressions.

WatchPointModel.deleteWatchPointByIndex

deleteWatchPointByIndex(index)

Public method to set the values of a watch expression given by index.

index (QModelIndex)
index of the watch expression

WatchPointModel.deleteWatchPoints

deleteWatchPoints(idxList)

Public method to delete a list of watch expressions given by their indexes.

idxList (list of QModelIndex)
list of watch expression indexes

WatchPointModel.flags

flags(index)

Public method to get item flags.

index (QModelIndex)
index of the requested flags
Return:
item flags for the given index
Return Type:
Qt.ItemFlags

WatchPointModel.getAllWatchpoints

getAllWatchpoints()

Public method to get the list of watchpoints.

Return:
list of watchpoints
Return Type:
list of list of [str, str, bool, bool, int]

WatchPointModel.getWatchPointByIndex

getWatchPointByIndex(index)

Public method to get the values of a watch expression given by index.

index (QModelIndex)
index of the watch expression
Return:
watch expression (tuple containing expression, special condition, temporary flag, enabled flag, ignore count)
Return Type:
tuple of (str, str, bool, bool, int)

WatchPointModel.getWatchPointIndex

getWatchPointIndex(cond, special="")

Public method to get the index of a watch expression given by expression.

cond (str)
expression of the watch expression
special (str)
special condition of the watch expression
Return:
index
Return Type:
QModelIndex

WatchPointModel.hasChildren

hasChildren(parent=None)

Public method to check for the presence of child items.

parent (QModelIndex)
index of parent item
Return:
flag indicating the presence of child items
Return Type:
bool

WatchPointModel.headerData

headerData(section, orientation, role=Qt.ItemDataRole.DisplayRole)

Public method to get header data.

section (int)
section number of the requested header data
orientation (Qt.Orientation)
orientation of the header
role (Qt.ItemDataRole)
role of the requested data
Return:
header data
Return Type:
Any

WatchPointModel.index

index(row, column, parent=None)

Public method to create an index.

row (int)
row number for the index
column (int)
column number for the index
parent (QModelIndex)
index of the parent item
Return:
requested index
Return Type:
QModelIndex

WatchPointModel.parent

parent(_index)

Public method to get the parent index.

_index (QModelIndex)
index of item to get parent (unused)
Return:
index of parent
Return Type:
QModelIndex

WatchPointModel.rowCount

rowCount(parent=None)

Public method to get the current row count.

parent (QModelIndex)
index of the parent item
Return:
row count
Return Type:
int

WatchPointModel.setWatchPointByIndex

setWatchPointByIndex(index, cond, special, properties)

Public method to set the values of a watch expression given by index.

index (QModelIndex)
index of the watch expression
cond (str)
expression of the watch expression
special (str)
special condition of the watch expression
properties (tuple of (bool, bool, int))
properties of the watch expression (tuple of temporary flag, enabled flag, ignore count)

WatchPointModel.setWatchPointEnabledByIndex

setWatchPointEnabledByIndex(index, enabled)

Public method to set the enabled state of a watch expression given by index.

index (QModelIndex)
index of the watch expression
enabled (bool)
flag giving the enabled state
Up