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 | |
| KateCompletionModel (KateCompletionWidget *parent=0L) | |
| ~KateCompletionModel () | |
| 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 |
| QString | commonPrefix (QModelIndex selectedIndex) 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 |
| uint | filteredItemCount () 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 |
| 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 |
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 49 of file katecompletionmodel.h.
Member Enumeration Documentation
| anonymous enum |
Definition at line 147 of file katecompletionmodel.h.
Definition at line 140 of file katecompletionmodel.h.
Constructor & Destructor Documentation
| KateCompletionModel::KateCompletionModel | ( | KateCompletionWidget * | parent = 0L | ) |
Definition at line 127 of file katecompletionmodel.cpp.
| KateCompletionModel::~KateCompletionModel | ( | ) |
Definition at line 171 of file katecompletionmodel.cpp.
Member Function Documentation
| bool KateCompletionModel::accessIncludeConst | ( | ) | const |
Definition at line 1357 of file katecompletionmodel.cpp.
| bool KateCompletionModel::accessIncludeSignalSlot | ( | ) | const |
Definition at line 1387 of file katecompletionmodel.cpp.
| bool KateCompletionModel::accessIncludeStatic | ( | ) | const |
Definition at line 1372 of file katecompletionmodel.cpp.
| void KateCompletionModel::addCompletionModel | ( | KTextEditor::CodeCompletionModel * | model | ) |
Definition at line 1884 of file katecompletionmodel.cpp.
| void KateCompletionModel::argumentHintsChanged | ( | ) | [signal] |
| void KateCompletionModel::clearCompletionModels | ( | ) |
Definition at line 2136 of file katecompletionmodel.cpp.
| int KateCompletionModel::columnCount | ( | const QModelIndex & | parent = QModelIndex() | ) | const [virtual] |
Definition at line 372 of file katecompletionmodel.cpp.
Definition at line 1249 of file katecompletionmodel.cpp.
| QString KateCompletionModel::columnName | ( | int | column | ) | [static] |
Definition at line 1229 of file katecompletionmodel.cpp.
| QString KateCompletionModel::commonPrefix | ( | QModelIndex | selectedIndex | ) | const |
Returns a common prefix for all current visible completion entries If there is no common prefix, extracts the next useful prefix for the selected index.
Definition at line 1003 of file katecompletionmodel.cpp.
| QList< KTextEditor::CodeCompletionModel * > KateCompletionModel::completionModels | ( | ) | const |
Definition at line 1924 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 298 of file katecompletionmodel.cpp.
| QString KateCompletionModel::currentCompletion | ( | KTextEditor::CodeCompletionModel * | model | ) | const |
Definition at line 1874 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 182 of file katecompletionmodel.cpp.
| void KateCompletionModel::debugStats | ( | ) |
Definition at line 1167 of file katecompletionmodel.cpp.
| void KateCompletionModel::expandIndex | ( | const QModelIndex & | index | ) | [signal] |
| KTextEditor::CodeCompletionModel::CompletionProperties KateCompletionModel::filterAttributes | ( | ) | const |
Definition at line 1628 of file katecompletionmodel.cpp.
| bool KateCompletionModel::filterByAttribute | ( | ) | const |
Definition at line 1615 of file katecompletionmodel.cpp.
| bool KateCompletionModel::filterContextMatchesOnly | ( | ) | const |
Definition at line 1602 of file katecompletionmodel.cpp.
| uint KateCompletionModel::filteredItemCount | ( | ) | const |
Definition at line 1711 of file katecompletionmodel.cpp.
| Qt::ItemFlags KateCompletionModel::flags | ( | const QModelIndex & | index | ) | const [virtual] |
Definition at line 347 of file katecompletionmodel.cpp.
| KateCompletionModel::GroupingMethods KateCompletionModel::groupingMethod | ( | ) | const |
Definition at line 1412 of file katecompletionmodel.cpp.
| bool KateCompletionModel::hasChildren | ( | const QModelIndex & | parent = QModelIndex() | ) | const [virtual] |
Definition at line 382 of file katecompletionmodel.cpp.
| bool KateCompletionModel::hasGroups | ( | ) | const |
Definition at line 782 of file katecompletionmodel.cpp.
| bool KateCompletionModel::hasIndex | ( | int | row, |
| int | column, | ||
| const QModelIndex & | parent = QModelIndex() |
||
| ) | const [virtual] |
Definition at line 462 of file katecompletionmodel.cpp.
| QModelIndex KateCompletionModel::index | ( | int | row, |
| int | column, | ||
| const QModelIndex & | parent = QModelIndex() |
||
| ) | const [virtual] |
Definition at line 406 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 1149 of file katecompletionmodel.cpp.
| bool KateCompletionModel::isColumnMergingEnabled | ( | ) | const |
Definition at line 1209 of file katecompletionmodel.cpp.
| bool KateCompletionModel::isFilteringEnabled | ( | ) | const |
Definition at line 1219 of file katecompletionmodel.cpp.
| bool KateCompletionModel::isGroupingEnabled | ( | ) | const |
Definition at line 1214 of file katecompletionmodel.cpp.
| bool KateCompletionModel::isSortingAlphabetical | ( | ) | const |
Definition at line 1424 of file katecompletionmodel.cpp.
| bool KateCompletionModel::isSortingByInheritanceDepth | ( | ) | const |
Definition at line 1417 of file katecompletionmodel.cpp.
| bool KateCompletionModel::isSortingEnabled | ( | ) | const |
Definition at line 1224 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 891 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 874 of file katecompletionmodel.cpp.
| Qt::CaseSensitivity KateCompletionModel::matchCaseSensitivity | ( | ) | const |
Definition at line 1879 of file katecompletionmodel.cpp.
| int KateCompletionModel::maximumInheritanceDepth | ( | ) | const |
Definition at line 1641 of file katecompletionmodel.cpp.
| QModelIndex KateCompletionModel::parent | ( | const QModelIndex & | index | ) | const [virtual] |
Definition at line 822 of file katecompletionmodel.cpp.
| QString KateCompletionModel::propertyName | ( | KTextEditor::CodeCompletionModel::CompletionProperty | property | ) | [static] |
Definition at line 1780 of file katecompletionmodel.cpp.
| void KateCompletionModel::removeCompletionModel | ( | KTextEditor::CodeCompletionModel * | model | ) |
Definition at line 1929 of file katecompletionmodel.cpp.
| int KateCompletionModel::rowCount | ( | const QModelIndex & | parent = QModelIndex() | ) | const [virtual] |
Definition at line 846 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 2123 of file katecompletionmodel.cpp.
| void KateCompletionModel::setAccessIncludeConst | ( | bool | include | ) |
Definition at line 1362 of file katecompletionmodel.cpp.
| void KateCompletionModel::setAccessIncludeSignalSlot | ( | bool | include | ) |
Definition at line 1392 of file katecompletionmodel.cpp.
| void KateCompletionModel::setAccessIncludeStatic | ( | bool | include | ) |
Definition at line 1377 of file katecompletionmodel.cpp.
Definition at line 1254 of file katecompletionmodel.cpp.
| void KateCompletionModel::setColumnMergingEnabled | ( | bool | enable | ) | [slot] |
Definition at line 1203 of file katecompletionmodel.cpp.
| void KateCompletionModel::setCompletionModel | ( | KTextEditor::CodeCompletionModel * | model | ) |
Definition at line 1899 of file katecompletionmodel.cpp.
| void KateCompletionModel::setCompletionModels | ( | const QList< KTextEditor::CodeCompletionModel * > & | models | ) |
Definition at line 1905 of file katecompletionmodel.cpp.
| void KateCompletionModel::setCurrentCompletion | ( | KTextEditor::CodeCompletionModel * | model, |
| const QString & | completion | ||
| ) |
Definition at line 915 of file katecompletionmodel.cpp.
| void KateCompletionModel::setFilterAttributes | ( | KTextEditor::CodeCompletionModel::CompletionProperties | attributes | ) |
Definition at line 1633 of file katecompletionmodel.cpp.
| void KateCompletionModel::setFilterByAttribute | ( | bool | filter | ) |
Definition at line 1620 of file katecompletionmodel.cpp.
| void KateCompletionModel::setFilterContextMatchesOnly | ( | bool | filter | ) |
Definition at line 1607 of file katecompletionmodel.cpp.
| void KateCompletionModel::setFilteringEnabled | ( | bool | enable | ) | [slot] |
Definition at line 1183 of file katecompletionmodel.cpp.
| void KateCompletionModel::setGroupingEnabled | ( | bool | enable | ) | [slot] |
Definition at line 1197 of file katecompletionmodel.cpp.
| void KateCompletionModel::setGroupingMethod | ( | GroupingMethods | m | ) |
Definition at line 1350 of file katecompletionmodel.cpp.
| void KateCompletionModel::setMatchCaseSensitivity | ( | Qt::CaseSensitivity | cs | ) |
Definition at line 367 of file katecompletionmodel.cpp.
| void KateCompletionModel::setMaximumInheritanceDepth | ( | int | maxDepth | ) |
Definition at line 1646 of file katecompletionmodel.cpp.
| void KateCompletionModel::setSortingAlphabetical | ( | bool | alphabetical | ) |
Definition at line 1550 of file katecompletionmodel.cpp.
| void KateCompletionModel::setSortingByInheritanceDepth | ( | bool | byIneritance | ) |
Definition at line 1420 of file katecompletionmodel.cpp.
| void KateCompletionModel::setSortingCaseSensitivity | ( | Qt::CaseSensitivity | cs | ) |
Definition at line 1571 of file katecompletionmodel.cpp.
| void KateCompletionModel::setSortingEnabled | ( | bool | enable | ) | [slot] |
Definition at line 1189 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.
Definition at line 1720 of file katecompletionmodel.cpp.
| void KateCompletionModel::sort | ( | int | column, |
| Qt::SortOrder | order = Qt::AscendingOrder |
||
| ) | [virtual] |
Definition at line 868 of file katecompletionmodel.cpp.
| Qt::CaseSensitivity KateCompletionModel::sortingCaseSensitivity | ( | ) | const |
Definition at line 1429 of file katecompletionmodel.cpp.
| int KateCompletionModel::translateColumn | ( | int | sourceColumn | ) | const |
Definition at line 1260 of file katecompletionmodel.cpp.
| KateView * KateCompletionModel::view | ( | ) | const |
Definition at line 362 of file katecompletionmodel.cpp.
| KateCompletionWidget * KateCompletionModel::widget | ( | ) | const |
Definition at line 358 of file katecompletionmodel.cpp.
Member Data Documentation
const int KateCompletionModel::AccessTypeMask = 0x7 [static] |
Definition at line 154 of file katecompletionmodel.h.
const int KateCompletionModel::ItemTypeMask = 0xfe0 [static] |
Definition at line 155 of file katecompletionmodel.h.
const int KateCompletionModel::ScopeTypeMask = 0x380000 [static] |
Definition at line 153 of file katecompletionmodel.h.
The documentation for this class was generated from the following files:
KDE 4.6 API Reference