Qt 6.x
The Qt SDK
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)
 
virtual QMatchData filter (const QString &, const QModelIndex &, int)=0
 
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 141 of file qcompleter_p.h.

Constructor & Destructor Documentation

◆ QSortedModelEngine()

QSortedModelEngine::QSortedModelEngine ( QCompleterPrivate c)
inline

Definition at line 144 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(), QSqlQueryModel::data(), Qt::DescendingOrder, hint(), QAbstractTableModel::index(), indexHint(), QVariant::isValid(), QCompletionEngine::lookupCache(), QCompletionEngine::matchHint(), model, parent, QCompletionEngine::saveInCache(), sortOrder(), QString::startsWith(), 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, parent, 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(), QSqlQueryModel::data(), Qt::DescendingOrder, QAbstractTableModel::index(), model, parent, 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: