KTextTemplate
engine.cpp
125 if (d->m_defaultLibraries.contains(QLatin1String(s_scriptableLibName)) && !d->m_scriptableTagLibrary) {
136 throw KTextTemplate::Exception( TagSyntaxError, QStringLiteral("Could not load scriptable tags library") );
184 throw KTextTemplate::Exception(TagSyntaxError, QStringLiteral("Plugin library '%1' not found.").arg(name));
259 PluginPointer<TagLibraryInterface> scriptableTagLibrary = m_libraries.value( s_scriptableLibName );
KTextTemplate::Engine is the main entry point for creating KTextTemplate Templates.
Definition engine.h:110
QStringList pluginPaths() const
Returns the currently configured plugin dirs.
Definition engine.cpp:95
std::pair< QString, QString > mediaUri(const QString &fileName) const
Returns a URI for a media item with the name name.
Definition engine.cpp:61
Template loadByName(const QString &name) const
Load the Template identified by name.
Definition engine.cpp:311
void setPluginPaths(const QStringList &dirs)
Sets the plugin dirs currently configured on the Engine to dirs.
Definition engine.cpp:74
QList< QSharedPointer< AbstractTemplateLoader > > templateLoaders()
Returns the TemplateLoaders currently configured on the Engine.
Definition engine.cpp:49
void addPluginPath(const QString &dir)
Prepend dir to the list of plugin dirs.
Definition engine.cpp:80
void setSmartTrimEnabled(bool enabled)
Sets whether the smart trim feature is enabled for newly loaded templates.
Definition engine.cpp:341
void removeDefaultLibrary(const QString &libName)
Removes the library named libName from the libraries available by default to new Templates.
Definition engine.cpp:113
QStringList defaultLibraries() const
Returns the libraries available by default to new Templates.
Definition engine.cpp:101
Template newTemplate(const QString &content, const QString &name) const
Create a new Template with the content content identified by name.
Definition engine.cpp:332
bool smartTrimEnabled() const
Returns whether the smart trim feature is enabled for newly loaded templates.
Definition engine.cpp:347
void addTemplateLoader(QSharedPointer< AbstractTemplateLoader > loader)
Adds loader to the TemplateLoaders currently configured on the Engine.
Definition engine.cpp:55
void removePluginPath(const QString &dir)
Removes all instances of dir from the list of plugin dirs.
Definition engine.cpp:89
void addDefaultLibrary(const QString &libName)
Adds the library named libName to the libraries available by default to new Templates.
Definition engine.cpp:107
An exception for use when implementing template tags.
Definition exception.h:74
The TagLibraryInterface returns available tags and filters from libraries.
Definition taglibraryinterface.h:68
The Template class is a tree of nodes which may be rendered.
Definition template.h:85
KIOCORE_EXPORT QStringList list(const QString &fileClass)
QString name(StandardAction id)
const QList< QKeySequence > & end()
The KTextTemplate namespace holds all public KTextTemplate API.
Definition Mainpage.dox:8
QStringList libraryPaths()
T & first()
bool isEmpty() const const
QString fromLocal8Bit(QByteArrayView str)
bool isEmpty() const const
Q_D(Todo)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 6 2024 12:10:48 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 6 2024 12:10:48 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.