KTextEditor
ktexteditor.cpp
101bool Editor::registerVariableMatch(const QString &name, const QString &description, ExpandFunction expansionFunc)
107bool Editor::registerVariablePrefix(const QString &prefix, const QString &description, ExpandFunction expansionFunc)
118bool Editor::expandVariable(const QString &variable, KTextEditor::View *view, QString &output) const
128void Editor::addVariableExpansion(const QList<QWidget *> &widgets, const QStringList &variables) const
174bool View::insertTemplate(KTextEditor::Cursor insertPosition, const QString &templateString, const QString &script)
293void KTextEditor::InlineNoteProvider::inlineNoteActivated(const InlineNote ¬e, Qt::MouseButtons buttons, const QPoint &globalPos)
300void KTextEditor::InlineNoteProvider::inlineNoteFocusInEvent(const KTextEditor::InlineNote ¬e, const QPoint &globalPos)
311void KTextEditor::InlineNoteProvider::inlineNoteMouseMoveEvent(const KTextEditor::InlineNote ¬e, const QPoint &globalPos)
353 static_cast<KTextEditor::EditorPrivate *>(KTextEditor::Editor::instance())->cmdManager()->registerCommand(this);
360 static_cast<KTextEditor::EditorPrivate *>(KTextEditor::Editor::instance())->cmdManager()->unregisterCommand(this);
Q_INVOKABLE KSyntaxHighlighting::Theme theme(const QString &themeName) const
virtual bool supportsRange(const QString &cmd)
Find out if a given command can act on a range.
Definition ktexteditor.cpp:364
Command(const QStringList &cmds, QObject *parent=nullptr)
Constructor with parent.
Definition ktexteditor.cpp:347
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
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 QString fullName() const
Get a readable full name for the config page.
Definition ktexteditor.cpp:212
virtual QString name() const =0
Get a readable name for the config page.
constexpr int column() const noexcept
Retrieve the column on which this cursor is situated.
Definition cursor.h:192
static Cursor fromString(QStringView str) noexcept
Returns a Cursor created from the string str containing the format "(line, column)".
Definition ktexteditor.cpp:41
QString toString() const
Returns the cursor position as string in the format "(line, column)".
Definition ktexteditor.cpp:65
constexpr int line() const noexcept
Retrieve the line on which this cursor is situated.
Definition cursor.h:174
virtual bool insertText(KTextEditor::Cursor position, const QString &text, bool block=false)=0
Insert text at position.
KTextEditor::EditorPrivate One instance of this class is hold alive during a kate part session,...
Definition kateglobal.h:65
KateVariableExpansionManager * variableExpansionManager()
Returns the variable expansion manager.
Definition kateglobal.cpp:447
QString(*)(const QStringView &text, KTextEditor::View *view) ExpandFunction
Function that is called to expand a variable in text.
Definition editor.h:309
bool expandVariable(const QString &variable, KTextEditor::View *view, QString &output) const
Expands a single variable, writing the expanded value to output.
Definition ktexteditor.cpp:118
QString expandText(const QString &text, KTextEditor::View *view) const
Expands arbitrary text that may contain arbitrary many variables.
Definition ktexteditor.cpp:123
bool unregisterVariable(const QString &variableName)
Unregisters a variable that was previously registered with registerVariableMatch() or registerVariabl...
Definition ktexteditor.cpp:113
const KSyntaxHighlighting::Repository & repository() const
Get read-only access to the syntax highlighting repository the editor uses.
Definition ktexteditor.cpp:143
QString defaultEncoding() const
Get the current default encoding for this Editor part.
Definition ktexteditor.cpp:95
bool registerVariableMatch(const QString &name, const QString &description, ExpandFunction expansionFunc)
Registers a variable called name for exact matches.
Definition ktexteditor.cpp:101
bool registerVariablePrefix(const QString &prefix, const QString &description, ExpandFunction expansionFunc)
Registers a variable for arbitrary text that matches the specified prefix.
Definition ktexteditor.cpp:107
void addVariableExpansion(const QList< QWidget * > &widgets, const QStringList &variables=QStringList()) const
Adds a QAction to the widget in widgets that whenever focus is gained.
Definition ktexteditor.cpp:128
A source of inline notes for a document.
Definition inlinenoteprovider.h:29
virtual void inlineNoteMouseMoveEvent(const InlineNote ¬e, const QPoint &globalPos)
Invoked when the mouse cursor moves inside the note.
Definition ktexteditor.cpp:311
virtual void inlineNoteFocusInEvent(const InlineNote ¬e, const QPoint &globalPos)
Invoked when the mouse cursor moves into the note when it was outside before.
Definition ktexteditor.cpp:300
virtual void inlineNoteFocusOutEvent(const InlineNote ¬e)
Invoked when the mouse cursor leaves the note.
Definition ktexteditor.cpp:306
virtual QSize inlineNoteSize(const InlineNote ¬e) const =0
Width to be reserved for the note in the text.
~InlineNoteProvider() override
Virtual destructor to allow inheritance.
virtual void inlineNoteActivated(const InlineNote ¬e, Qt::MouseButtons buttons, const QPoint &globalPos)
Invoked when a note is activated by the user.
Definition ktexteditor.cpp:293
InlineNoteProvider * provider() const
The provider which created this note.
Definition ktexteditor.cpp:317
bool underMouse() const
Returns whether the mouse cursor is currently over this note.
Definition ktexteditor.cpp:288
virtual ConfigPage * configPage(int number, QWidget *parent)
Get the config page with the number, config pages from 0 to configPages()-1 are available if configPa...
Definition ktexteditor.cpp:244
virtual int configPages() const
Get the number of available config pages.
Definition ktexteditor.cpp:239
virtual ~SessionConfigInterface()
Virtual destructor.
The style option set for an annotation item, as painted by AbstractAnnotationItemDelegate.
Definition abstractannotationitemdelegate.h:30
virtual ~TextHintProvider()
Virtual destructor to allow inheritance.
int lastDisplayedLine(LineType lineType=RealLine) const
Get the last displayed line in the view.
Definition ktexteditor.cpp:403
int firstDisplayedLine(LineType lineType=RealLine) const
Get the first displayed line in the view.
Definition ktexteditor.cpp:398
virtual Document * document() const =0
Get the view's document, that means the view is a view of the returned document.
virtual bool blockSelection() const =0
Get the status of the selection mode.
KSyntaxHighlighting::Theme theme() const
Get the current active theme of this view.
Definition ktexteditor.cpp:179
void setScrollPosition(KTextEditor::Cursor cursor)
Scroll view to cursor.
Definition ktexteditor.cpp:383
void setHorizontalScrollPosition(int x)
Horizontally scroll view to position.
Definition ktexteditor.cpp:388
void setSelections(const QList< KTextEditor::Range > &ranges)
Set the view's selection to the range selection.
Definition ktexteditor.cpp:194
virtual Cursor cursorPosition() const =0
Get the view's current cursor position.
QRect textAreaRect() const
Get the view's text area rectangle excluding border, scrollbars, etc.
Definition ktexteditor.cpp:408
virtual bool insertText(const QString &text)
This is a convenience function which inserts text at the view's current cursor position.
Definition ktexteditor.cpp:148
bool insertTemplate(KTextEditor::Cursor insertPosition, const QString &templateString, const QString &script=QString())
Insert a template into the document.
Definition ktexteditor.cpp:174
void setCursorPositions(const QList< KTextEditor::Cursor > &positions)
Set the view's new cursors to positions.
Definition ktexteditor.cpp:184
QList< KTextEditor::Range > selectionRanges() const
Get the ranges occupied by the current selections.
Definition ktexteditor.cpp:199
QList< KTextEditor::Cursor > cursorPositions() const
Get the view's current cursor positions.
Definition ktexteditor.cpp:189
KTextEditor::Cursor maxScrollPosition() const
Get the cursor corresponding to the maximum position the view can vertically scroll to.
Definition ktexteditor.cpp:393
void setStatusBarEnabled(bool enable)
Show/hide the status bar of the view.
Definition ktexteditor.cpp:163
Internal data container for KTextEditor::InlineNote interface.
Definition inlinenotedata.h:25
bool addVariable(const KTextEditor::Variable &variable)
Adds variable to the expansion list view.
Definition katevariableexpansionmanager.cpp:258
bool removeVariable(const QString &name)
Removes variable name.
Definition katevariableexpansionmanager.cpp:281
KDB_EXPORT KDbVersionInfo version()
The KTextEditor namespace contains all the public API that is required to use the KTextEditor compone...
Definition katetextblock.h:18
KTEXTEDITOR_EXPORT size_t qHash(KTextEditor::Cursor cursor, size_t seed=0) noexcept
QHash function for KTextEditor::Cursor.
Definition ktexteditor.cpp:76
KTEXTEDITOR_EXPORT QDebug operator<<(QDebug s, const MovingCursor *cursor)
qDebug() stream operator.
Definition movingapi.cpp:156
QDebug & nospace()
QDebug & space()
QIcon fromTheme(const QString &name)
int width() const const
QString arg(Args &&... args) const const
typedef MouseButtons
cursor
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.