marble
#include <TemplateDocument.h>
Public Member Functions | |
| TemplateDocument () | |
| TemplateDocument (const QString &templateText) | |
| ~TemplateDocument () | |
| 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 37 of file TemplateDocument.h.
Constructor & Destructor Documentation
| Marble::TemplateDocument::TemplateDocument | ( | ) | 
Definition at line 56 of file TemplateDocument.cpp.
| Marble::TemplateDocument::TemplateDocument | ( | const QString & | templateText | ) | 
Definition at line 61 of file TemplateDocument.cpp.
| Marble::TemplateDocument::~TemplateDocument | ( | ) | 
Definition at line 67 of file TemplateDocument.cpp.
Member Function Documentation
| QString Marble::TemplateDocument::finalText | ( | ) | const | 
Final proceed text.
- Returns
 - ready text with all variables and includes processed
 
Definition at line 92 of file TemplateDocument.cpp.
| QString & Marble::TemplateDocument::operator[] | ( | const QString & | key | ) | 
Indexator for template values.
- Parameters
 - 
  
key template value's index  
- Returns
 - reference for the item
 
Definition at line 87 of file TemplateDocument.cpp.
| void Marble::TemplateDocument::setTemplate | ( | const QString & | newTemplateText | ) | 
Set template text.
- Parameters
 - 
  
newTemplateText new template text  
Definition at line 72 of file TemplateDocument.cpp.
| void Marble::TemplateDocument::setValue | ( | const QString & | key, | 
| const QString & | value | ||
| ) | 
Change set template value into new one.
- Parameters
 - 
  
key template key value template value  
Definition at line 82 of file TemplateDocument.cpp.
| QString Marble::TemplateDocument::value | ( | const QString & | key | ) | const | 
Returns the current template value of key. 
- Parameters
 - 
  
key template key (%<here>%)  
- Returns
 - value of the template
 
Definition at line 77 of file TemplateDocument.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:38:57 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.
    KDE API Reference