KTextTemplate::AbstractTemplateLoader Class
class KTextTemplate::AbstractTemplateLoaderAn retrieval interface to a storage location for Template objects. More...
Header: | #include <KTextTemplate/TemplateLoader> |
CMake: | find_package(KF6 REQUIRED COMPONENTS TextTemplate) target_link_libraries(mytarget PRIVATE KF6::TextTemplate) |
Inherited By: | KTextTemplate::CachingLoaderDecorator, KTextTemplate::FileSystemTemplateLoader, and KTextTemplate::InMemoryTemplateLoader |
Public Functions
virtual bool | canLoadTemplate(const QString &name) const = 0 |
virtual std::pair<QString, QString> | getMediaUri(const QString &fileName) const = 0 |
virtual KTextTemplate::Template | loadByName(const QString &name, const KTextTemplate::Engine *engine) const = 0 |
Detailed Description
This interface can be implemented to define new ways of retrieving the content of Templates.
The interface of this class should not be called directly from applications. TemplateLoaders will typically be created, configured and added to the KTextTemplate::Engine which will call the appropriate API.
Member Function Documentation
[pure virtual]
bool AbstractTemplateLoader::canLoadTemplate(const QString &name) const
Return true if a Template identified by name exists and can be loaded.
[pure virtual]
std::pair<QString, QString> AbstractTemplateLoader::getMediaUri(const QString &fileName) const
Return a complete URI for media identified by fileName.
[pure virtual]
KTextTemplate::Template AbstractTemplateLoader::loadByName(const QString &name, const KTextTemplate::Engine *engine) const
Load a Template called name. Return an invalid Template if no content by that name exists.