eric7.Templates.TemplatesFile
Module implementing a class representing the templates JSON file.
Global Attributes
Classes
Functions
TemplatesFile
Class representing the templates JSON file.
Derived from
QObject
Class Attributes
Class Methods
Methods
TemplatesFile |
Constructor |
readFile |
Public method to read the templates data from a templates JSON file. |
writeFile |
Public method to write the templates data to a templates JSON file. |
Static Methods
TemplatesFile (Constructor)
TemplatesFile(viewer: TemplateViewer, parent: QObject = None)
Constructor
- viewer (TemplateViewer)
-
reference to the template viewer object
- parent (QObject (optional))
-
reference to the parent object (defaults to None)
TemplatesFile.readFile
readFile(filename: str)
Public method to read the templates data from a templates JSON file.
- filename (str)
-
name of the templates file
- Return:
-
flag indicating a successful read
- Return Type:
-
bool
TemplatesFile.writeFile
writeFile(filename: str)
Public method to write the templates data to a templates JSON file.
- filename (str)
-
name of the templates file
- Return:
-
flag indicating a successful write
- Return Type:
-
bool