# eric7.Preferences.ConfigurationPages.ConfigurationPageBase

Module implementing the base class for all configuration pages.

### Global Attributes

None

### Classes

ConfigurationPageBase | Class implementing the base class for all configuration pages.

### Functions

None

## ConfigurationPageBase

Class implementing the base class for all configuration pages.

### Signals

colourChanged(str, QColor)
  To inform about a new colour selection

### Derived from

QWidget

### Class Attributes

None

### Class Methods

None

### Methods

ConfigurationPageBase | Constructor
__selectColourSlot | Private slot to select a color.
initColour | Public method to initialize a colour selection button.
polishPage | Public slot to perform some polishing actions.
saveColours | Public method to save the colour selections.
saveState | Public method to save the current state of the widget.
selectFont | Public method used by the font selection buttons.
setState | Public method to set the state of the widget.

### Static Methods

None

#### ConfigurationPageBase (Constructor)

ConfigurationPageBase()

Constructor

#### ConfigurationPageBase.__selectColourSlot

__selectColourSlot(button)

Private slot to select a color.

button (QPushButton)
  reference to the button been pressed

#### ConfigurationPageBase.initColour

initColour(colourKey, button, prefMethod, byName=False, hasAlpha=False)

Public method to initialize a colour selection button.

colourKey (string)
  key of the colour resource
button (QPushButton)
  reference to a button to show the colour on
prefMethod (function)
  preferences method to get the colour
byName (bool)
  flag indicating to retrieve/save by colour name
hasAlpha (bool)
  flag indicating to allow alpha channel

#### ConfigurationPageBase.polishPage

polishPage()

Public slot to perform some polishing actions.

#### ConfigurationPageBase.saveColours

saveColours(prefMethod)

Public method to save the colour selections.

prefMethod (function)
  preferences method to set the colour

#### ConfigurationPageBase.saveState

saveState()

Public method to save the current state of the widget.

#### ConfigurationPageBase.selectFont

selectFont(fontSample, fontVar, showFontInfo=False, options=None)

Public method used by the font selection buttons.

fontSample (QLineEdit)
  reference to the font sample widget
fontVar (QFont)
  reference to the variable containing the font
showFontInfo (bool)
  flag indicating to show some font info as the sample
options (QFontDialog.FontDialogOption)
  options for the font dialog

Return:
  selected font

Return Type:
  QFont

#### ConfigurationPageBase.setState

setState(state)

Public method to set the state of the widget.

state (list)
  state data generated by saveState

Up