KItemModels
kextracolumnsproxymodel.cpp
24 void _ec_sourceLayoutAboutToBeChanged(const QList<QPersistentModelIndex> &sourceParents, QAbstractItemModel::LayoutChangeHint hint);
25 void _ec_sourceLayoutChanged(const QList<QPersistentModelIndex> &sourceParents, QAbstractItemModel::LayoutChangeHint hint);
63bool KExtraColumnsProxyModel::setExtraColumnData(const QModelIndex &parent, int row, int extraColumn, const QVariant &data, int role)
73void KExtraColumnsProxyModel::extraColumnDataChanged(const QModelIndex &parent, int row, int extraColumn, const QList<int> &roles)
83 SIGNAL(layoutAboutToBeChanged(QList<QPersistentModelIndex>, QAbstractItemModel::LayoutChangeHint)),
85 SLOT(_ec_sourceLayoutAboutToBeChanged(QList<QPersistentModelIndex>, QAbstractItemModel::LayoutChangeHint)));
89 SLOT(_ec_sourceLayoutChanged(QList<QPersistentModelIndex>, QAbstractItemModel::LayoutChangeHint)));
99 SIGNAL(layoutAboutToBeChanged(QList<QPersistentModelIndex>, QAbstractItemModel::LayoutChangeHint)),
101 SLOT(_q_sourceLayoutAboutToBeChanged(QList<QPersistentModelIndex>, QAbstractItemModel::LayoutChangeHint)));
105 SLOT(_q_sourceLayoutChanged(QList<QPersistentModelIndex>, QAbstractItemModel::LayoutChangeHint)));
108 SIGNAL(layoutAboutToBeChanged(QList<QPersistentModelIndex>, QAbstractItemModel::LayoutChangeHint)),
110 SLOT(_ec_sourceLayoutAboutToBeChanged(QList<QPersistentModelIndex>, QAbstractItemModel::LayoutChangeHint)));
114 SLOT(_ec_sourceLayoutChanged(QList<QPersistentModelIndex>, QAbstractItemModel::LayoutChangeHint)));
150QItemSelection KExtraColumnsProxyModel::mapSelectionToSource(const QItemSelection &selection) const
229QVariant KExtraColumnsProxyModel::headerData(int section, Qt::Orientation orientation, int role) const
283void KExtraColumnsProxyModelPrivate::_ec_sourceLayoutAboutToBeChanged(const QList<QPersistentModelIndex> &sourceParents,
320void KExtraColumnsProxyModelPrivate::_ec_sourceLayoutChanged(const QList<QPersistentModelIndex> &sourceParents, QAbstractItemModel::LayoutChangeHint hint)
This proxy appends extra columns (after all existing columns).
Definition kextracolumnsproxymodel.h:40
int columnCount(const QModelIndex &parent=QModelIndex()) const override
Definition kextracolumnsproxymodel.cpp:185
QModelIndex sibling(int row, int column, const QModelIndex &idx) const override
Definition kextracolumnsproxymodel.cpp:142
void setSourceModel(QAbstractItemModel *model) override
Definition kextracolumnsproxymodel.cpp:79
void appendColumn(const QString &header=QString())
Appends an extra column.
Definition kextracolumnsproxymodel.cpp:51
QItemSelection mapSelectionToSource(const QItemSelection &selection) const override
Definition kextracolumnsproxymodel.cpp:150
QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override
Definition kextracolumnsproxymodel.cpp:229
int extraColumnForProxyColumn(int proxyColumn) const
Returns the extra column number (0, 1, ...) for a given column number of the proxymodel.
Definition kextracolumnsproxymodel.cpp:267
QModelIndex mapToSource(const QModelIndex &proxyIndex) const override
Definition kextracolumnsproxymodel.cpp:118
bool hasChildren(const QModelIndex &index) const override
Definition kextracolumnsproxymodel.cpp:221
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const override
Definition kextracolumnsproxymodel.cpp:191
int proxyColumnForExtraColumn(int extraColumn) const
Returns the proxy column number for a given extra column number (starting at 0).
Definition kextracolumnsproxymodel.cpp:278
virtual bool setExtraColumnData(const QModelIndex &parent, int row, int extraColumn, const QVariant &data, int role=Qt::EditRole)
This method is called by setData() for extra columns.
Definition kextracolumnsproxymodel.cpp:63
void extraColumnDataChanged(const QModelIndex &parent, int row, int extraColumn, const QList< int > &roles)
This method can be called by your derived class when the data in an extra column has changed.
Definition kextracolumnsproxymodel.cpp:73
QModelIndex buddy(const QModelIndex &index) const override
Definition kextracolumnsproxymodel.cpp:131
KExtraColumnsProxyModel(QObject *parent=nullptr)
Base class constructor.
Definition kextracolumnsproxymodel.cpp:36
bool setData(const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) override
Definition kextracolumnsproxymodel.cpp:201
Qt::ItemFlags flags(const QModelIndex &index) const override
Definition kextracolumnsproxymodel.cpp:211
QModelIndex index(int row, int column, const QModelIndex &parent=QModelIndex()) const override
Definition kextracolumnsproxymodel.cpp:245
virtual QVariant extraColumnData(const QModelIndex &parent, int row, int extraColumn, int role=Qt::DisplayRole) const =0
This method is called by data() for extra columns.
LayoutChangeHint
virtual QModelIndex buddy(const QModelIndex &index) const const
QModelIndex createIndex(int row, int column, const void *ptr) const const
void dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight, const QList< int > &roles)
virtual bool hasChildren(const QModelIndex &parent) const const
void layoutAboutToBeChanged(const QList< QPersistentModelIndex > &parents, QAbstractItemModel::LayoutChangeHint hint)
void layoutChanged(const QList< QPersistentModelIndex > &parents, QAbstractItemModel::LayoutChangeHint hint)
sourceModel
virtual int columnCount(const QModelIndex &parent) const const override
virtual QVariant headerData(int section, Qt::Orientation orientation, int role) const const override
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const const override
virtual QModelIndex mapToSource(const QModelIndex &proxyIndex) const const override
virtual void setSourceModel(QAbstractItemModel *newSourceModel) override
void merge(const QItemSelection &other, QItemSelectionModel::SelectionFlags command)
const_reference at(qsizetype i) const const
void clear()
const_iterator constBegin() const const
const_iterator constEnd() const const
void reserve(qsizetype size)
qsizetype size() const const
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
Q_EMITQ_EMIT
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
bool disconnect(const QMetaObject::Connection &connection)
QObject * parent() const const
bool isValid() const const
DisplayRole
typedef ItemFlags
Orientation
Q_D(Todo)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:06:27 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:06:27 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.