#include <qcompleter_p.h>
Definition at line 182 of file qcompleter_p.h.
◆ QUnsortedModelEngine()
Definition at line 185 of file qcompleter_p.h.
QCompletionEngine(QCompleterPrivate *c)
◆ buildIndices()
Definition at line 708 of file qcompleter.cpp.
716 for (i = 0; i < indices.count() && count != n; ++i) {
QString toString() const
Returns the variant as a QString if the variant has type() String , Bool , ByteArray ...
bool startsWith(const QString &s, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Returns true if the string starts with s; otherwise returns false.
The QString class provides a Unicode character string.
virtual Qt::ItemFlags flags(const QModelIndex &index) const
Returns the item flags for the given index.
virtual QModelIndex index(int row, int column, const QModelIndex &parent=QModelIndex()) const =0
Returns the index of the item in the model specified by the given row, column and parent index...
QAbstractItemModel * sourceModel() const
Returns the model that contains the data that is available through the proxy model.
static const char * data(const QByteArray &arr)
virtual QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const =0
Returns the data stored under the given role for the item referred to by the index.
The QAbstractItemModel class provides the abstract interface for item model classes.
int compare(const QString &s) const
The QModelIndex class is used to locate data in a data model.
◆ filter()
Implements QCompletionEngine.
Definition at line 746 of file qcompleter.cpp.
762 if (!foundInCache && !hint.
isValid()) {
763 const int lastRow = model->
rowCount(parent) - 1;
766 m.partial = (lastIndex != lastRow);
772 if (m.partial && ((n == -1 && m.exactMatchIndex == -1) || (m.indices.count() < n))) {
774 const int lastRow = model->
rowCount(parent) - 1;
776 int want = n == -1 ? -1 : n - m.indices.
count();
777 int lastIndex =
buildIndices(part, parent, want, rest, &m);
778 m.partial = (lastRow != lastIndex);
virtual int rowCount(const QModelIndex &parent=QModelIndex()) const =0
Returns the number of rows under the given parent.
bool matchHint(QString, const QModelIndex &, QMatchData *)
QAbstractItemModel * sourceModel() const
Returns the model that contains the data that is available through the proxy model.
The QAbstractItemModel class provides the abstract interface for item model classes.
void saveInCache(QString, const QModelIndex &, const QMatchData &)
int buildIndices(const QString &str, const QModelIndex &parent, int n, const QIndexMapper &iv, QMatchData *m)
bool lookupCache(QString part, const QModelIndex &parent, QMatchData *m)
◆ filterOnDemand()
void QUnsortedModelEngine::filterOnDemand |
( |
int |
n | ) |
|
|
virtual |
Reimplemented from QCompletionEngine.
Definition at line 732 of file qcompleter.cpp.
virtual int rowCount(const QModelIndex &parent=QModelIndex()) const =0
Returns the number of rows under the given parent.
QAbstractItemModel * sourceModel() const
Returns the model that contains the data that is available through the proxy model.
The QAbstractItemModel class provides the abstract interface for item model classes.
void saveInCache(QString, const QModelIndex &, const QMatchData &)
T & last()
Returns a reference to the last item in the list.
int buildIndices(const QString &str, const QModelIndex &parent, int n, const QIndexMapper &iv, QMatchData *m)
The documentation for this class was generated from the following files: