# eric7.Preferences.ConfigurationPages.EditorStylesPage

Module implementing the Editor Styles configuration page.

### Global Attributes

None

### Classes

EditorStylesPage | Class implementing the Editor Styles configuration page.

### Functions

create | Module function to create the configuration page.

## EditorStylesPage

Class implementing the Editor Styles configuration page.

### Derived from

ConfigurationPageBase, Ui_EditorStylesPage

### Class Attributes

None

### Class Methods

None

### Methods

EditorStylesPage | Constructor
__selectAnnotationColor | Private method to select an annotation color and update the sample.
__setSampleStyleSheet | Private method to colorize a sample with given foreground and background colors.
on_annotationsErrorBgButton_clicked | Private slot to set the background colour of the error annotations.
on_annotationsErrorFgButton_clicked | Private slot to set the foreground colour of the error annotations.
on_annotationsInformationBgButton_clicked | Private slot to set the background colour of the information annotations.
on_annotationsInformationFgButton_clicked | Private slot to set the foreground colour of the information annotations.
on_annotationsStyleWarningBgButton_clicked | Private slot to set the background colour of the style annotations.
on_annotationsStyleWarningFgButton_clicked | Private slot to set the foreground colour of the style annotations.
on_annotationsWarningBgButton_clicked | Private slot to set the background colour of the warning annotations.
on_annotationsWarningFgButton_clicked | Private slot to set the foreground colour of the warning annotations.
on_defaultFontButton_clicked | Private method used to select the default font for the editor.
on_linenumbersFontButton_clicked | Private method used to select the font for the editor margins.
on_monospacedFontButton_clicked | Private method used to select the font to be used as the monospaced font.
polishPage | Public slot to perform some polishing actions.
save | Public slot to save the Editor Styles configuration.
setMode | Public method to perform mode dependent setups.

### Static Methods

None

#### EditorStylesPage (Constructor)

EditorStylesPage()

Constructor

#### EditorStylesPage.__selectAnnotationColor

__selectAnnotationColor(annotationType, isBackground, annotationSample)

Private method to select an annotation color and update the sample.

annotationType (str)
  type of the annotation
isBackground (bool)
  flag indicating the background color
annotationSample (QLineEdit)
  reference to the annotation sample widget

#### EditorStylesPage.__setSampleStyleSheet

__setSampleStyleSheet(sampleLineEdit, color, background)

Private method to colorize a sample with given foreground and background colors.

sampleLineEdit (QLineEdit)
  line edit element to be colorized
color (QColor)
  text color to be shown
background (QColor)
  background color to be shown

#### EditorStylesPage.on_annotationsErrorBgButton_clicked

on_annotationsErrorBgButton_clicked()

Private slot to set the background colour of the error annotations.

#### EditorStylesPage.on_annotationsErrorFgButton_clicked

on_annotationsErrorFgButton_clicked()

Private slot to set the foreground colour of the error annotations.

#### EditorStylesPage.on_annotationsInformationBgButton_clicked

on_annotationsInformationBgButton_clicked()

Private slot to set the background colour of the information annotations.

#### EditorStylesPage.on_annotationsInformationFgButton_clicked

on_annotationsInformationFgButton_clicked()

Private slot to set the foreground colour of the information annotations.

#### EditorStylesPage.on_annotationsStyleWarningBgButton_clicked

on_annotationsStyleWarningBgButton_clicked()

Private slot to set the background colour of the style annotations.

#### EditorStylesPage.on_annotationsStyleWarningFgButton_clicked

on_annotationsStyleWarningFgButton_clicked()

Private slot to set the foreground colour of the style annotations.

#### EditorStylesPage.on_annotationsWarningBgButton_clicked

on_annotationsWarningBgButton_clicked()

Private slot to set the background colour of the warning annotations.

#### EditorStylesPage.on_annotationsWarningFgButton_clicked

on_annotationsWarningFgButton_clicked()

Private slot to set the foreground colour of the warning annotations.

#### EditorStylesPage.on_defaultFontButton_clicked

on_defaultFontButton_clicked()

Private method used to select the default font for the editor.

#### EditorStylesPage.on_linenumbersFontButton_clicked

on_linenumbersFontButton_clicked()

Private method used to select the font for the editor margins.

#### EditorStylesPage.on_monospacedFontButton_clicked

on_monospacedFontButton_clicked()

Private method used to select the font to be used as the monospaced font.

#### EditorStylesPage.polishPage

polishPage()

Public slot to perform some polishing actions.

#### EditorStylesPage.save

save()

Public slot to save the Editor Styles configuration.

#### EditorStylesPage.setMode

setMode(displayMode)

Public method to perform mode dependent setups.

displayMode (ConfigurationMode)
  mode of the configuration dialog

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