Marble::TemplateDocument
#include <TemplateDocument.h>
Public Member Functions | |
TemplateDocument (const QString &templateText) | |
QString | finalText () const |
QString & | operator[] (const QString &key) |
void | setTemplate (const QString &newTemplateText) |
void | setValue (const QString &key, const QString &value) |
QString | value (const QString &key) const |
Detailed Description
The Template Document.
The class represents a template engine for Marble HTML/plain text. It allows to template big documents with variables like variable_name% or to make includes like %!{include_name}%
"Include" is a special type of template variables which allows to include extra already templated text into the template. E.g. %!{bootstrap}% will include bootstrap CSS files into html file, where this include is called
- See also
- TemplateDocument()
Definition at line 33 of file TemplateDocument.h.
Constructor & Destructor Documentation
◆ TemplateDocument() [1/2]
Marble::TemplateDocument::TemplateDocument | ( | ) |
Definition at line 48 of file TemplateDocument.cpp.
◆ TemplateDocument() [2/2]
|
explicit |
Definition at line 53 of file TemplateDocument.cpp.
◆ ~TemplateDocument()
Marble::TemplateDocument::~TemplateDocument | ( | ) |
Definition at line 59 of file TemplateDocument.cpp.
Member Function Documentation
◆ finalText()
QString Marble::TemplateDocument::finalText | ( | ) | const |
Final proceed text.
- Returns
- ready text with all variables and includes processed
Definition at line 84 of file TemplateDocument.cpp.
◆ operator[]()
Indexator for template values.
- Parameters
-
key template value's index
- Returns
- reference for the item
Definition at line 79 of file TemplateDocument.cpp.
◆ setTemplate()
void Marble::TemplateDocument::setTemplate | ( | const QString & | newTemplateText | ) |
Set template text.
- Parameters
-
newTemplateText new template text
Definition at line 64 of file TemplateDocument.cpp.
◆ setValue()
Change set template value into new one.
- Parameters
-
key template key value template value
Definition at line 74 of file TemplateDocument.cpp.
◆ value()
Returns the current template value of key
.
- Parameters
-
key template key (<here>)
- Returns
- value of the template
Definition at line 69 of file TemplateDocument.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:04:15 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.