# eric6.Helpviewer.OfflineStorage.WebDatabasesModel

Module implementing the web databases model.

### Global Attributes

None

### Classes

WebDatabasesModel | Class implementing the web databases model.

### Functions

None

## WebDatabasesModel

Class implementing the web databases model.

### Derived from

QAbstractItemModel

### Class Attributes

None

### Class Methods

None

### Methods

WebDatabasesModel | Constructor
__dataString | Private method to generate a formatted data string.
columnCount | Public method to get the number of columns.
data | Public method to get data from the model.
hasChildren | Public method to check, if a parent node has some children.
headerData | Public method to get the header data.
index | Public method to get a model index for an entry.
parent | Public method to get the index of the parent entry.
removeRows | Public method to remove databases from the model.
rowCount | Public method to determine the number of rows.

### Static Methods

None

#### WebDatabasesModel (Constructor)

WebDatabasesModel(parent=None)

Constructor

parent
  reference to the parent object (QObject)

#### WebDatabasesModel.__dataString

__dataString(size)

Private method to generate a formatted data string.

size
  size to be formatted (integer)

Returns:
  formatted data string (string)

#### WebDatabasesModel.columnCount

columnCount(parent=QModelIndex())

Public method to get the number of columns.

parent
  index of parent (QModelIndex)

Returns:
  number of columns (integer)

#### WebDatabasesModel.data

data(index, role=Qt.DisplayRole)

Public method to get data from the model.

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

Returns:
  entry data

#### WebDatabasesModel.hasChildren

hasChildren(parent=QModelIndex())

Public method to check, if a parent node has some children.

parent
  index of the parent node (QModelIndex)

Returns:
  flag indicating the presence of children (boolean)

#### WebDatabasesModel.headerData

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

Public method to get the header data.

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

Returns:
  header data

#### WebDatabasesModel.index

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

Public method to get a model index for an entry.

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

Returns:
  index (QModelIndex)

#### WebDatabasesModel.parent

parent(index=QModelIndex())

Public method to get the index of the parent entry.

index
  index of the child entry (QModelIndex)

Returns:
  index of the parent entry (QModelIndex)

#### WebDatabasesModel.removeRows

removeRows(row, count, parent=QModelIndex())

Public method to remove databases from the model.

row
  row of the first database to remove (integer)
count
  number of databases to remove (integer)
parent
  index of the security origin (QModelIndex)

Returns:
  flag indicating successful removal (boolean)

#### WebDatabasesModel.rowCount

rowCount(parent=QModelIndex())

Public method to determine the number of rows.

parent
  index of parent (QModelIndex)

Returns:
  number of rows (integer)

Up