# eric6.WebBrowser.OpenSearch.OpenSearchEngineModel

Module implementing a model for search engines.

### Global Attributes

None

### Classes

OpenSearchEngineModel | Class implementing a model for search engines.

### Functions

None

## OpenSearchEngineModel

Class implementing a model for search engines.

### Derived from

QAbstractTableModel

### Class Attributes

None

### Class Methods

None

### Methods

OpenSearchEngineModel | Constructor
__enginesChanged | Private slot handling a change of the registered engines.
columnCount | Public method to get the number of columns of the model.
data | Public method to get data from the model.
flags | Public method to get flags for a model cell.
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.
setData | Public method to set the data of a model cell.

### Static Methods

None

#### OpenSearchEngineModel (Constructor)

OpenSearchEngineModel(manager, parent=None)

Constructor

manager
  reference to the search engine manager (OpenSearchManager)
parent
  reference to the parent object (QObject)

#### OpenSearchEngineModel.__enginesChanged

__enginesChanged()

Private slot handling a change of the registered engines.

#### OpenSearchEngineModel.columnCount

columnCount(parent=None)

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

parent
  parent index (QModelIndex) (Unused)

Returns:
  number of columns (integer)

#### OpenSearchEngineModel.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)

Returns:
  requested data

#### OpenSearchEngineModel.flags

flags(index)

Public method to get flags for a model cell.

index
  index of the model cell (QModelIndex)

Returns:
  flags (Qt.ItemFlags)

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

#### OpenSearchEngineModel.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)

Returns:
  flag indicating success (boolean)

#### OpenSearchEngineModel.rowCount

rowCount(parent=None)

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

parent
  parent index (QModelIndex)

Returns:
  number of rows (integer)

#### OpenSearchEngineModel.setData

setData(index, value, role=Qt.EditRole)

Public method to set the data of a model cell.

index
  index of the model cell (QModelIndex)
value
  value to be set
role
  role of the data (integer)

Returns:
  flag indicating success (boolean)

Up