KTextEditor
katecommandlinescript.cpp
20KateCommandLineScript::KateCommandLineScript(const QString &url, const KateCommandLineScriptHeader &header)
32bool KateCommandLineScript::callFunction(const QString &cmd, const QStringList &args, QString &errorMessage)
58bool KateCommandLineScript::exec(KTextEditor::View *view, const QString &cmd, QString &msg, const KTextEditor::Range &range)
An object representing a section of text, from one Cursor to another.
Definition include/ktexteditor/range.h:49
virtual bool setSelection(Range range)=0
Set the view's selection to the range selection.
bool supportsRange(const QString &cmd) override
Find out if a given command can act on a range.
Definition katecommandlinescript.cpp:92
bool help(KTextEditor::View *view, const QString &cmd, QString &msg) override
Shows help for the given view and cmd string.
Definition katecommandlinescript.cpp:97
bool exec(KTextEditor::View *view, const QString &cmd, QString &msg, const KTextEditor::Range &range=KTextEditor::Range::invalid()) override
Execute the command for the given view and cmd string.
Definition katecommandlinescript.cpp:58
KateScript objects represent a script that can be executed and inspected.
Definition katescript.h:107
bool setView(KTextEditor::ViewPrivate *view)
set view for this script for the execution will trigger load!
Definition katescript.cpp:224
void clearExceptions()
Clears any uncaught exceptions in the script engine.
Definition katescript.cpp:66
static QString backtrace(const QJSValue &error, const QString &header=QString())
Returns the backtrace when a script has errored out.
Definition katescript.cpp:44
QJSValue function(const QString &name)
Return a function in the script of the given name, or an invalid QJSValue if no such function exists.
Definition katescript.cpp:82
QString i18n(const char *text, const TYPE &arg...)
KCOREADDONS_EXPORT QStringList splitArgs(const QString &cmd, Options flags=NoOptions, Errors *err=nullptr)
Errors
NoError
The KTextEditor namespace contains all the public API that is required to use the KTextEditor compone...
Definition katetextblock.h:18
QJSValue call(const QJSValueList &args) const const
bool isCallable() const const
bool isError() const const
bool isString() const const
bool isUndefined() const const
QString toString() const const
T & first()
void removeFirst()
qsizetype size() const const
T qobject_cast(QObject *object)
bool isEmpty() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:11:27 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:11:27 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.