# eric7.WebBrowser.Download.DownloadModel

Module implementing the download model.

### Global Attributes

None

### Classes

DownloadModel | Class implementing the download model.

### Functions

None

## DownloadModel

Class implementing the download model.

### Derived from

QAbstractListModel

### Class Attributes

None

### Class Methods

None

### Methods

DownloadModel | Constructor
data | Public method to get data from the model.
flags | Public method to get flags for an item.
mimeData | Public method to return the mime data.
removeRows | Public method to remove downloads from the model.
rowCount | Public method to get the number of rows of the model.

### Static Methods

None

#### DownloadModel (Constructor)

DownloadModel(manager, parent=None)

Constructor

manager (DownloadManager)
  reference to the download manager
parent (QObject)
  reference to the parent object

#### DownloadModel.data

data(index, role)

Public method to get data from the model.

index (QModelIndex)
  index to get data for
role (int)
  role of the data to retrieve

Return:
  requested data

Return Type:
  Any

#### DownloadModel.flags

flags(index)

Public method to get flags for an item.

index (QModelIndex)
  index of the node cell

Return:
  flags

Return Type:
  Qt.ItemFlags

#### DownloadModel.mimeData

mimeData(indexes)

Public method to return the mime data.

indexes (QModelIndexList)
  list of indexes

Return:
  mime data

Return Type:
  QMimeData

#### DownloadModel.removeRows

removeRows(row, count, parent=None)

Public method to remove downloads from the model.

row (int)
  row of the first download to remove
count (int)
  number of downloads to remove
parent (QModelIndex)
  index of the parent download node

Return:
  flag indicating successful removal

Return Type:
  bool

#### DownloadModel.rowCount

rowCount(parent=None)

Public method to get the number of rows of the model.

parent (QModelIndex)
  parent index

Return:
  number of rows

Return Type:
  int

Up