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 (UserAgentManager)
reference to the user agent manager
parent (QObject)
reference to the parent object

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 (QModelIndex)
parent index (unused)
Return:
number of columns
Return Type:
int

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

UserAgentModel.headerData

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

Public method to get the header data.

section (int)
section number
orientation (Qt.Orientation)
header orientation
role (Qt.ItemDataRole)
data role
Return:
header data
Return Type:
Any

UserAgentModel.removeRows

removeRows(row, count, parent=None)

Public method to remove entries from the model.

row (int)
start row
count (int)
number of rows to remove
parent (QModelIndex)
parent index
Return:
flag indicating success
Return Type:
bool

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