# eric7.WebBrowser.UserAgent.UserAgentModel

Module implementing a model for user agent management.

### Global Attributes

None

### Classes

UserAgentModel | Class implementing a model for user agent management.

### Functions

None

## UserAgentModel

Class implementing a model for user agent management.

### Derived from

QAbstractTableModel

### Class Attributes

None

### Class Methods

None

### Methods

UserAgentModel | Constructor
__userAgentsChanged | Private slot handling a change of the registered user agent strings.
columnCount | Public method to get the number of columns of the model.
data | Public method to get data from the model.
headerData | Public method to get the header data.
removeRows | Public method to remove entries from the model.
rowCount | Public method to get the number of rows of the model.

### Static Methods

None

#### UserAgentModel (Constructor)

UserAgentModel(manager, parent=None)

Constructor

manager
  reference to the user agent manager (UserAgentManager)
parent
  reference to the parent object (QObject)

#### UserAgentModel.__userAgentsChanged

__userAgentsChanged()

Private slot handling a change of the registered user agent strings.

#### UserAgentModel.columnCount

columnCount(parent=None)

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

parent
  parent index (QModelIndex) (Unused)

Return:
  number of columns (integer)

#### UserAgentModel.data

data(index, role)

Public method to get data from the model.

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

Return:
  requested data

#### UserAgentModel.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

#### UserAgentModel.removeRows

removeRows(row, count, parent=None)

Public method to remove entries from the model.

row
  start row (integer)
count
  number of rows to remove (integer)
parent
  parent index (QModelIndex)

Return:
  flag indicating success (boolean)

#### UserAgentModel.rowCount

rowCount(parent=None)

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

parent
  parent index (QModelIndex)

Return:
  number of rows (integer)

Up