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
qtransposeproxymodel.h
Go to the documentation of this file.
1// Copyright (C) 2018 Luca Beldi <v.ronin@yahoo.it>
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QTRANSPOSEPROXYMODEL_H
5#define QTRANSPOSEPROXYMODEL_H
6
7#include <QtCore/qabstractproxymodel.h>
8#include <QtCore/qscopedpointer.h>
9
10QT_REQUIRE_CONFIG(transposeproxymodel);
11
13
15
16class Q_CORE_EXPORT QTransposeProxyModel : public QAbstractProxyModel
17{
19 Q_DISABLE_COPY(QTransposeProxyModel)
20 Q_DECLARE_PRIVATE(QTransposeProxyModel)
21public:
22 explicit QTransposeProxyModel(QObject* parent = nullptr);
24 void setSourceModel(QAbstractItemModel* newSourceModel) override;
25 int rowCount(const QModelIndex &parent = QModelIndex()) const override;
26 int columnCount(const QModelIndex &parent = QModelIndex()) const override;
27 QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
28 bool setHeaderData(int section, Qt::Orientation orientation, const QVariant &value, int role = Qt::EditRole) override;
29 bool setItemData(const QModelIndex &index, const QMap<int, QVariant> &roles) override;
30 QSize span(const QModelIndex &index) const override;
31 QMap<int, QVariant> itemData(const QModelIndex &index) const override;
32 QModelIndex mapFromSource(const QModelIndex &sourceIndex) const override;
33 QModelIndex mapToSource(const QModelIndex &proxyIndex) const override;
34 QModelIndex parent(const QModelIndex &index) const override;
35 QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const override;
36 bool insertRows(int row, int count, const QModelIndex &parent = QModelIndex()) override;
37 bool removeRows(int row, int count, const QModelIndex &parent = QModelIndex()) override;
38 bool moveRows(const QModelIndex &sourceParent, int sourceRow, int count, const QModelIndex &destinationParent, int destinationChild) override;
39 bool insertColumns(int column, int count, const QModelIndex &parent = QModelIndex()) override;
40 bool removeColumns(int column, int count, const QModelIndex &parent = QModelIndex()) override;
41 bool moveColumns(const QModelIndex &sourceParent, int sourceColumn, int count, const QModelIndex &destinationParent, int destinationChild) override;
42 void sort(int column, Qt::SortOrder order = Qt::AscendingOrder) override;
43protected:
45};
46
48
49#endif // QTRANSPOSEPROXYMODEL_H
The QAbstractProxyModel class provides a base class for proxy item models that can do sorting,...
\inmodule QtCore
\inmodule QtCore
Definition qobject.h:103
\inmodule QtCore
Definition qsize.h:25
This proxy transposes the source model.
~QTransposeProxyModel()
Destructs the proxy model.
\inmodule QtCore
Definition qvariant.h:65
Combined button and popup list for selecting options.
Orientation
Definition qnamespace.h:98
@ EditRole
@ DisplayRole
SortOrder
Definition qnamespace.h:121
@ AscendingOrder
Definition qnamespace.h:122
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
GLuint index
[2]
GLenum GLenum GLsizei count
GLenum GLenum GLsizei void GLsizei void * column
GLenum GLenum GLsizei void * row
GLenum GLenum GLsizei void GLsizei void void * span
GLfixed GLfixed GLint GLint order
#define QT_REQUIRE_CONFIG(feature)
#define Q_OBJECT
model setHeaderData(0, Qt::Horizontal, tr("Name"))