KItemModels
kmodelindexproxymapper.h
29 * In a complex system of proxy models there can be a need to map indexes and selections between them,
43 * If there is a need to map indexes between proxy 2 and proxy 4, a KModelIndexProxyMapper can be created
55 * Note that the aim is to achieve black box connections so that there is no need for application code to
56 * know the structure of proxy models in the path between left and right and attempt to manually map them.
88 KModelIndexProxyMapper(const QAbstractItemModel *leftModel, const QAbstractItemModel *rightModel, QObject *parent = nullptr);
QItemSelection mapSelectionLeftToRight(const QItemSelection &selection) const
Maps the selection from the left model to the right model.
Definition kmodelindexproxymapper.cpp:188
bool isConnected
Indicates whether there is a chain that can be followed from leftModel to rightModel.
Definition kmodelindexproxymapper.h:83
KModelIndexProxyMapper(const QAbstractItemModel *leftModel, const QAbstractItemModel *rightModel, QObject *parent=nullptr)
Constructor.
Definition kmodelindexproxymapper.cpp:160
QModelIndex mapLeftToRight(const QModelIndex &index) const
Maps the index from the left model to the right model.
Definition kmodelindexproxymapper.cpp:168
QItemSelection mapSelectionRightToLeft(const QItemSelection &selection) const
Maps the selection from the right model to the left model.
Definition kmodelindexproxymapper.cpp:236
QModelIndex mapRightToLeft(const QModelIndex &index) const
Maps the index from the right model to the left model.
Definition kmodelindexproxymapper.cpp:178
QObject(QObject *parent)
Q_OBJECTQ_OBJECT
Q_PROPERTY(...)
Q_SIGNALSQ_SIGNALS
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:51:41 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:51:41 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.