# eric7.WebBrowser.History.HistoryModel

Module implementing the history model.

### Global Attributes

None

### Classes

HistoryModel | Class implementing the history model.

### Functions

None

## HistoryModel

Class implementing the history model.

### Derived from

QAbstractTableModel

### Class Attributes

DateRole
DateTimeRole
MaxRole
TitleRole
UrlRole
UrlStringRole
VisitCountRole

### Class Methods

None

### Methods

HistoryModel | Constructor
columnCount | Public method to get the number of columns.
data | Public method to get data from the model.
entryAdded | Public slot to handle the addition of a history entry.
entryUpdated | Public slot to handle the update of a history entry.
headerData | Public method to get the header data.
historyReset | Public slot to reset the model.
removeRows | Public method to remove history entries from the model.
rowCount | Public method to determine the number of rows.

### Static Methods

None

#### HistoryModel (Constructor)

HistoryModel(historyManager, parent=None)

Constructor

historyManager
  reference to the history manager object (HistoryManager)
parent
  reference to the parent object (QObject)

#### HistoryModel.columnCount

columnCount(parent=None)

Public method to get the number of columns.

parent
  index of parent (QModelIndex)

Return:
  number of columns (integer)

#### HistoryModel.data

data(index, role=Qt.ItemDataRole.DisplayRole)

Public method to get data from the model.

index
  index of history entry to get data for (QModelIndex)
role
  data role (integer)

Return:
  history entry data

#### HistoryModel.entryAdded

entryAdded()

Public slot to handle the addition of a history entry.

#### HistoryModel.entryUpdated

entryUpdated(row)

Public slot to handle the update of a history entry.

row
  row number of the updated entry (integer)

#### HistoryModel.headerData

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

Public method to get the header data.

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

Return:
  header data

#### HistoryModel.historyReset

historyReset()

Public slot to reset the model.

#### HistoryModel.removeRows

removeRows(row, count, parent=None)

Public method to remove history entries from the model.

row
  row of the first history entry to remove (integer)
count
  number of history entries to remove (integer)
parent
  index of the parent entry (QModelIndex)

Return:
  flag indicating successful removal (boolean)

#### HistoryModel.rowCount

rowCount(parent=None)

Public method to determine the number of rows.

parent
  index of parent (QModelIndex)

Return:
  number of rows (integer)

Up