eric7.Preferences.HighlightingStylesFile
Module implementing a class representing the highlighting styles JSON file.
Global Attributes
Classes
Functions
HighlightingStylesFile
Class representing the highlighting styles JSON file.
Derived from
QObject
Class Attributes
Class Methods
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
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