Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QSortedModelEngine Class Reference

#include <qcompleter_p.h>

+ Inheritance diagram for QSortedModelEngine:
+ Collaboration diagram for QSortedModelEngine:

Public Member Functions

 QSortedModelEngine (QCompleterPrivate *c)
 
QMatchData filter (const QString &, const QModelIndex &, int) override
 
QIndexMapper indexHint (QString, const QModelIndex &, Qt::SortOrder)
 
Qt::SortOrder sortOrder (const QModelIndex &) const
 
- Public Member Functions inherited from QCompletionEngine
 QCompletionEngine (QCompleterPrivate *c)
 
virtual ~QCompletionEngine ()
 
void filter (const QStringList &parts)
 
QMatchData filterHistory ()
 
bool matchHint (const QString &part, const QModelIndex &parent, QMatchData *m) const
 
void saveInCache (QString, const QModelIndex &, const QMatchData &)
 
bool lookupCache (const QString &part, const QModelIndex &parent, QMatchData *m) const
 
virtual void filterOnDemand (int)
 
int matchCount () const
 

Additional Inherited Members

- Public Types inherited from QCompletionEngine
typedef QMap< QString, QMatchDataCacheItem
 
typedef QMap< QModelIndex, CacheItemCache
 
- Public Attributes inherited from QCompletionEngine
QMatchData curMatch
 
QMatchData historyMatch
 
QCompleterPrivatec
 
QStringList curParts
 
QModelIndex curParent
 
int curRow
 
Cache cache
 
int cost
 

Detailed Description

Definition at line 143 of file qcompleter_p.h.

Constructor & Destructor Documentation

◆ QSortedModelEngine()

QSortedModelEngine::QSortedModelEngine ( QCompleterPrivate * c)
inline

Definition at line 146 of file qcompleter_p.h.

Member Function Documentation

◆ filter()

QMatchData QSortedModelEngine::filter ( const QString & part,
const QModelIndex & parent,
int  )
overridevirtual

Implements QCompletionEngine.

Definition at line 597 of file qcompleter.cpp.

References Qt::AscendingOrder, QString::compare(), QString::cs, QSqlQueryModel::data(), Qt::DescendingOrder, hint(), QAbstractTableModel::index(), indexHint(), QCompletionEngine::lookupCache(), QCompletionEngine::matchHint(), model, QCompletionEngine::saveInCache(), sortOrder(), and QVariant::toString().

+ Here is the call graph for this function:

◆ indexHint()

QIndexMapper QSortedModelEngine::indexHint ( QString part,
const QModelIndex & parent,
Qt::SortOrder order )

Definition at line 541 of file qcompleter.cpp.

References Qt::AscendingOrder, QCompletionEngine::cache, Qt::CaseInsensitive, QMap< Key, T >::constBegin(), QMap< Key, T >::constEnd(), QIndexMapper::first(), QMatchData::indices, it, QIndexMapper::last(), QMap< Key, T >::lowerBound(), map, model, QSqlQueryModel::rowCount(), and QString::toLower().

Referenced by filter().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sortOrder()

Qt::SortOrder QSortedModelEngine::sortOrder ( const QModelIndex & parent) const

Definition at line 585 of file qcompleter.cpp.

References Qt::AscendingOrder, QString::compare(), QString::cs, QSqlQueryModel::data(), Qt::DescendingOrder, QAbstractTableModel::index(), model, QSqlQueryModel::rowCount(), and QVariant::toString().

Referenced by filter().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

The documentation for this class was generated from the following files: