KateWordCompletionModel Class Reference
#include <katewordcompletion.h>

Public Member Functions | |
| KateWordCompletionModel (QObject *parent) | |
| ~KateWordCompletionModel () | |
| const QStringList | allMatches (KTextEditor::View *view, const KTextEditor::Range &range) const |
| void | completionInvoked (KTextEditor::View *view, const KTextEditor::Range &range, InvocationType invocationType) |
| QVariant | data (const QModelIndex &index, int role) 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) |
Detailed Description
Definition at line 40 of file katewordcompletion.h.
Constructor & Destructor Documentation
| KateWordCompletionModel::KateWordCompletionModel | ( | QObject * | parent | ) |
Definition at line 62 of file katewordcompletion.cpp.
| KateWordCompletionModel::~KateWordCompletionModel | ( | ) |
Definition at line 68 of file katewordcompletion.cpp.
Member Function Documentation
| const QStringList KateWordCompletionModel::allMatches | ( | KTextEditor::View * | view, |
| const KTextEditor::Range & | range | ||
| ) | const |
Definition at line 204 of file katewordcompletion.cpp.
| void KateWordCompletionModel::completionInvoked | ( | KTextEditor::View * | view, |
| const KTextEditor::Range & | range, | ||
| InvocationType | invocationType | ||
| ) | [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
auto invoke...
Reimplemented from KTextEditor::CodeCompletionModel.
Definition at line 178 of file katewordcompletion.cpp.
| QVariant KateWordCompletionModel::data | ( | const QModelIndex & | index, |
| int | role | ||
| ) | const |
Definition at line 79 of file katewordcompletion.cpp.
| QModelIndex KateWordCompletionModel::index | ( | int | row, |
| int | column, | ||
| const QModelIndex & | parent = QModelIndex() |
||
| ) | const [virtual] |
Reimplemented from KTextEditor::CodeCompletionModel.
Definition at line 114 of file katewordcompletion.cpp.
| KTextEditor::CodeCompletionModelControllerInterface3::MatchReaction KateWordCompletionModel::matchingItem | ( | const QModelIndex & | matched | ) | [virtual] |
Reimplemented from KTextEditor::CodeCompletionModelControllerInterface3.
Definition at line 241 of file katewordcompletion.cpp.
| QModelIndex KateWordCompletionModel::parent | ( | const QModelIndex & | index | ) | const [virtual] |
Reimplemented from KTextEditor::CodeCompletionModel.
Definition at line 106 of file katewordcompletion.cpp.
| int KateWordCompletionModel::rowCount | ( | const QModelIndex & | parent | ) | const [virtual] |
Reimplemented from KTextEditor::CodeCompletionModel.
Definition at line 132 of file katewordcompletion.cpp.
| void KateWordCompletionModel::saveMatches | ( | KTextEditor::View * | view, |
| const KTextEditor::Range & | range | ||
| ) |
Definition at line 72 of file katewordcompletion.cpp.
| bool KateWordCompletionModel::shouldAbortCompletion | ( | KTextEditor::View * | view, |
| const KTextEditor::Range & | range, | ||
| const QString & | currentCompletion | ||
| ) | [virtual] |
Reimplemented from KTextEditor::CodeCompletionModelControllerInterface3.
Definition at line 166 of file katewordcompletion.cpp.
| bool KateWordCompletionModel::shouldHideItemsWithEqualNames | ( | ) | const [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 246 of file katewordcompletion.cpp.
| bool KateWordCompletionModel::shouldStartCompletion | ( | KTextEditor::View * | view, |
| const QString & | insertedText, | ||
| bool | userInsertion, | ||
| const KTextEditor::Cursor & | position | ||
| ) | [virtual] |
Reimplemented from KTextEditor::CodeCompletionModelControllerInterface3.
Definition at line 143 of file katewordcompletion.cpp.
The documentation for this class was generated from the following files:
KDE 4.6 API Reference