• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

marble

  • Marble
  • TemplateDocument
Public Member Functions | List of all members
Marble::TemplateDocument Class Reference

#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
keytemplate 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
newTemplateTextnew 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
keytemplate key
valuetemplate 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
keytemplate 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:
  • TemplateDocument.h
  • TemplateDocument.cpp
This file is part of the KDE documentation.
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.

marble

Skip menu "marble"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal