# eric4.Debugger.BreakPointModel

Module implementing the Breakpoint model.

### Global Attributes

None

### Classes

BreakPointModel | Class implementing a custom model for breakpoints.

### Functions

None

## BreakPointModel

Class implementing a custom model for breakpoints.

### Derived from

QAbstractItemModel

### Class Attributes

None

### Class Methods

None

### Methods

BreakPointModel | Constructor
addBreakPoint | Public method to add a new breakpoint 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 breakpoints.
deleteBreakPointByIndex | Public method to set the values of a breakpoint given by index.
deleteBreakPoints | Public method to delete a list of breakpoints given by their indexes.
flags | Public method to get item flags.
getBreakPointByIndex | Public method to get the values of a breakpoint given by index.
getBreakPointIndex | Public method to get the index of a breakpoint given by filename and line number.
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.
isBreakPointTemporaryByIndex | Public method to test, if a breakpoint given by it's index is temporary.
parent | Public method to get the parent index.
rowCount | Public method to get the current row count.
setBreakPointByIndex | Public method to set the values of a breakpoint given by index.
setBreakPointEnabledByIndex | Public method to set the enabled state of a breakpoint given by index.

### Static Methods

None

#### BreakPointModel (Constructor)

BreakPointModel(parent = None)

Constructor

reference
  to the parent widget (QObject)

#### BreakPointModel.addBreakPoint

addBreakPoint(fn, line, properties)

Public method to add a new breakpoint to the list.

fn
  filename of the breakpoint (string or QString)
line
  line number of the breakpoint (integer)
properties
  properties of the breakpoint (tuple of condition (string or QString), temporary flag (bool), enabled flag (bool), ignore count (integer))

#### BreakPointModel.columnCount

columnCount(parent = QModelIndex())

Public method to get the current column count.

Returns:
  column count (integer)

#### BreakPointModel.data

data(index, role)

Public method to get the requested data.

index
  index of the requested data (QModelIndex)
role
  role of the requested data (Qt.ItemDataRole)

Returns:
  the requested data (QVariant)

#### BreakPointModel.deleteAll

deleteAll()

Public method to delete all breakpoints.

#### BreakPointModel.deleteBreakPointByIndex

deleteBreakPointByIndex(index)

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

index
  index of the breakpoint (QModelIndex)

#### BreakPointModel.deleteBreakPoints

deleteBreakPoints(idxList)

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

idxList
  list of breakpoint indexes (list of QModelIndex)

#### BreakPointModel.flags

flags(index)

Public method to get item flags.

index
  index of the requested flags (QModelIndex)

Returns:
  item flags for the given index (Qt.ItemFlags)

#### BreakPointModel.getBreakPointByIndex

getBreakPointByIndex(index)

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

index
  index of the breakpoint (QModelIndex)

Returns:
  breakpoint (list of seven values (filename, line number, condition, temporary flag, enabled flag, ignore count))

#### BreakPointModel.getBreakPointIndex

getBreakPointIndex(fn, lineno)

Public method to get the index of a breakpoint given by filename and line number.

fn
  filename of the breakpoint (string or QString)
line
  line number of the breakpoint (integer)

Returns:
  index (QModelIndex)

#### BreakPointModel.hasChildren

hasChildren(parent = QModelIndex())

Public method to check for the presence of child items.

parent
  index of parent item (QModelIndex)

Returns:
  flag indicating the presence of child items (boolean)

#### BreakPointModel.headerData

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

Public method to get header data.

section
  section number of the requested header data (integer)
orientation
  orientation of the header (Qt.Orientation)
role
  role of the requested data (Qt.ItemDataRole)

Returns:
  header data (QVariant)

#### BreakPointModel.index

index(row, column, parent = QModelIndex())

Public method to create an index.

row
  row number for the index (integer)
column
  column number for the index (integer)
parent
  index of the parent item (QModelIndex)

Returns:
  requested index (QModelIndex)

#### BreakPointModel.isBreakPointTemporaryByIndex

isBreakPointTemporaryByIndex(index)

Public method to test, if a breakpoint given by it's index is temporary.

index
  index of the breakpoint to test (QModelIndex)

Returns:
  flag indicating a temporary breakpoint (boolean)

#### BreakPointModel.parent

parent(index)

Public method to get the parent index.

index
  index of item to get parent (QModelIndex)

Returns:
  index of parent (QModelIndex)

#### BreakPointModel.rowCount

rowCount(parent = QModelIndex())

Public method to get the current row count.

Returns:
  row count (integer)

#### BreakPointModel.setBreakPointByIndex

setBreakPointByIndex(index, fn, line, properties)

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

index
  index of the breakpoint (QModelIndex)
fn
  filename of the breakpoint (string or QString)
line
  line number of the breakpoint (integer)
properties
  properties of the breakpoint (tuple of condition (string or QString), temporary flag (bool), enabled flag (bool), ignore count (integer))

#### BreakPointModel.setBreakPointEnabledByIndex

setBreakPointEnabledByIndex(index, enabled)

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

index
  index of the breakpoint (QModelIndex)
enabled
  flag giving the enabled state (boolean)

Up