KTextTemplate
variable.cpp
87 throw KTextTemplate::Exception(TagSyntaxError, QStringLiteral("Variable may not end with a dot: %1").arg(localVar));
112 throw KTextTemplate::Exception(TagSyntaxError, QStringLiteral("Variables and attributes may not begin with underscores: %1").arg(localVar));
The Context class holds the context to render a Template with.
Definition context.h:107
QSharedPointer< AbstractLocalizer > localizer() const
Returns the localizer currently in use.
Definition context.cpp:224
QVariant lookup(const QString &str) const
Returns the context object identified by the key str.
Definition context.cpp:97
An exception for use when implementing template tags.
Definition exception.h:74
A container for static variables defined in Templates.
Definition variable.h:42
QStringList lookups() const
Returns the lookup components of this Variable.
Definition variable.cpp:148
QVariant literal() const
Returns whether this variable is a literal string or number.
Definition variable.cpp:142
QVariant resolve(Context *c) const
Resolves this Variable with the Context c.
Definition variable.cpp:163
bool isTrue(Context *c) const
Returns whether this Variable evaluates to true with the Context c.
Definition variable.cpp:131
bool isConstant() const
Returns whether this Variable is a constant in the Template.
Definition variable.cpp:125
bool isLocalized() const
Returns whether this variable is localized, that is, if it is wrapped with _().
Definition variable.cpp:136
The KTextTemplate namespace holds all public KTextTemplate API.
Definition Mainpage.dox:8
KTextTemplate::SafeString getSafeString(const QVariant &input)
Retrieves and returns a SafeString from the input.
Definition util.cpp:91
bool isSafeString(const QVariant &input)
Returns whether input contains a SafeString.
Definition util.cpp:99
bool variantIsTrue(const QVariant &variant)
Returns whether the variant is evaluated to true.
Definition util.cpp:24
QString unescapeStringLiteral(const QString &input)
Converts the input into its unescaped form.
Definition util.cpp:16
KTextTemplate::SafeString markSafe(const KTextTemplate::SafeString &input)
Marks the input as safe.
Definition util.cpp:74
QLocale c()
double toDouble(QStringView s, bool *ok) const const
int toInt(QStringView s, bool *ok) const const
bool endsWith(QChar c, Qt::CaseSensitivity cs) const const
QString mid(qsizetype position, qsizetype n) const const
qsizetype size() const const
bool startsWith(QChar c, Qt::CaseSensitivity cs) const const
QVariant fromValue(T &&value)
bool isValid() const const
Q_D(Todo)
Utility functions used throughout KTextTemplate.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:17:29 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:17:29 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.