Kate
KateCompletionModel Class Reference
This class has the responsibility for filtering, sorting, and manipulating code completion data provided by a CodeCompletionModel. More...
#include <katecompletionmodel.h>

Classes | |
class | Group |
Public Types | |
enum | { BestMatchesProperty = 2*KTextEditor::CodeCompletionModel::LastProperty } |
enum | gm { ScopeType = 0x1, Scope = 0x2, AccessType = 0x4, ItemType = 0x8 } |
Public Slots | |
void | setColumnMergingEnabled (bool enable) |
void | setFilteringEnabled (bool enable) |
void | setGroupingEnabled (bool enable) |
void | setSortingEnabled (bool enable) |
Signals | |
void | argumentHintsChanged () |
void | contentGeometryChanged () |
void | expandIndex (const QModelIndex &index) |
Public Member Functions | |
bool | accessIncludeConst () const |
bool | accessIncludeSignalSlot () const |
bool | accessIncludeStatic () const |
void | addCompletionModel (KTextEditor::CodeCompletionModel *model) |
void | clearCompletionModels () |
virtual int | columnCount (const QModelIndex &parent=QModelIndex()) const |
const QList< QList< int > > & | columnMerges () const |
QList < KTextEditor::CodeCompletionModel * > | completionModels () const |
QString | currentCompletion (KTextEditor::CodeCompletionModel *model) const |
virtual QVariant | data (const QModelIndex &index, int role=Qt::DisplayRole) const |
void | debugStats () |
KTextEditor::CodeCompletionModel::CompletionProperties | filterAttributes () const |
bool | filterByAttribute () const |
bool | filterContextMatchesOnly () const |
virtual Qt::ItemFlags | flags (const QModelIndex &index) const |
GroupingMethods | groupingMethod () const |
virtual bool | hasChildren (const QModelIndex &parent=QModelIndex()) const |
bool | hasGroups () const |
virtual bool | hasIndex (int row, int column, const QModelIndex &parent=QModelIndex()) const |
virtual QModelIndex | index (int row, int column, const QModelIndex &parent=QModelIndex()) const |
virtual bool | indexIsItem (const QModelIndex &index) const |
bool | isColumnMergingEnabled () const |
bool | isFilteringEnabled () const |
bool | isGroupingEnabled () const |
bool | isSortingAlphabetical () const |
bool | isSortingByInheritanceDepth () const |
bool | isSortingEnabled () const |
bool | isSortingReverse () const |
KateCompletionModel (KateCompletionWidget *parent=0L) | |
virtual QModelIndex | mapFromSource (const QModelIndex &sourceIndex) const |
virtual QModelIndex | mapToSource (const QModelIndex &proxyIndex) const |
Qt::CaseSensitivity | matchCaseSensitivity () const |
int | maximumInheritanceDepth () const |
virtual QModelIndex | parent (const QModelIndex &index) const |
void | removeCompletionModel (KTextEditor::CodeCompletionModel *model) |
virtual int | rowCount (const QModelIndex &parent=QModelIndex()) const |
virtual void | rowSelected (const QModelIndex &row) |
void | setAccessIncludeConst (bool include) |
void | setAccessIncludeSignalSlot (bool include) |
void | setAccessIncludeStatic (bool include) |
void | setColumnMerges (const QList< QList< int > > &columnMerges) |
void | setCompletionModel (KTextEditor::CodeCompletionModel *model) |
void | setCompletionModels (const QList< KTextEditor::CodeCompletionModel * > &models) |
void | setCurrentCompletion (KTextEditor::CodeCompletionModel *model, const QString &completion) |
void | setFilterAttributes (KTextEditor::CodeCompletionModel::CompletionProperties attributes) |
void | setFilterByAttribute (bool filter) |
void | setFilterContextMatchesOnly (bool filter) |
void | setGroupingMethod (GroupingMethods m) |
void | setMatchCaseSensitivity (Qt::CaseSensitivity cs) |
void | setMaximumInheritanceDepth (int maxDepth) |
void | setSortingAlphabetical (bool alphabetical) |
void | setSortingByInheritanceDepth (bool byIneritance) |
void | setSortingCaseSensitivity (Qt::CaseSensitivity cs) |
void | setSortingReverse (bool reverse) |
bool | shouldMatchHideCompletionList () const |
virtual void | sort (int column, Qt::SortOrder order=Qt::AscendingOrder) |
Qt::CaseSensitivity | sortingCaseSensitivity () const |
int | translateColumn (int sourceColumn) const |
KateView * | view () const |
KateCompletionWidget * | widget () const |
~KateCompletionModel () | |
Static Public Member Functions | |
static QString | columnName (int column) |
static QString | propertyName (KTextEditor::CodeCompletionModel::CompletionProperty property) |
Static Public Attributes | |
static const int | AccessTypeMask = 0x7 |
static const int | ItemTypeMask = 0xfe0 |
static const int | ScopeTypeMask = 0x380000 |
Protected Member Functions | |
virtual int | contextMatchQuality (const QModelIndex &index) const |
Detailed Description
This class has the responsibility for filtering, sorting, and manipulating code completion data provided by a CodeCompletionModel.
Definition at line 46 of file katecompletionmodel.h.
Member Enumeration Documentation
anonymous enum |
Definition at line 140 of file katecompletionmodel.h.
Definition at line 133 of file katecompletionmodel.h.
Constructor & Destructor Documentation
KateCompletionModel::KateCompletionModel | ( | KateCompletionWidget * | parent = 0L |
) |
Definition at line 125 of file katecompletionmodel.cpp.
KateCompletionModel::~KateCompletionModel | ( | ) |
Definition at line 169 of file katecompletionmodel.cpp.
Member Function Documentation
bool KateCompletionModel::accessIncludeConst | ( | ) | const |
Definition at line 1293 of file katecompletionmodel.cpp.
bool KateCompletionModel::accessIncludeSignalSlot | ( | ) | const |
Definition at line 1323 of file katecompletionmodel.cpp.
bool KateCompletionModel::accessIncludeStatic | ( | ) | const |
Definition at line 1308 of file katecompletionmodel.cpp.
void KateCompletionModel::addCompletionModel | ( | KTextEditor::CodeCompletionModel * | model | ) |
Definition at line 1787 of file katecompletionmodel.cpp.
void KateCompletionModel::argumentHintsChanged | ( | ) | [signal] |
void KateCompletionModel::clearCompletionModels | ( | ) |
Definition at line 1973 of file katecompletionmodel.cpp.
int KateCompletionModel::columnCount | ( | const QModelIndex & | parent = QModelIndex() |
) | const [virtual] |
Definition at line 370 of file katecompletionmodel.cpp.
Definition at line 1185 of file katecompletionmodel.cpp.
QString KateCompletionModel::columnName | ( | int | column | ) | [static] |
Definition at line 1165 of file katecompletionmodel.cpp.
QList< KTextEditor::CodeCompletionModel * > KateCompletionModel::completionModels | ( | ) | const |
Definition at line 1827 of file katecompletionmodel.cpp.
void KateCompletionModel::contentGeometryChanged | ( | ) | [signal] |
int KateCompletionModel::contextMatchQuality | ( | const QModelIndex & | index | ) | const [protected, virtual] |
- Returns:
- the context-match quality from 0 to 10 if it could be determined, else -1
Implements ExpandingWidgetModel.
Definition at line 296 of file katecompletionmodel.cpp.
QString KateCompletionModel::currentCompletion | ( | KTextEditor::CodeCompletionModel * | model | ) | const |
Definition at line 1777 of file katecompletionmodel.cpp.
QVariant KateCompletionModel::data | ( | const QModelIndex & | index, | |
int | role = Qt::DisplayRole | |||
) | const [virtual] |
Does not request data from index, this only returns local data like highlighting for expanded rows and similar.
Reimplemented from ExpandingWidgetModel.
Definition at line 180 of file katecompletionmodel.cpp.
void KateCompletionModel::debugStats | ( | ) |
Definition at line 1103 of file katecompletionmodel.cpp.
void KateCompletionModel::expandIndex | ( | const QModelIndex & | index | ) | [signal] |
KTextEditor::CodeCompletionModel::CompletionProperties KateCompletionModel::filterAttributes | ( | ) | const |
Definition at line 1564 of file katecompletionmodel.cpp.
bool KateCompletionModel::filterByAttribute | ( | ) | const |
Definition at line 1551 of file katecompletionmodel.cpp.
bool KateCompletionModel::filterContextMatchesOnly | ( | ) | const |
Definition at line 1538 of file katecompletionmodel.cpp.
Qt::ItemFlags KateCompletionModel::flags | ( | const QModelIndex & | index | ) | const [virtual] |
Definition at line 345 of file katecompletionmodel.cpp.
KateCompletionModel::GroupingMethods KateCompletionModel::groupingMethod | ( | ) | const |
Definition at line 1348 of file katecompletionmodel.cpp.
bool KateCompletionModel::hasChildren | ( | const QModelIndex & | parent = QModelIndex() |
) | const [virtual] |
Definition at line 380 of file katecompletionmodel.cpp.
bool KateCompletionModel::hasGroups | ( | ) | const |
Definition at line 778 of file katecompletionmodel.cpp.
bool KateCompletionModel::hasIndex | ( | int | row, | |
int | column, | |||
const QModelIndex & | parent = QModelIndex() | |||
) | const [virtual] |
Definition at line 460 of file katecompletionmodel.cpp.
QModelIndex KateCompletionModel::index | ( | int | row, | |
int | column, | |||
const QModelIndex & | parent = QModelIndex() | |||
) | const [virtual] |
Definition at line 404 of file katecompletionmodel.cpp.
bool KateCompletionModel::indexIsItem | ( | const QModelIndex & | index | ) | const [virtual] |
Should return true if the given row should be painted like a contained item(as opposed to label-rows etc.).
Implements ExpandingWidgetModel.
Definition at line 1085 of file katecompletionmodel.cpp.
bool KateCompletionModel::isColumnMergingEnabled | ( | ) | const |
Definition at line 1145 of file katecompletionmodel.cpp.
bool KateCompletionModel::isFilteringEnabled | ( | ) | const |
Definition at line 1155 of file katecompletionmodel.cpp.
bool KateCompletionModel::isGroupingEnabled | ( | ) | const |
Definition at line 1150 of file katecompletionmodel.cpp.
bool KateCompletionModel::isSortingAlphabetical | ( | ) | const |
Definition at line 1360 of file katecompletionmodel.cpp.
bool KateCompletionModel::isSortingByInheritanceDepth | ( | ) | const |
Definition at line 1353 of file katecompletionmodel.cpp.
bool KateCompletionModel::isSortingEnabled | ( | ) | const |
Definition at line 1160 of file katecompletionmodel.cpp.
bool KateCompletionModel::isSortingReverse | ( | ) | const |
QModelIndex KateCompletionModel::mapFromSource | ( | const QModelIndex & | sourceIndex | ) | const [virtual] |
Maps from an index in a source-model to the index of the item in this display-model.
Definition at line 887 of file katecompletionmodel.cpp.
QModelIndex KateCompletionModel::mapToSource | ( | const QModelIndex & | proxyIndex | ) | const [virtual] |
Maps from this display-model into the appropriate source code-completion model.
Definition at line 870 of file katecompletionmodel.cpp.
Qt::CaseSensitivity KateCompletionModel::matchCaseSensitivity | ( | ) | const |
Definition at line 1782 of file katecompletionmodel.cpp.
int KateCompletionModel::maximumInheritanceDepth | ( | ) | const |
Definition at line 1577 of file katecompletionmodel.cpp.
QModelIndex KateCompletionModel::parent | ( | const QModelIndex & | index | ) | const [virtual] |
Definition at line 818 of file katecompletionmodel.cpp.
QString KateCompletionModel::propertyName | ( | KTextEditor::CodeCompletionModel::CompletionProperty | property | ) | [static] |
Definition at line 1683 of file katecompletionmodel.cpp.
void KateCompletionModel::removeCompletionModel | ( | KTextEditor::CodeCompletionModel * | model | ) |
Definition at line 1832 of file katecompletionmodel.cpp.
int KateCompletionModel::rowCount | ( | const QModelIndex & | parent = QModelIndex() |
) | const [virtual] |
Definition at line 842 of file katecompletionmodel.cpp.
void KateCompletionModel::rowSelected | ( | const QModelIndex & | row | ) | [virtual] |
Notifies underlying models that the item was selected, collapses any previous partially expanded line, checks whether this line should be partially expanded, and eventually does it.
Does nothing when nothing needs to be done. Does NOT show the expanding-widget. That is done immediately when painting by ExpandingDelegate, to reduce flickering.
- See also:
- showPartialExpandWidget()
- Parameters:
-
row The row
- Todo:
- delay this
- Todo:
- allow multiple partially expanded rows
Reimplemented from ExpandingWidgetModel.
Definition at line 1960 of file katecompletionmodel.cpp.
void KateCompletionModel::setAccessIncludeConst | ( | bool | include | ) |
Definition at line 1298 of file katecompletionmodel.cpp.
void KateCompletionModel::setAccessIncludeSignalSlot | ( | bool | include | ) |
Definition at line 1328 of file katecompletionmodel.cpp.
void KateCompletionModel::setAccessIncludeStatic | ( | bool | include | ) |
Definition at line 1313 of file katecompletionmodel.cpp.
Definition at line 1190 of file katecompletionmodel.cpp.
void KateCompletionModel::setColumnMergingEnabled | ( | bool | enable | ) | [slot] |
Definition at line 1139 of file katecompletionmodel.cpp.
void KateCompletionModel::setCompletionModel | ( | KTextEditor::CodeCompletionModel * | model | ) |
Definition at line 1802 of file katecompletionmodel.cpp.
void KateCompletionModel::setCompletionModels | ( | const QList< KTextEditor::CodeCompletionModel * > & | models | ) |
Definition at line 1808 of file katecompletionmodel.cpp.
void KateCompletionModel::setCurrentCompletion | ( | KTextEditor::CodeCompletionModel * | model, | |
const QString & | completion | |||
) |
Definition at line 911 of file katecompletionmodel.cpp.
void KateCompletionModel::setFilterAttributes | ( | KTextEditor::CodeCompletionModel::CompletionProperties | attributes | ) |
Definition at line 1569 of file katecompletionmodel.cpp.
void KateCompletionModel::setFilterByAttribute | ( | bool | filter | ) |
Definition at line 1556 of file katecompletionmodel.cpp.
void KateCompletionModel::setFilterContextMatchesOnly | ( | bool | filter | ) |
Definition at line 1543 of file katecompletionmodel.cpp.
void KateCompletionModel::setFilteringEnabled | ( | bool | enable | ) | [slot] |
Definition at line 1119 of file katecompletionmodel.cpp.
void KateCompletionModel::setGroupingEnabled | ( | bool | enable | ) | [slot] |
Definition at line 1133 of file katecompletionmodel.cpp.
void KateCompletionModel::setGroupingMethod | ( | GroupingMethods | m | ) |
Definition at line 1286 of file katecompletionmodel.cpp.
void KateCompletionModel::setMatchCaseSensitivity | ( | Qt::CaseSensitivity | cs | ) |
Definition at line 365 of file katecompletionmodel.cpp.
void KateCompletionModel::setMaximumInheritanceDepth | ( | int | maxDepth | ) |
Definition at line 1582 of file katecompletionmodel.cpp.
void KateCompletionModel::setSortingAlphabetical | ( | bool | alphabetical | ) |
Definition at line 1486 of file katecompletionmodel.cpp.
void KateCompletionModel::setSortingByInheritanceDepth | ( | bool | byIneritance | ) |
Definition at line 1356 of file katecompletionmodel.cpp.
void KateCompletionModel::setSortingCaseSensitivity | ( | Qt::CaseSensitivity | cs | ) |
Definition at line 1507 of file katecompletionmodel.cpp.
void KateCompletionModel::setSortingEnabled | ( | bool | enable | ) | [slot] |
Definition at line 1125 of file katecompletionmodel.cpp.
void KateCompletionModel::setSortingReverse | ( | bool | reverse | ) |
bool KateCompletionModel::shouldMatchHideCompletionList | ( | ) | const |
Returns whether one of the filtered items exactly matches its completion string.
- Todo:
- Make this faster
Definition at line 1647 of file katecompletionmodel.cpp.
void KateCompletionModel::sort | ( | int | column, | |
Qt::SortOrder | order = Qt::AscendingOrder | |||
) | [virtual] |
Definition at line 864 of file katecompletionmodel.cpp.
Qt::CaseSensitivity KateCompletionModel::sortingCaseSensitivity | ( | ) | const |
Definition at line 1365 of file katecompletionmodel.cpp.
int KateCompletionModel::translateColumn | ( | int | sourceColumn | ) | const |
Definition at line 1196 of file katecompletionmodel.cpp.
KateView * KateCompletionModel::view | ( | ) | const |
Definition at line 360 of file katecompletionmodel.cpp.
KateCompletionWidget * KateCompletionModel::widget | ( | ) | const |
Definition at line 356 of file katecompletionmodel.cpp.
Member Data Documentation
const int KateCompletionModel::AccessTypeMask = 0x7 [static] |
Definition at line 147 of file katecompletionmodel.h.
const int KateCompletionModel::ItemTypeMask = 0xfe0 [static] |
Definition at line 148 of file katecompletionmodel.h.
const int KateCompletionModel::ScopeTypeMask = 0x380000 [static] |
Definition at line 146 of file katecompletionmodel.h.
The documentation for this class was generated from the following files: