KTextTemplate::InMemoryTemplateLoader
#include <KTextTemplate/templateloader.h>
Public Member Functions | |
bool | canLoadTemplate (const QString &name) const override |
std::pair< QString, QString > | getMediaUri (const QString &fileName) const override |
Template | loadByName (const QString &name, Engine const *engine) const override |
void | setTemplate (const QString &name, const QString &content) |
Public Member Functions inherited from KTextTemplate::AbstractTemplateLoader | |
virtual | ~AbstractTemplateLoader () |
Detailed Description
The InMemoryTemplateLoader loads Templates set dynamically in memory.
This class is mostly used for testing purposes, but can also be used for simple uses of KTextTemplate.
Templates can be made available using the setTemplate method, and will then be retrieved by the KTextTemplate::Engine as appropriate.
Definition at line 180 of file templateloader.h.
Constructor & Destructor Documentation
◆ InMemoryTemplateLoader()
InMemoryTemplateLoader::InMemoryTemplateLoader | ( | ) |
Definition at line 55 of file templateloader.cpp.
Member Function Documentation
◆ canLoadTemplate()
|
overridevirtual |
Return true if a Template identified by name
exists and can be loaded.
Implements KTextTemplate::AbstractTemplateLoader.
Definition at line 177 of file templateloader.cpp.
◆ getMediaUri()
|
overridevirtual |
Return a complete URI for media identified by fileName.
Implements KTextTemplate::AbstractTemplateLoader.
Definition at line 191 of file templateloader.cpp.
◆ loadByName()
|
overridevirtual |
Load a Template called name
.
Return an invalid Template if no content by that name exists.
Implements KTextTemplate::AbstractTemplateLoader.
Definition at line 182 of file templateloader.cpp.
◆ setTemplate()
Add a template content to this Loader.
Example:
Definition at line 172 of file templateloader.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:17:29 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.