# eric4.Preferences.PreferencesLexer

Module implementing a special QextScintilla lexer to handle the preferences.

### Global Attributes

None

### Classes

PreferencesLexer | Subclass of QsciLexer to implement preferences specific lexer methods.
PreferencesLexerError | Class defining a special error for the PreferencesLexer class.
PreferencesLexerLanguageError | Class defining a special error for the PreferencesLexer class.

### Functions

None

## PreferencesLexer

Subclass of QsciLexer to implement preferences specific lexer methods.

### Derived from

QsciLexer

### Class Attributes

None

### Class Methods

None

### Methods

PreferencesLexer | Constructor
color | Public method to get the colour of a style.
defaulEolFill | Public method to get the default eolFill flag for a style.
defaultColor | Public method to get the default colour of a style.
defaultFont | Public method to get the default font for a style.
defaultPaper | Public method to get the default background for a style.
description | Public method to get a descriptive string for a style.
eolFill | Public method to get the eolFill flag for a style.
font | Public method to get the font for a style.
language | Public method to get the lexers programming language.
paper | Public method to get the background for a style.
setColor | Public method to set the colour for a style.
setEolFill | Public method to set the eolFill flag for a style.
setFont | Public method to set the font for a style.
setPaper | Public method to set the background for a style.

### Static Methods

None

#### PreferencesLexer (Constructor)

PreferencesLexer(language, parent=None)

Constructor

language
  The lexer language. (string or QString)
parent
  The parent widget of this lexer. (QextScintilla)

#### PreferencesLexer.color

color(style)

Public method to get the colour of a style.

style
  the style number (int)

Returns:
  colour

#### PreferencesLexer.defaulEolFill

defaulEolFill(style)

Public method to get the default eolFill flag for a style.

style
  the style number (int)

Returns:
  eolFill flag

#### PreferencesLexer.defaultColor

defaultColor(style)

Public method to get the default colour of a style.

style
  the style number (int)

Returns:
  colour

#### PreferencesLexer.defaultFont

defaultFont(style)

Public method to get the default font for a style.

style
  the style number (int)

Returns:
  font

#### PreferencesLexer.defaultPaper

defaultPaper(style)

Public method to get the default background for a style.

style
  the style number (int)

Returns:
  colour

#### PreferencesLexer.description

description(style)

Public method to get a descriptive string for a style.

style
  the style number (int)

Returns:
  description of the style (QString)

#### PreferencesLexer.eolFill

eolFill(style)

Public method to get the eolFill flag for a style.

style
  the style number (int)

Returns:
  eolFill flag

#### PreferencesLexer.font

font(style)

Public method to get the font for a style.

style
  the style number (int)

Returns:
  font

#### PreferencesLexer.language

language()

Public method to get the lexers programming language.

Returns:
  language

#### PreferencesLexer.paper

paper(style)

Public method to get the background for a style.

style
  the style number (int)

Returns:
  colour

#### PreferencesLexer.setColor

setColor(c, style)

Public method to set the colour for a style.

c
  colour (int)
style
  the style number (int)

#### PreferencesLexer.setEolFill

setEolFill(eolfill, style)

Public method to set the eolFill flag for a style.

eolfill
  eolFill flag (boolean)
style
  the style number (int)

#### PreferencesLexer.setFont

setFont(f, style)

Public method to set the font for a style.

f
  font
style
  the style number (int)

#### PreferencesLexer.setPaper

setPaper(c, style)

Public method to set the background for a style.

c
  colour (int)
style
  the style number (int)

Up

## PreferencesLexerError

Class defining a special error for the PreferencesLexer class.

### Derived from

Exception

### Class Attributes

None

### Class Methods

None

### Methods

PreferencesLexerError | Constructor
__repr__ | Private method returning a representation of the exception.
__str__ | Private method returning a string representation of the exception.

### Static Methods

None

#### PreferencesLexerError (Constructor)

PreferencesLexerError()

Constructor

#### PreferencesLexerError.__repr__

__repr__()

Private method returning a representation of the exception.

Returns:
  string representing the error message

#### PreferencesLexerError.__str__

__str__()

Private method returning a string representation of the exception.

Returns:
  string representing the error message

Up

## PreferencesLexerLanguageError

Class defining a special error for the PreferencesLexer class.

### Derived from

PreferencesLexerError

### Class Attributes

None

### Class Methods

None

### Methods

PreferencesLexerLanguageError | Constructor

### Static Methods

None

#### PreferencesLexerLanguageError (Constructor)

PreferencesLexerLanguageError(language)

Constructor

Up