Kate
#include <katewordcompletion.h>
Public Member Functions | |
KateWordCompletionModel (QObject *parent) | |
~KateWordCompletionModel () | |
QStringList | allMatches (KTextEditor::View *view, const KTextEditor::Range &range) const |
void | completionInvoked (KTextEditor::View *view, const KTextEditor::Range &range, InvocationType invocationType) |
virtual KTextEditor::Range | completionRange (KTextEditor::View *view, const KTextEditor::Cursor &position) |
QVariant | data (const QModelIndex &index, int role) const |
virtual void | executeCompletionItem2 (KTextEditor::Document *document, const KTextEditor::Range &word, const QModelIndex &index) const |
virtual QModelIndex | index (int row, int column, const QModelIndex &parent=QModelIndex()) const |
virtual MatchReaction | matchingItem (const QModelIndex &matched) |
virtual QModelIndex | parent (const QModelIndex &index) const |
int | rowCount (const QModelIndex &parent) const |
void | saveMatches (KTextEditor::View *view, const KTextEditor::Range &range) |
bool | shouldAbortCompletion (KTextEditor::View *view, const KTextEditor::Range &range, const QString ¤tCompletion) |
virtual bool | shouldHideItemsWithEqualNames () const |
bool | shouldStartCompletion (KTextEditor::View *view, const QString &insertedText, bool userInsertion, const KTextEditor::Cursor &position) |
Public Member Functions inherited from KTextEditor::CodeCompletionModel2 | |
CodeCompletionModel2 (QObject *parent) | |
Public Member Functions inherited from KTextEditor::CodeCompletionModel | |
CodeCompletionModel (QObject *parent) | |
virtual | ~CodeCompletionModel () |
virtual int | columnCount (const QModelIndex &parent=QModelIndex()) const |
virtual void | executeCompletionItem (Document *document, const Range &word, int row) const |
bool | hasGroups () const |
virtual QMap< int, QVariant > | itemData (const QModelIndex &index) const |
void | setRowCount (int rowCount) |
Public Member Functions inherited from KTextEditor::CodeCompletionModelControllerInterface3 | |
CodeCompletionModelControllerInterface3 () | |
virtual | ~CodeCompletionModelControllerInterface3 () |
virtual void | aborted (View *view) |
virtual QString | filterString (View *view, const Range &range, const Cursor &position) |
virtual bool | shouldExecute (const QModelIndex &selected, QChar inserted) |
virtual Range | updateCompletionRange (View *view, const Range &range) |
Additional Inherited Members | |
Public Types inherited from KTextEditor::CodeCompletionModel | |
enum | Columns |
enum | CompletionProperty |
enum | ExtraItemDataRoles |
enum | HighlightMethod |
enum | InvocationType |
Public Types inherited from KTextEditor::CodeCompletionModelControllerInterface3 | |
enum | MatchReaction |
Signals inherited from KTextEditor::CodeCompletionModel | |
void | hasGroupsChanged (KTextEditor::CodeCompletionModel *model, bool hasGroups) |
void | waitForReset () |
Static Public Attributes inherited from KTextEditor::CodeCompletionModel | |
static const int | ColumnCount |
static const int | LastItemDataRole |
Protected Member Functions inherited from KTextEditor::CodeCompletionModel | |
void | setHasGroups (bool hasGroups) |
Detailed Description
Definition at line 39 of file katewordcompletion.h.
Constructor & Destructor Documentation
KateWordCompletionModel::KateWordCompletionModel | ( | QObject * | parent | ) |
Definition at line 66 of file katewordcompletion.cpp.
KateWordCompletionModel::~KateWordCompletionModel | ( | ) |
Definition at line 72 of file katewordcompletion.cpp.
Member Function Documentation
QStringList KateWordCompletionModel::allMatches | ( | KTextEditor::View * | view, |
const KTextEditor::Range & | range | ||
) | const |
Scan throughout the entire document for possible completions, ignoring any dublets and words shorter than configured and/or reasonable minimum length.
Definition at line 203 of file katewordcompletion.cpp.
|
virtual |
This function is responsible to generating / updating the list of current completions.
The default implementation does nothing.
When implementing this function, remember to call setRowCount() (or implement rowCount()), and to generate the appropriate change notifications (for instance by calling QAbstractItemModel::reset()).
- Parameters
-
view The view to generate completions for range The range of text to generate completions for
Reimplemented from KTextEditor::CodeCompletionModel.
Definition at line 191 of file katewordcompletion.cpp.
|
virtual |
Reimplemented from KTextEditor::CodeCompletionModelControllerInterface3.
Definition at line 286 of file katewordcompletion.cpp.
QVariant KateWordCompletionModel::data | ( | const QModelIndex & | index, |
int | role | ||
) | const |
Definition at line 83 of file katewordcompletion.cpp.
|
virtual |
- Todo:
- Introduce configurable word-separators??
Reimplemented from KTextEditor::CodeCompletionModel2.
Definition at line 231 of file katewordcompletion.cpp.
|
virtual |
Reimplemented from KTextEditor::CodeCompletionModel.
Definition at line 120 of file katewordcompletion.cpp.
|
virtual |
Reimplemented from KTextEditor::CodeCompletionModelControllerInterface3.
Definition at line 273 of file katewordcompletion.cpp.
|
virtual |
Reimplemented from KTextEditor::CodeCompletionModel.
Definition at line 112 of file katewordcompletion.cpp.
|
virtual |
Reimplemented from KTextEditor::CodeCompletionModel.
Definition at line 138 of file katewordcompletion.cpp.
void KateWordCompletionModel::saveMatches | ( | KTextEditor::View * | view, |
const KTextEditor::Range & | range | ||
) |
Definition at line 76 of file katewordcompletion.cpp.
|
virtual |
Reimplemented from KTextEditor::CodeCompletionModelControllerInterface3.
Definition at line 179 of file katewordcompletion.cpp.
|
virtual |
When multiple completion models are used at the same time, it may happen that multiple models add items with the same name to the list.
This option allows to hide items from this completion model when another model with higher priority contains items with the same name.
- Returns
- Whether items of this completion model should be hidden if another completion model has items with the same name
Reimplemented from KTextEditor::CodeCompletionModelControllerInterface4.
Definition at line 278 of file katewordcompletion.cpp.
|
virtual |
Reimplemented from KTextEditor::CodeCompletionModelControllerInterface3.
Definition at line 149 of file katewordcompletion.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:31:54 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.