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
qidentityproxymodel.h
Go to the documentation of this file.
1// Copyright (C) 2011 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Stephen Kelly <stephen.kelly@kdab.com>
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4
5#ifndef QIDENTITYPROXYMODEL_H
6#define QIDENTITYPROXYMODEL_H
7
8#include <QtCore/qabstractproxymodel.h>
9
10QT_REQUIRE_CONFIG(identityproxymodel);
11
13
14
16
17class Q_CORE_EXPORT QIdentityProxyModel : public QAbstractProxyModel
18{
20public:
21 explicit QIdentityProxyModel(QObject* parent = nullptr);
23
24 int columnCount(const QModelIndex& parent = QModelIndex()) const override;
25 QModelIndex index(int row, int column, const QModelIndex& parent = QModelIndex()) const override;
26 QModelIndex mapFromSource(const QModelIndex& sourceIndex) const override;
27 QModelIndex mapToSource(const QModelIndex& proxyIndex) const override;
28 QModelIndex parent(const QModelIndex& child) const override;
29 using QObject::parent;
30 int rowCount(const QModelIndex& parent = QModelIndex()) const override;
31 QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
32 bool dropMimeData(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent) override;
33 QModelIndex sibling(int row, int column, const QModelIndex &idx) const override;
34
35 QItemSelection mapSelectionFromSource(const QItemSelection& selection) const override;
36 QItemSelection mapSelectionToSource(const QItemSelection& selection) const override;
37 QModelIndexList match(const QModelIndex& start, int role, const QVariant& value, int hits = 1, Qt::MatchFlags flags = Qt::MatchFlags(Qt::MatchStartsWith|Qt::MatchWrap)) const override;
38 void setSourceModel(QAbstractItemModel* sourceModel) override;
39
40 bool insertColumns(int column, int count, const QModelIndex& parent = QModelIndex()) override;
41 bool insertRows(int row, int count, const QModelIndex& parent = QModelIndex()) override;
42 bool removeColumns(int column, int count, const QModelIndex& parent = QModelIndex()) override;
43 bool removeRows(int row, int count, const QModelIndex& parent = QModelIndex()) override;
44 bool moveRows(const QModelIndex &sourceParent, int sourceRow, int count, const QModelIndex &destinationParent, int destinationChild) override;
45 bool moveColumns(const QModelIndex &sourceParent, int sourceColumn, int count, const QModelIndex &destinationParent, int destinationChild) override;
46
47 bool isHandleSourceLayoutChanges() const;
48
49protected:
51 void setHandleSourceLayoutChanges(bool);
52
53private:
54 Q_DECLARE_PRIVATE(QIdentityProxyModel)
55 Q_DISABLE_COPY(QIdentityProxyModel)
56};
57
59
60#endif // QIDENTITYPROXYMODEL_H
61
The QAbstractProxyModel class provides a base class for proxy item models that can do sorting,...
The QIdentityProxyModel class proxies its source model unmodified.
\inmodule QtCore
\inmodule QtCore
Definition qmimedata.h:16
\inmodule QtCore
\inmodule QtCore
Definition qobject.h:103
QObject * parent() const
Returns a pointer to the parent object.
Definition qobject.h:346
\inmodule QtCore
Definition qvariant.h:65
Combined button and popup list for selecting options.
Orientation
Definition qnamespace.h:98
@ DisplayRole
DropAction
@ MatchWrap
@ MatchStartsWith
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
GLuint index
[2]
GLenum GLenum GLsizei count
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLbitfield flags
GLuint start
GLenum GLenum GLsizei void GLsizei void * column
GLenum GLenum GLsizei void * row
#define QT_REQUIRE_CONFIG(feature)
#define Q_OBJECT
static bool match(const uchar *found, uint foundLen, const char *target, uint targetLen)
QItemSelection * selection
[0]
QLayoutItem * child
[0]