# eric7.WebBrowser.CookieJar.CookieExceptionsModel

Module implementing the cookie exceptions model.

### Global Attributes

None

### Classes

CookieExceptionsModel | Class implementing the cookie exceptions model.

### Functions

None

## CookieExceptionsModel

Class implementing the cookie exceptions model.

### Derived from

QAbstractTableModel

### Class Attributes

None

### Class Methods

None

### Methods

CookieExceptionsModel | Constructor
__addHost | Private method to add a host to an exception list.
addRule | Public method to add an exception rule.
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 header data from the model.
removeRows | Public method to remove entries from the model.
rowCount | Public method to get the number of rows of the model.

### Static Methods

None

#### CookieExceptionsModel (Constructor)

CookieExceptionsModel(cookieJar, parent=None)

Constructor

cookieJar (CookieJar)
  reference to the cookie jar
parent (QObject)
  reference to the parent object

#### CookieExceptionsModel.__addHost

__addHost(host, addList, removeList1, removeList2)

Private method to add a host to an exception list.

host (str)
  name of the host to add
addList (list of str)
  reference to the list to add it to
removeList1 (list of str)
  reference to first list to remove it from
removeList2 (list of str)
  reference to second list to remove it from

#### CookieExceptionsModel.addRule

addRule(host, rule)

Public method to add an exception rule.

host (str)
  name of the host to add a rule for
rule (CookieExceptionRuleType)
  type of rule to add

#### CookieExceptionsModel.columnCount

columnCount(parent=None)

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

parent (QModelIndex)
  parent index

Return:
  number of columns

Return Type:
  int

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

#### CookieExceptionsModel.headerData

headerData(section, orientation, role)

Public method to get header data from the model.

section (int)
  section number
orientation (Qt.Orientation)
  orientation
role (Qt.ItemDataRole)
  role of the data to retrieve

Return:
  requested data

Return Type:
  Any

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

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