TemplateScriptRegistrar Class Reference
from PyKDE4.ktexteditor import *
Namespace: KTextEditor
Detailed Description
- Since:
- 4.5 This is an interface for inserting template strings with user editable fields into a document and support for scripts. Fold back into base Interface in KDE 5
Methods | |
__init__ (self) | |
KTextEditor.TemplateScript | registerTemplateScript (self, QObject owner, QString script) |
unregisterTemplateScript (self, KTextEditor.TemplateScript templateScript) |
Method Documentation
__init__ | ( | self ) |
KTextEditor.TemplateScript registerTemplateScript | ( | self, | ||
QObject | owner, | |||
QString | script | |||
) |
- Abstract method:
- This method is abstract and can be overridden but not called directly.
This registeres the script, which is contained in
- Parameters:
-
script.
- Returns:
- the template script pointer, returns an empty QString on error The implementation has to register the script for all views and all documents, == globally If owner is destructed, all scripts owned by it are automatically freed. Scripts have to be self contained. Depending on the underlying editor, there might be some global functions, perhaps there will be a specifiction for a common functionset later on, but not yet.
unregisterTemplateScript | ( | self, | ||
KTextEditor.TemplateScript | templateScript | |||
) |
- Abstract method:
- This method is abstract and can be overridden but not called directly.
This frees the template script which is identified by the token