# eric7.Preferences.ConfigurationPages.DiffColoursPage

Module implementing the Diff colours configuration page.

### Global Attributes

None

### Classes

DiffColoursPage | Class implementing the Diff colours configuration page.

### Functions

create | Module function to create the configuration page.

## DiffColoursPage

Class implementing the Diff colours configuration page.

### Derived from

ConfigurationPageBase, Ui_DiffColoursPage

### Class Attributes

None

### Class Methods

None

### Methods

DiffColoursPage | Constructor
__initColour | Private method to initialize a colour selection button.
__selectBackgroundColour | Private slot to select a background colour.
__selectTextColour | Private slot to select the text colour.
__updateSampleBackgroundColour | Private slot to update the background colour of a sample.
__updateSampleTextColour | Private slot to update the text colour of all samples.
save | Public slot to save the Diff colours configuration.

### Static Methods

None

#### DiffColoursPage (Constructor)

DiffColoursPage()

Constructor

#### DiffColoursPage.__initColour

__initColour(colourKey, button, initSlot, selectSlot, sampleWidget)

Private method to initialize a colour selection button.

colourKey (str)
  key of the diff colour
button (QPushButton)
  reference to the button
initSlot (func)
  slot to be called to initialize the sample
selectSlot (func)
  slot to be called to select the colour
sampleWidget (QLineEdit)
  reference to the sample widget

#### DiffColoursPage.__selectBackgroundColour

__selectBackgroundColour(button)

Private slot to select a background colour.

button (QPushButton)
  reference to the button been pressed

#### DiffColoursPage.__selectTextColour

__selectTextColour(button)

Private slot to select the text colour.

button (QPushButton)
  reference to the button been pressed

#### DiffColoursPage.__updateSampleBackgroundColour

__updateSampleBackgroundColour(colourKey)

Private slot to update the background colour of a sample.

colourKey (str)
  key of the diff colour

#### DiffColoursPage.__updateSampleTextColour

__updateSampleTextColour(colourKey)

Private slot to update the text colour of all samples.

colourKey (str)
  key of the diff colour

#### DiffColoursPage.save

save()

Public slot to save the Diff colours configuration.

Up

## create

create(dlg)

Module function to create the configuration page.

dlg
  reference to the configuration dialog

Return:
  reference to the instantiated page (ConfigurationPageBase)

Up