# eric7.Preferences.HighlightingStylesFile

Module implementing a class representing the highlighting styles JSON file.

### Global Attributes

None

### Classes

HighlightingStylesFile | Class representing the highlighting styles JSON file.

### Functions

None

## HighlightingStylesFile

Class representing the highlighting styles JSON file.

### Derived from

QObject

### Class Attributes

None

### Class Methods

None

### Methods

HighlightingStylesFile | Constructor
readFile | Public method to read the highlighting styles data from a highlighting styles JSON file.
writeFile | Public method to write the highlighting styles data to a highlighting styles JSON file.

### Static Methods

None

#### HighlightingStylesFile (Constructor)

HighlightingStylesFile(parent: QObject = None)

Constructor

parent (QObject (optional))
  reference to the parent object (defaults to None)

#### HighlightingStylesFile.readFile

readFile(filename: str)

Public method to read the highlighting styles data from a highlighting styles JSON file.

filename (str)
  name of the highlighting styles file

Return:
  list of read lexer style definitions

Return Type:
  list of dict

#### HighlightingStylesFile.writeFile

writeFile(filename: str, lexers: list)

Public method to write the highlighting styles data to a highlighting styles JSON file.

filename (str)
  name of the highlighting styles file
lexers (list of PreferencesLexer)
  list of lexers for which to export the styles

Return:
  flag indicating a successful write

Return Type:
  bool

Up