KTextEditor
KTextEditor::CodeCompletionModel2 Class Reference
#include <codecompletionmodel.h>
Inheritance diagram for KTextEditor::CodeCompletionModel2:
Public Member Functions | |
CodeCompletionModel2 (QObject *parent) | |
virtual void | executeCompletionItem2 (Document *document, const Range &word, const QModelIndex &index) const |
Public Member Functions inherited from KTextEditor::CodeCompletionModel | |
CodeCompletionModel (QObject *parent) | |
virtual | ~CodeCompletionModel () |
virtual int | columnCount (const QModelIndex &parent=QModelIndex()) const |
virtual void | completionInvoked (KTextEditor::View *view, const KTextEditor::Range &range, InvocationType invocationType) |
virtual void | executeCompletionItem (Document *document, const Range &word, int row) const |
bool | hasGroups () const |
virtual QModelIndex | index (int row, int column, const QModelIndex &parent=QModelIndex()) const |
virtual QMap< int, QVariant > | itemData (const QModelIndex &index) const |
virtual QModelIndex | parent (const QModelIndex &index) const |
virtual int | rowCount (const QModelIndex &parent=QModelIndex()) const |
void | setRowCount (int rowCount) |
Detailed Description
You must inherit your completion-model from CodeCompletionModel2 if you want to use a hierarchical structure and want to receive execution-feedback.
- See also
- CodeCompletionModel::GroupRole
Definition at line 477 of file codecompletionmodel.h.
Constructor & Destructor Documentation
CodeCompletionModel2::CodeCompletionModel2 | ( | QObject * | parent | ) |
Definition at line 115 of file codecompletionmodel.cpp.
Member Function Documentation
|
virtual |
This function is responsible for inserting a selected completion into the document.
The default implementation replaces the text that the completions were based on with the Qt::DisplayRole of the Name column of the given match.
- Parameters
-
document the document to insert the completion into word the Range that the completions are based on (what the user entered so far) index identifies the completion match to insert
Definition at line 119 of file codecompletionmodel.cpp.
The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:52:20 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:52:20 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.