KTextEditor
codecompletionmodel.cpp
Go to the documentation of this file.
91 void CodeCompletionModel::completionInvoked(KTextEditor::View* view, const Range& range, InvocationType invocationType)
98 void CodeCompletionModel::executeCompletionItem(Document* document, const Range& word, int row) const
119 void CodeCompletionModel2::executeCompletionItem2(Document* document, const Range& word, const QModelIndex& index) const
static const int LastItemDataRole
Definition: codecompletionmodel.h:364
CodeCompletionModel(QObject *parent)
Definition: codecompletionmodel.cpp:36
virtual QMap< int, QVariant > itemData(const QModelIndex &index) const
virtual void completionInvoked(KTextEditor::View *view, const KTextEditor::Range &range, InvocationType invocationType)
This function is responsible to generating / updating the list of current completions.
Definition: codecompletionmodel.cpp:91
virtual void executeCompletionItem2(Document *document, const Range &word, const QModelIndex &index) const
This function is responsible for inserting a selected completion into the document.
Definition: codecompletionmodel.cpp:119
bool hasGroups() const
This function returns true if the model needs grouping, otherwise false in KDE 4 default value is tru...
Definition: codecompletionmodel.cpp:103
void hasGroupsChanged(KTextEditor::CodeCompletionModel *model, bool hasGroups)
Internal.
virtual ~CodeCompletionModel()
Definition: codecompletionmodel.cpp:42
bool isValid() const
virtual int rowCount(const QModelIndex &parent=QModelIndex()) const
Reimplemented from QAbstractItemModel::rowCount().
Definition: codecompletionmodel.cpp:83
A KParts derived class representing a text document.
Definition: document.h:111
int row() const
virtual int columnCount(const QModelIndex &parent=QModelIndex()) const
Reimplemented from QAbstractItemModel::columnCount().
Definition: codecompletionmodel.cpp:47
virtual QVariant data(const QModelIndex &index, int role) const =0
CodeCompletionModel2(QObject *parent)
Definition: codecompletionmodel.cpp:115
QModelIndex createIndex(int row, int column, void *ptr) const
An object representing a section of text, from one Cursor to another.
Definition: range.h:54
void setHasGroups(bool hasGroups)
Definition: codecompletionmodel.cpp:107
static const int ColumnCount
Definition: codecompletionmodel.h:96
The model should return a set of CompletionProperties.
Definition: codecompletionmodel.h:151
void setRowCount(int rowCount)
Definition: codecompletionmodel.cpp:78
QModelIndex sibling(int row, int column) const
virtual void executeCompletionItem(Document *document, const Range &word, int row) const
Definition: codecompletionmodel.cpp:98
virtual QMap< int, QVariant > itemData(const QModelIndex &index) const
Reimplemented from QAbstractItemModel::itemData().
Definition: codecompletionmodel.cpp:60
bool isValid() const
iterator insert(const Key &key, const T &value)
virtual QModelIndex index(int row, int column, const QModelIndex &parent=QModelIndex()) const
Reimplemented from QAbstractItemModel::index().
Definition: codecompletionmodel.cpp:52
A text widget with KXMLGUIClient that represents a Document.
Definition: view.h:145
QObject * parent() const
QString toString() const
virtual bool replaceText(const Range &range, const QString &text, bool block=false)
Replace text from range with specified text.
Definition: document.cpp:170
An item model for providing code completion, and meta information for enhanced presentation.
Definition: codecompletionmodel.h:77
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sat May 9 2020 03:56:48 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sat May 9 2020 03:56:48 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.