#include <Template.h>
|
| | Template (const QString &pTemplate) |
| | Construct the template pTemplate.
|
| const QSet< QString > & | getContextKeys () const |
| | Get template context keys, i.e.
|
| bool | setContextParameter (const QString &pKey, const QString &pValue) |
| | Set known context key as parameter.
|
| QString | render () const |
| | Renders the template by replacing all contained context keys by context values.
|
|
| static Template | fromFile (const QString &pTemplateFileName) |
| | Construct a template from file.
|
◆ Template()
| Template::Template |
( |
const QString & | pTemplate | ) |
|
|
explicit |
Construct the template pTemplate.
◆ fromFile()
| Template Template::fromFile |
( |
const QString & | pTemplateFileName | ) |
|
|
static |
Construct a template from file.
◆ getContextKeys()
| const QSet< QString > & Template::getContextKeys |
( |
| ) |
const |
|
nodiscard |
Get template context keys, i.e.
the possible keys to add as context parameter.
◆ render()
| QString Template::render |
( |
| ) |
const |
|
nodiscard |
Renders the template by replacing all contained context keys by context values.
If for a contained key no value is specified, the key is replaced by the empty string.
◆ setContextParameter()
| bool Template::setContextParameter |
( |
const QString & | pKey, |
|
|
const QString & | pValue ) |
Set known context key as parameter.
Unknown context keys are ignored, already set context values are overwritten.
- Rückgabe
- true, if the context key is known, false otherwise
Die Dokumentation für diese Klasse wurde erzeugt aufgrund der Dateien: