Cutelee
6.1.0
|
The InMemoryTemplateLoader loads Templates set dynamically in memory. More...
#include <cutelee/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) |
![]() | |
virtual | ~AbstractTemplateLoader () |
This class is mostly used for testing purposes, but can also be used for simple uses of Cutelee.
Templates can be made available using the setTemplate method, and will then be retrieved by the Cutelee::Engine as appropriate.
Definition at line 193 of file templateloader.h.
|
overridevirtual |
Return true if a Template identified by name
exists and can be loaded.
Implements Cutelee::AbstractTemplateLoader.
Definition at line 203 of file templateloader.cpp.
|
overridevirtual |
Return a complete URI for media identified by fileName.
Implements Cutelee::AbstractTemplateLoader.
Reimplemented in FakeTemplateLoader.
Definition at line 222 of file templateloader.cpp.
|
overridevirtual |
Load a Template called name
. Return an invalid Template if no content by that name exists.
Implements Cutelee::AbstractTemplateLoader.
Definition at line 208 of file templateloader.cpp.
References Cutelee::Engine::newTemplate().
Add a template content to this Loader.
Example:
Definition at line 197 of file templateloader.cpp.