KItemModels
krearrangecolumnsproxymodel.cpp
74QModelIndex KRearrangeColumnsProxyModel::index(int row, int column, const QModelIndex &parent) const
96 const QModelIndex sourceIndex = sourceModel()->index(row, sourceColumnForProxyColumn(column), sourceParent);
115QVariant KRearrangeColumnsProxyModel::headerData(int section, Qt::Orientation orientation, int role) const
128QModelIndex KRearrangeColumnsProxyModel::sibling(int row, int column, const QModelIndex &idx) const
151 return createSourceIndex(proxyIndex.row(), sourceColumnForProxyColumn(proxyIndex.column()), proxyIndex.internalPointer());
KRearrangeColumnsProxyModel(QObject *parent=nullptr)
Creates a KRearrangeColumnsProxyModel proxy.
Definition krearrangecolumnsproxymodel.cpp:16
int sourceColumnForProxyColumn(int proxyColumn) const
Returns the source column for the given proxy column.
Definition krearrangecolumnsproxymodel.cpp:160
QModelIndex sibling(int row, int column, const QModelIndex &idx) const override
Definition krearrangecolumnsproxymodel.cpp:128
QModelIndex mapToSource(const QModelIndex &proxyIndex) const override
Definition krearrangecolumnsproxymodel.cpp:146
QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override
Definition krearrangecolumnsproxymodel.cpp:115
int rowCount(const QModelIndex &parent=QModelIndex()) const override
Definition krearrangecolumnsproxymodel.cpp:44
int columnCount(const QModelIndex &parent=QModelIndex()) const override
Definition krearrangecolumnsproxymodel.cpp:35
int proxyColumnForSourceColumn(int sourceColumn) const
Returns the proxy column for the given source column or -1 if the source column isn't shown in the pr...
Definition krearrangecolumnsproxymodel.cpp:154
bool hasChildren(const QModelIndex &parent=QModelIndex()) const override
Definition krearrangecolumnsproxymodel.cpp:58
void setSourceColumns(const QList< int > &columns)
Set the chosen source columns, in the desired order for the proxy columns columns[proxyColumn=0] is t...
Definition krearrangecolumnsproxymodel.cpp:26
QModelIndex mapFromSource(const QModelIndex &sourceIndex) const override
Definition krearrangecolumnsproxymodel.cpp:136
QModelIndex index(int row, int column, const QModelIndex &parent=QModelIndex()) const override
Definition krearrangecolumnsproxymodel.cpp:74
void beginResetModel()
QModelIndex createIndex(int row, int column, const void *ptr) const const
void endResetModel()
QModelIndex createSourceIndex(int row, int col, void *internalPtr) const const
sourceModel
virtual QVariant headerData(int section, Qt::Orientation orientation, int role) const const override
int column() const const
void * internalPointer() const const
bool isValid() const const
const QAbstractItemModel * model() const const
QModelIndex parent() const const
int row() const const
QModelIndex sibling(int row, int column) const const
QObject * parent() const const
Orientation
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:18:35 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:18:35 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.