KTextEditor
ktexteditor.cpp
55 if (startIndex < 0 || endIndex < 0 || commaIndex < 0 || commaIndex < startIndex || endIndex < commaIndex || endIndex < startIndex) {
62 const int line = str.mid(startIndex + 1, commaIndex - startIndex - 1).toString().toInt(&ok1); // FIXME KF6, Qt 5.15.2 and higher
63 const int column = str.mid(commaIndex + 1, endIndex - commaIndex - 1).toString().toInt(&ok2); // FIXME KF6, Qt 5.15.2 and higher
94 bool Editor::registerVariableMatch(const QString &name, const QString &description, ExpandFunction expansionFunc)
100 bool Editor::registerVariablePrefix(const QString &prefix, const QString &description, ExpandFunction expansionFunc)
116 bool Editor::expandVariable(const QString &variable, KTextEditor::View *view, QString &output) const
126 void Editor::addVariableExpansion(const QVector<QWidget *> &widgets, const QStringList &variables) const
171 bool View::insertTemplate(const KTextEditor::Cursor &insertPosition, const QString &templateString, const QString &script)
325 void KTextEditor::InlineNoteProvider::inlineNoteActivated(const InlineNote ¬e, Qt::MouseButtons buttons, const QPoint &globalPos)
332 void KTextEditor::InlineNoteProvider::inlineNoteFocusInEvent(const KTextEditor::InlineNote ¬e, const QPoint &globalPos)
338 void KTextEditor::InlineNoteProvider::inlineNoteFocusOutEvent(const KTextEditor::InlineNote ¬e)
343 void KTextEditor::InlineNoteProvider::inlineNoteMouseMoveEvent(const KTextEditor::InlineNote ¬e, const QPoint &globalPos)
385 static_cast<KTextEditor::EditorPrivate *>(KTextEditor::Editor::instance())->cmdManager()->registerCommand(this);
392 static_cast<KTextEditor::EditorPrivate *>(KTextEditor::Editor::instance())->cmdManager()->unregisterCommand(this);
InlineNoteProvider * provider() const
The provider which created this note.
Definition: ktexteditor.cpp:349
Internal data container for KTextEditor::InlineNote interface.
Definition: inlinenotedata.h:24
virtual bool insertText(const Cursor &position, const QString &text, bool block=false)=0
Insert text at position.
int firstDisplayedLine(LineType lineType=RealLine) const
Get the first displayed line in the view.
Definition: ktexteditor.cpp:429
bool underMouse() const
Returns whether the mouse cursor is currently over this note.
Definition: ktexteditor.cpp:320
bool addVariable(const KTextEditor::Variable &variable)
Adds variable to the expansion list view.
Definition: katevariableexpansionmanager.cpp:258
int width() const const
A source of inline notes for a document.
Definition: inlinenoteprovider.h:28
bool unregisterVariablePrefix(const QString &variable)
Unregisters a prefix of variable that was previously registered with registerVariableMatch().
Definition: ktexteditor.cpp:111
void setViewInputMode(InputMode inputMode)
Set the view's new input mode.
Definition: ktexteditor.cpp:176
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, if wantsToProcessText() returns true.
Definition: ktexteditor.cpp:410
int lastDisplayedLine(LineType lineType=RealLine) const
Get the last displayed line in the view.
Definition: ktexteditor.cpp:434
bool registerVariablePrefix(const QString &prefix, const QString &description, ExpandFunction expansionFunc)
Registers a variable for arbitrary text that matches the specified prefix.
Definition: ktexteditor.cpp:100
typedef MouseButtons
const KTextEditor::View * view() const
The View this note is shown in.
Definition: ktexteditor.cpp:354
The style option set for an annotation item, as painted by AbstractAnnotationItemDelegate.
Definition: abstractannotationitemdelegate.h:29
QString defaultEncoding() const
Get the current default encoding for this Editor part.
Definition: ktexteditor.cpp:88
bool insertTemplate(const KTextEditor::Cursor &insertPosition, const QString &templateString, const QString &script=QString())
Insert a template into the document.
Definition: ktexteditor.cpp:171
void expandText(const QString &text, KTextEditor::View *view, QString &output) const
Expands arbitrary text that may contain arbitrary many variables.
Definition: ktexteditor.cpp:121
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:232
A KParts derived class representing a text document.
Definition: document.h:185
bool expandVariable(const QString &variable, KTextEditor::View *view, QString &output) const
Expands a single variable, writing the expanded value to output.
Definition: ktexteditor.cpp:116
virtual QString fullName() const
Get a readable full name for the config page.
Definition: ktexteditor.cpp:196
int toInt(bool *ok, int base) const const
void setHorizontalScrollPosition(int x)
Horizontally scroll view to position.
Definition: ktexteditor.cpp:419
KateVariableExpansionManager * variableExpansionManager()
Returns the variable expansion manager.
Definition: kateglobal.cpp:420
virtual QSize inlineNoteSize(const InlineNote ¬e) const =0
Width to be reserved for the note in the text.
KTextEditor::Cursor position() const
The cursor position of this note.
Definition: ktexteditor.cpp:374
bool unregisterVariableMatch(const QString &variable)
Unregisters a variable that was previously registered with registerVariableMatch().
Definition: ktexteditor.cpp:106
bool registerVariableMatch(const QString &name, const QString &description, ExpandFunction expansionFunc)
Registers a variable called name for exact matches.
Definition: ktexteditor.cpp:94
KSyntaxHighlighting::Theme theme() const
Get the current active theme of this view.
Definition: ktexteditor.cpp:181
The KTextEditor namespace contains all the public API that is required to use the KTextEditor compone...
Definition: katetextblock.h:21
KTextEditor::Cursor maxScrollPosition() const
Get the cursor corresponding to the maximum position the view can vertically scroll to...
Definition: ktexteditor.cpp:424
virtual int configPages() const
Get the number of available config pages.
Definition: ktexteditor.cpp:227
virtual QString name() const =0
Get a readable name for the config page.
bool removeVariable(const QString &name)
Removes variable name.
Definition: katevariableexpansionmanager.cpp:279
void setStatusBarEnabled(bool enable)
Show/hide the status bar of the view.
Definition: ktexteditor.cpp:161
static KSharedConfigPtr config()
The global configuration of katepart, e.g.
Definition: kateglobal.cpp:503
virtual bool supportsRange(const QString &cmd)
Find out if a given command can act on a range.
Definition: ktexteditor.cpp:395
void setScrollPosition(KTextEditor::Cursor &cursor)
Scroll view to cursor.
Definition: ktexteditor.cpp:414
virtual bool insertText(const QString &text)
This is a convenience function which inserts text at the view's current cursor position.
Definition: ktexteditor.cpp:146
const KSyntaxHighlighting::Repository & repository() const
Get read-only access to the syntax highlighting repository the editor uses.
Definition: ktexteditor.cpp:141
QString mid(int position, int n) const const
KSyntaxHighlighting::Theme theme() const
Get the current global theme.
Definition: ktexteditor.cpp:136
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:405
QString(*)(const QStringView &text, KTextEditor::View *view) ExpandFunction
Function that is called to expand a variable in text.
Definition: editor.h:309
virtual void inlineNoteActivated(const InlineNote ¬e, Qt::MouseButtons buttons, const QPoint &globalPos)
Invoked when a note is activated by the user.
Definition: ktexteditor.cpp:325
Config page interface for the Editor and Plugins.
Definition: configpage.h:43
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:400
static Cursor fromString(const QString &str) Q_DECL_NOEXCEPT
Returns a Cursor created from the string str containing the format "(line, column)".
Definition: cursor.h:138
virtual ~InlineNoteProvider()
Virtual destructor to allow inheritance.
Definition: ktexteditor.cpp:289
virtual void inlineNoteMouseMoveEvent(const InlineNote ¬e, const QPoint &globalPos)
Invoked when the mouse cursor moves inside the note.
Definition: ktexteditor.cpp:343
QIcon fromTheme(const QString &name)
KTextEditor::EditorPrivate One instance of this class is hold alive during a kate part session...
Definition: kateglobal.h:64
virtual QString variable(const QString &name) const
Returns the value for the variable name.
A text widget with KXMLGUIClient that represents a Document.
Definition: view.h:146
static KTextEditor::EditorPrivate * self()
Kate Part Internal stuff ;)
Definition: kateglobal.cpp:356
QObject * parent() const const
Command(const QStringList &cmds, QObject *parent=nullptr)
Constructor with parent.
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:332
void addVariableExpansion(const QVector< QWidget * > &widgets, const QStringList &variables=QStringList()) const
Adds a QAction to the widget in widgets that whenever focus is gained.
Definition: ktexteditor.cpp:126
virtual void inlineNoteFocusOutEvent(const InlineNote ¬e)
Invoked when the mouse cursor leaves the note.
Definition: ktexteditor.cpp:338
InlineNote(const KateInlineNoteData &data)
Constructs an inline note.
Definition: ktexteditor.cpp:310
QRect textAreaRect() const
Get the view's text area rectangle excluding border, scrollbars, etc.
Definition: ktexteditor.cpp:439
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Thu Mar 4 2021 22:58:36 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2021 The KDE developers.
Generated on Thu Mar 4 2021 22:58:36 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.