# eric7.Preferences.ConfigurationPages.DebuggerGeneralPage

Module implementing the Debugger General configuration page.

### Global Attributes

None

### Classes

DebuggerGeneralPage | Class implementing the Debugger General configuration page.
PreviewModel | Class to show an example of the selected background colours for the debug viewer.

### Functions

create | Module function to create the configuration page.

## DebuggerGeneralPage

Class implementing the Debugger General configuration page.

### Derived from

ConfigurationPageBase, Ui_DebuggerGeneralPage

### Class Attributes

None

### Class Methods

None

### Methods

DebuggerGeneralPage | Constructor
on_addAllowedHostButton_clicked | Private slot called to add a new allowed host.
on_allowedHostsList_currentItemChanged | Private method to set the state of the edit and delete button.
on_deleteAllowedHostButton_clicked | Private slot called to delete an allowed host.
on_editAllowedHostButton_clicked | Private slot called to edit an allowed host.
on_interfaceSelectorComboBox_currentIndexChanged | Private slot to handle the selection of a network interface type.
save | Public slot to save the Debugger General (1) configuration.

### Static Methods

None

#### DebuggerGeneralPage (Constructor)

DebuggerGeneralPage()

Constructor

#### DebuggerGeneralPage.on_addAllowedHostButton_clicked

on_addAllowedHostButton_clicked()

Private slot called to add a new allowed host.

#### DebuggerGeneralPage.on_allowedHostsList_currentItemChanged

on_allowedHostsList_currentItemChanged(current, _previous)

Private method to set the state of the edit and delete button.

current (QListWidgetItem)
  new current item
_previous (QListWidgetItem)
  previous current item (unused)

#### DebuggerGeneralPage.on_deleteAllowedHostButton_clicked

on_deleteAllowedHostButton_clicked()

Private slot called to delete an allowed host.

#### DebuggerGeneralPage.on_editAllowedHostButton_clicked

on_editAllowedHostButton_clicked()

Private slot called to edit an allowed host.

#### DebuggerGeneralPage.on_interfaceSelectorComboBox_currentIndexChanged

on_interfaceSelectorComboBox_currentIndexChanged(index)

Private slot to handle the selection of a network interface type.

index (int)
  index of the selected entry

#### DebuggerGeneralPage.save

save()

Public slot to save the Debugger General (1) configuration.

Up

## PreviewModel

Class to show an example of the selected background colours for the debug viewer.

### Derived from

QAbstractItemModel

### Class Attributes

None

### Class Methods

None

### Methods

PreviewModel | Constructor
columnCount | Public Qt slot to get the column count.
data | Public Qt slot get the role data of item.
flags | Public Qt slot to get the item flags.
index | Public Qt slot to get the index of item at row:column of parent.
parent | Public Qt slot to get the parent of the given child.
rowCount | Public Qt slot to get the row count.
setColor | Public slot to update the background colour indexed by key.

### Static Methods

None

#### PreviewModel (Constructor)

PreviewModel()

Constructor

#### PreviewModel.columnCount

columnCount(parent=QModelIndex())

Public Qt slot to get the column count.

parent (QModelIndex)
  the model parent (unused)

Return:
  number of columns

Return Type:
  int

#### PreviewModel.data

data(index, role=Qt.ItemDataRole.DisplayRole)

Public Qt slot get the role data of item.

index (QModelIndex)
  the model index
role (QtCore.Qt.ItemDataRole)
  the requested data role

Return:
  role data of item

Return Type:
  str, QBrush or None

#### PreviewModel.flags

flags(_index)

Public Qt slot to get the item flags.

_index (QModelIndex)
  of item (unused)

Return:
  item flags

Return Type:
  QtCore.Qt.ItemFlag

#### PreviewModel.index

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

Public Qt slot to get the index of item at row:column of parent.

row (int)
  number of rows
column (int)
  number of columns
parent (QModelIndex)
  the model parent

Return:
  new model index for child

Return Type:
  QModelIndex

#### PreviewModel.parent

parent(_child)

Public Qt slot to get the parent of the given child.

_child (QModelIndex)
  the model child node (unused)

Return:
  new model index for parent

Return Type:
  QModelIndex

#### PreviewModel.rowCount

rowCount(parent=QModelIndex())

Public Qt slot to get the row count.

parent (QModelIndex)
  the model parent (unused)

Return:
  number of rows

Return Type:
  int

#### PreviewModel.setColor

setColor(key, bgcolour)

Public slot to update the background colour indexed by key.

key (str)
  the name of background
bgcolour (QColor)
  the new background colour

Up

## create

create(_dlg)

Module function to create the configuration page.

_dlg (ConfigurationDialog)
  reference to the configuration dialog (unused)

Return:
  reference to the instantiated page

Return Type:
  ConfigurationPageBase

Up