KTextEditor
variable.cpp
11Variable::Variable(const QString &name, const QString &description, Variable::ExpandFunction func, bool isPrefixMatch)
std::function< QString(const QStringView &text, KTextEditor::View *view)> ExpandFunction
Function that is called to expand a variable in text.
Definition variable.h:41
QString evaluate(const QStringView &prefix, KTextEditor::View *view) const
Expands the Variable to its value.
Definition variable.cpp:39
bool isValid() const
Returns true, if the name is non-empty and the function provided in the constructor is not a nullptr.
Definition variable.cpp:19
QString description() const
Returns the description that was provided in the constructor.
Definition variable.cpp:34
bool isPrefixMatch() const
Returns whether this Variable represents an exact match (false) or a prefix match (true).
Definition variable.cpp:24
QString name() const
Returns the name that was provided in the constructor.
Definition variable.cpp:29
The KTextEditor namespace contains all the public API that is required to use the KTextEditor compone...
Definition katetextblock.h:18
bool isEmpty() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 22 2024 12:07:21 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 22 2024 12:07:21 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.