BornAgain
1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Strategy for ComponentProxyModel which makes it identical to source model. More...
Public Types | |
using | map_t = QMap< QPersistentModelIndex, QPersistentModelIndex > |
Public Member Functions | |
void | buildModelMap (SessionModel *source, ComponentProxyModel *proxy) |
virtual void | onDataChanged (SessionModel *source, ComponentProxyModel *proxy) |
const map_t & | proxySourceParent () |
void | setRootIndex (const QModelIndex &sourceRootIndex) |
const map_t & | sourceToProxy () |
Protected Member Functions | |
QModelIndex | createProxyIndex (int nrow, int ncol, void *adata) |
Method to ask proxy to create an index using friendship of ProxyModelStrategy and ComponentProxyModel. More... | |
bool | processSourceIndex (const QModelIndex &index) |
Builds one-to-one mapping for source and proxy. More... | |
Protected Attributes | |
ComponentProxyModel * | m_proxy |
QMap< QPersistentModelIndex, QPersistentModelIndex > | m_proxySourceParent |
SessionModel * | m_source |
QPersistentModelIndex | m_sourceRootIndex |
QMap< QPersistentModelIndex, QPersistentModelIndex > | m_sourceToProxy |
Mapping of proxy model indices to indices of parent in source model. More... | |
Strategy for ComponentProxyModel which makes it identical to source model.
Definition at line 57 of file ProxyModelStrategy.h.
|
inherited |
Definition at line 28 of file ProxyModelStrategy.h.
|
inherited |
Definition at line 21 of file ProxyModelStrategy.cpp.
References ModelUtils::iterate_if(), ProxyModelStrategy::m_proxy, ProxyModelStrategy::m_proxySourceParent, ProxyModelStrategy::m_source, ProxyModelStrategy::m_sourceRootIndex, ProxyModelStrategy::m_sourceToProxy, and ProxyModelStrategy::processSourceIndex().
Referenced by ComponentProxyStrategy::onDataChanged().
|
protectedinherited |
Method to ask proxy to create an index using friendship of ProxyModelStrategy and ComponentProxyModel.
Definition at line 62 of file ProxyModelStrategy.cpp.
References ASSERT, and ProxyModelStrategy::m_proxy.
Referenced by ComponentProxyStrategy::processDefaultItem(), ComponentProxyStrategy::processGroupItem(), ComponentProxyStrategy::processRootItem(), processSourceIndex(), and ComponentProxyStrategy::processSubGroupItem().
|
virtualinherited |
Reimplemented in ComponentProxyStrategy.
Definition at line 37 of file ProxyModelStrategy.cpp.
|
protectedvirtual |
Builds one-to-one mapping for source and proxy.
Implements ProxyModelStrategy.
Definition at line 70 of file ProxyModelStrategy.cpp.
References ProxyModelStrategy::createProxyIndex(), ProxyModelStrategy::m_proxySourceParent, and ProxyModelStrategy::m_sourceToProxy.
|
inherited |
Definition at line 49 of file ProxyModelStrategy.cpp.
References ProxyModelStrategy::m_proxySourceParent.
|
inherited |
Definition at line 54 of file ProxyModelStrategy.cpp.
References ProxyModelStrategy::m_sourceRootIndex.
|
inherited |
Definition at line 44 of file ProxyModelStrategy.cpp.
References ProxyModelStrategy::m_sourceToProxy.
|
protectedinherited |
Definition at line 52 of file ProxyModelStrategy.h.
Referenced by ProxyModelStrategy::buildModelMap(), and ProxyModelStrategy::createProxyIndex().
|
protectedinherited |
Definition at line 48 of file ProxyModelStrategy.h.
Referenced by ProxyModelStrategy::buildModelMap(), ComponentProxyStrategy::processDefaultItem(), ComponentProxyStrategy::processGroupItem(), ComponentProxyStrategy::processRootItem(), processSourceIndex(), ComponentProxyStrategy::processSubGroupItem(), and ProxyModelStrategy::proxySourceParent().
|
protectedinherited |
Definition at line 51 of file ProxyModelStrategy.h.
Referenced by ProxyModelStrategy::buildModelMap(), and ComponentProxyStrategy::processSourceIndex().
|
protectedinherited |
Definition at line 50 of file ProxyModelStrategy.h.
Referenced by ProxyModelStrategy::buildModelMap(), ComponentProxyStrategy::isNewRootItem(), ComponentProxyStrategy::isPropertyRelated(), and ProxyModelStrategy::setRootIndex().
|
protectedinherited |
Mapping of proxy model indices to indices of parent in source model.
Definition at line 46 of file ProxyModelStrategy.h.
Referenced by ProxyModelStrategy::buildModelMap(), ComponentProxyStrategy::processDefaultItem(), ComponentProxyStrategy::processGroupItem(), ComponentProxyStrategy::processRootItem(), processSourceIndex(), ComponentProxyStrategy::processSubGroupItem(), and ProxyModelStrategy::sourceToProxy().