KTextEditor
katekeywordcompletion.cpp
28 KTextEditor::DocumentPrivate *doc = static_cast<KTextEditor::DocumentPrivate *>(view->document());
45QModelIndex KateKeywordCompletionModel::index(int row, int column, const QModelIndex &parent) const
77 KTextEditor::DocumentPrivate *document = static_cast<KTextEditor::DocumentPrivate *>(view->document());
83KTextEditor::Range KateKeywordCompletionModel::completionRange(KTextEditor::View *view, const KTextEditor::Cursor &position)
85 const QString &text = view->document()->text(KTextEditor::Range(position, KTextEditor::Cursor(position.line(), 0)));
99bool KateKeywordCompletionModel::shouldAbortCompletion(KTextEditor::View *view, const KTextEditor::Range &range, const QString ¤tCompletion)
154 static const QIcon icon(QIcon::fromTheme(QStringLiteral("code-variable")).pixmap(QSize(16, 16)));
MatchReaction
Definition codecompletionmodelcontrollerinterface.h:156
@ InheritanceDepth
Returns the inheritance depth of the completion.
Definition codecompletionmodel.h:207
@ GroupRole
Using this Role, it is possible to greatly optimize the time needed to process very long completion-l...
Definition codecompletionmodel.h:352
@ UnimportantItemRole
Return a nonzero value here to enforce sorting the item at the end of the list.
Definition codecompletionmodel.h:357
constexpr int column() const noexcept
Retrieve the column on which this cursor is situated.
Definition cursor.h:192
constexpr int line() const noexcept
Retrieve the line on which this cursor is situated.
Definition cursor.h:174
Backend of KTextEditor::Document related public KTextEditor interfaces.
Definition katedocument.h:68
Kate::TextLine kateTextLine(int i)
Same as plainKateTextLine(), except that it is made sure the line is highlighted.
Definition katedocument.cpp:5817
An object representing a section of text, from one Cursor to another.
Definition include/ktexteditor/range.h:49
constexpr Cursor end() const noexcept
Get the end position of this range.
Definition include/ktexteditor/range.h:163
constexpr Cursor start() const noexcept
Get the start position of this range.
Definition include/ktexteditor/range.h:153
virtual Document * document() const =0
Get the view's document, that means the view is a view of the returned document.
virtual Cursor cursorPosition() const =0
Get the view's current cursor position.
void completionInvoked(KTextEditor::View *view, const KTextEditor::Range &range, InvocationType invocationType) override
This function is responsible to generating / updating the list of current completions.
Definition katekeywordcompletion.cpp:24
bool shouldStartCompletion(KTextEditor::View *view, const QString &insertedText, bool userInsertion, const KTextEditor::Cursor &position) override
This function decides if the automatic completion should be started when the user entered some text.
Definition katekeywordcompletion.cpp:114
bool shouldAbortCompletion(KTextEditor::View *view, const KTextEditor::Range &range, const QString ¤tCompletion) override
This function decides if the completion should be aborted.
Definition katekeywordcompletion.cpp:99
QModelIndex index(int row, int column, const QModelIndex &parent=QModelIndex()) const override
Reimplemented from QAbstractItemModel::index().
Definition katekeywordcompletion.cpp:45
KTextEditor::Range completionRange(KTextEditor::View *view, const KTextEditor::Cursor &position) override
This function returns the completion range that will be used for the current completion.
Definition katekeywordcompletion.cpp:83
MatchReaction matchingItem(const QModelIndex &matched) override
Called whenever an item in the completion-list perfectly matches the current filter text.
Definition katekeywordcompletion.cpp:161
int rowCount(const QModelIndex &parent=QModelIndex()) const override
Reimplemented from QAbstractItemModel::rowCount().
Definition katekeywordcompletion.cpp:64
bool shouldHideItemsWithEqualNames() const override
When multiple completion models are used at the same time, it may happen that multiple models add ite...
Definition katekeywordcompletion.cpp:125
int attribute(int pos) const
Gets the attribute at the given position use KRenderer::attributes to get the KTextAttribute for this...
Definition katetextline.cpp:181
QString i18n(const char *text, const TYPE &arg...)
QModelIndex createIndex(int row, int column, const void *ptr) const const
bool isLetter(char32_t ucs4)
QIcon fromTheme(const QString &name)
const_reference at(qsizetype i) const const
iterator begin()
qsizetype count() const const
iterator end()
bool isEmpty() const const
int column() const const
quintptr internalId() const const
bool isValid() const const
QModelIndex parent() const const
int row() const const
QObject * parent() const const
const QChar at(qsizetype position) const const
bool contains(QChar ch, Qt::CaseSensitivity cs) const const
qsizetype size() const const
DisplayRole
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:01:55 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:01:55 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.