15 #ifndef BORNAGAIN_GUI_COREGUI_MODELS_PROXYMODELSTRATEGY_H
16 #define BORNAGAIN_GUI_COREGUI_MODELS_PROXYMODELSTRATEGY_H
18 #include <QPersistentModelIndex>
28 using map_t = QMap<QPersistentModelIndex, QPersistentModelIndex>;
Proxy model to adjust SessionModel for component editor (right bottom corner of SampleView and simila...
Strategy for ComponentProxyModel which makes it identical to source model.
bool processSourceIndex(const QModelIndex &index)
Builds one-to-one mapping for source and proxy.
Base class for proxy strategies in ComponentProxyModel.
const map_t & proxySourceParent()
QMap< QPersistentModelIndex, QPersistentModelIndex > m_sourceToProxy
Mapping of proxy model indices to indices of parent in source model.
QPersistentModelIndex m_sourceRootIndex
ComponentProxyModel * m_proxy
QMap< QPersistentModelIndex, QPersistentModelIndex > map_t
QMap< QPersistentModelIndex, QPersistentModelIndex > m_proxySourceParent
QModelIndex createProxyIndex(int nrow, int ncol, void *adata)
Method to ask proxy to create an index using friendship of ProxyModelStrategy and ComponentProxyModel...
const map_t & sourceToProxy()
void buildModelMap(SessionModel *source, ComponentProxyModel *proxy)
void setRootIndex(const QModelIndex &sourceRootIndex)
virtual ~ProxyModelStrategy()=default
virtual bool processSourceIndex(const QModelIndex &index)=0
Mapping of proxy model indices to indices in source model.
virtual void onDataChanged(SessionModel *source, ComponentProxyModel *proxy)