KTextEditor
include/ktexteditor/command.h
77 * Will register this command for the commands names given in \p cmds at the global editor instance.
124 virtual bool exec(KTextEditor::View *view, const QString &cmd, QString &msg, const KTextEditor::Range &range = KTextEditor::Range::invalid()) = 0;
Command(const QStringList &cmds, QObject *parent=nullptr)
Constructor with parent.
Definition ktexteditor.cpp:347
virtual bool help(KTextEditor::View *view, const QString &cmd, QString &msg)=0
Shows help for the given view and cmd string.
virtual bool wantsToProcessText(const QString &cmdname)
Check, whether the command wants to process text interactively for the given command with name cmdnam...
Definition ktexteditor.cpp:374
virtual void processText(KTextEditor::View *view, const QString &text)
This is called by the command line each time the argument text for the command changed,...
Definition ktexteditor.cpp:379
const QStringList & cmds() const
Return a list of strings a command may begin with.
Definition include/ktexteditor/command.h:96
virtual KCompletion * completionObject(KTextEditor::View *view, const QString &cmdname)
Return a KCompletion object that will substitute the command line default one while typing the first ...
Definition ktexteditor.cpp:369
virtual bool exec(KTextEditor::View *view, const QString &cmd, QString &msg, const KTextEditor::Range &range=KTextEditor::Range::invalid())=0
Execute the command for the given view and cmd string.
An object representing a section of text, from one Cursor to another.
Definition include/ktexteditor/range.h:49
static constexpr Range invalid() noexcept
Returns an invalid range.
Definition include/ktexteditor/range.h:121
The KTextEditor namespace contains all the public API that is required to use the KTextEditor compone...
Definition katetextblock.h:18
QObject(QObject *parent)
Q_OBJECTQ_OBJECT
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 31 2025 12:11:24 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 31 2025 12:11:24 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.