19#include <QtWidgets/private/qtwidgetsglobal_p.h>
20#include "private/qobject_p.h"
22#include "QtWidgets/qabstractitemview.h"
23#include "QtCore/qabstractproxymodel.h"
24#include "QtCore/qmap.h"
27#include "QtGui/qpainter.h"
28#include "private/qabstractproxymodel_p.h"
88 inline int last()
const {
return v ? vector.
last() :
t; }
91 inline int cost()
const {
return vector.
size()+2; }
168 QStyleOptionViewItem optCopy =
opt;
169 optCopy.showDecorationSelected =
true;
Q_INVOKABLE int const QModelIndex & parent
Returns the parent of the model item with the given index.
The QAbstractItemView class provides the basic functionality for item view classes.
QModelIndex currentIndex() const
Returns the model index of the current item.
The QAbstractProxyModel class provides a base class for proxy item models that can do sorting,...
QAbstractItemModel * sourceModel
the source model of this proxy model.
QCompleterItemDelegate(QAbstractItemView *view)
void paint(QPainter *p, const QStyleOptionViewItem &opt, const QModelIndex &idx) const override
This pure abstract function must be reimplemented if you want to provide custom rendering.
void setCurrentIndex(QModelIndex, bool=true)
static const QCompleterPrivate * get(const QCompleter *o)
void _q_fileSystemModelDirectoryLoaded(const QString &path)
bool hiddenBecauseNoMatch
QCompleter::CompletionMode mode
QCompleter::ModelSorting sorting
void _q_completionSelected(const QItemSelection &)
Qt::MatchFlags filterMode
void _q_autoResizePopup()
QPointer< QWidget > widget
void init(QAbstractItemModel *model=nullptr)
QAbstractItemView * popup
void _q_complete(QModelIndex, bool=false)
static QCompleterPrivate * get(QCompleter *o)
void showPopup(const QRect &)
The QCompleter class provides completions based on an item model.
CompletionMode
This enum specifies how completions are provided to the user.
ModelSorting
This enum specifies how the items in the model are sorted.
void saveInCache(QString, const QModelIndex &, const QMatchData &)
virtual QMatchData filter(const QString &, const QModelIndex &, int)=0
virtual void filterOnDemand(int)
QMap< QString, QMatchData > CacheItem
bool matchHint(const QString &part, const QModelIndex &parent, QMatchData *m) const
QCompletionEngine(QCompleterPrivate *c)
bool lookupCache(const QString &part, const QModelIndex &parent, QMatchData *m) const
virtual ~QCompletionEngine()
QMap< QModelIndex, CacheItem > Cache
QMatchData filterHistory()
int rowCount(const QModelIndex &index=QModelIndex()) const override
Returns the number of rows under the given parent.
int completionCount() const
int columnCount(const QModelIndex &index=QModelIndex()) const override
Returns the number of columns for the children of the given parent.
QScopedPointer< QCompletionEngine > engine
QModelIndex mapFromSource(const QModelIndex &sourceIndex) const override
Reimplement this function to return the model index in the proxy model that corresponds to the source...
bool hasChildren(const QModelIndex &parent=QModelIndex()) const override
\reimp
QModelIndex parent(const QModelIndex &=QModelIndex()) const override
QModelIndex currentIndex(bool) const
QModelIndex mapToSource(const QModelIndex &proxyIndex) const override
Reimplement this function to return the model index in the source model that corresponds to the proxy...
void setSourceModel(QAbstractItemModel *sourceModel) override
Sets the given sourceModel to be processed by the proxy model.
bool setCurrentRow(int row)
int operator[](int index) const
QIndexMapper(const QList< int > &vec)
QIndexMapper(int f, int t)
qsizetype size() const noexcept
bool isEmpty() const noexcept
void append(parameter_type t)
The QPainter class performs low-level painting on widgets and other paint devices.
\inmodule QtCore\reentrant
QSortedModelEngine(QCompleterPrivate *c)
Qt::SortOrder sortOrder(const QModelIndex &) const
QIndexMapper indexHint(QString, const QModelIndex &, Qt::SortOrder)
\macro QT_RESTRICTED_CAST_FROM_ASCII
The QStyledItemDelegate class provides display and editing facilities for data items from a model.
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override
Renders the delegate using the given painter and style option for the item specified by index.
QUnsortedModelEngine(QCompleterPrivate *c)
void filterOnDemand(int) override
Combined button and popup list for selecting options.
GLsizei const GLfloat * v
[13]
GLint GLint GLint GLint GLint x
[0]
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLsizei GLenum const void * indices
GLenum GLenum GLsizei void GLsizei void * column
GLsizei const GLchar *const * path
GLenum GLenum GLsizei void * row
#define QT_REQUIRE_CONFIG(feature)
QSqlQueryModel * model
[16]
QCompleter * completer
[0]
qsizetype indexOf(const AT &t, qsizetype from=0) const noexcept
QMatchData(const QIndexMapper &indices, int em, bool p)
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent