BornAgain
1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Functions | |
const SessionItem * | ancestor (const SessionItem *item, const QString &requiredModelType) |
Returns ancestor of given modelType for given item. More... | |
QModelIndex | getIndexFromPath (const SessionModel *model, const QString &path) |
SessionItem * | getItemFromPath (const QString &relPath, const SessionItem *parent) |
returns an item from relative path wrt to given parent More... | |
QString | getPathFromIndex (const QModelIndex &index) |
bool | isValidItem (SessionModel *model, SessionItem *item, const QModelIndex &parent) |
Iterates through all the model and returns true if item is found. This is to. More... | |
QString | itemPathTranslation (const SessionItem &item, const SessionItem *topItem=0) |
Returns translation of item path to domain name. More... | |
const SessionItem * ModelPath::ancestor | ( | const SessionItem * | item, |
const QString & | requiredModelType | ||
) |
Returns ancestor of given modelType for given item.
For example, returns corresponding jobItem owning ParameterItem via ParameterContainer.
Definition at line 87 of file ModelPath.cpp.
References SessionItem::modelType(), and SessionItem::parent().
Referenced by DetectorMaskDelegate::createIntensityDataItem(), ComponentProxyStrategy::isGroupChildren(), qdesigner_internal::Utils::isObjectAncestorOf(), ComponentProxyStrategy::isSubGroup(), ParameterItem::linkedItem(), MaterialPropertyController::onMaterialDataChanged(), ComponentProxyStrategy::processGroupItem(), and ComponentProxyStrategy::processSubGroupItem().
QModelIndex ModelPath::getIndexFromPath | ( | const SessionModel * | model, |
const QString & | path | ||
) |
Definition at line 36 of file ModelPath.cpp.
References SessionItem::childAt(), SessionItem::getItem(), SessionItem::index(), SessionItem::itemName(), SessionItem::modelType(), SessionItem::numberOfChildren(), SessionModel::rootItem(), and JobItem::T_INSTRUMENT.
Referenced by DataProperties::dataItem(), getItemFromPath(), and ParameterItem::linkedItem().
SessionItem * ModelPath::getItemFromPath | ( | const QString & | relPath, |
const SessionItem * | parent | ||
) |
returns an item from relative path wrt to given parent
Definition at line 60 of file ModelPath.cpp.
References ASSERT, getIndexFromPath(), getPathFromIndex(), SessionItem::index(), SessionModel::itemForIndex(), and SessionItem::model().
Referenced by FitParameterHelper::getParameterItem(), ParameterTreeUtils::parameterDictionary(), ParameterTreeUtils::parameterNameToLinkedItem(), and FitParameterContainerItem::setValuesInParameterContainer().
QString ModelPath::getPathFromIndex | ( | const QModelIndex & | index | ) |
Definition at line 19 of file ModelPath.cpp.
Referenced by getItemFromPath(), FitParameterHelper::getParameterItemPath(), and DataProperties::setDataItem().
bool ModelPath::isValidItem | ( | SessionModel * | model, |
SessionItem * | item, | ||
const QModelIndex & | parent | ||
) |
Iterates through all the model and returns true if item is found. This is to.
Definition at line 69 of file ModelPath.cpp.
References SessionModel::index(), SessionModel::itemForIndex(), and SessionModel::rowCount().
Referenced by FitParameterProxyModel::isValidSourceItem().
QString ModelPath::itemPathTranslation | ( | const SessionItem & | item, |
const SessionItem * | topItem = 0 |
||
) |
Returns translation of item path to domain name.
Definition at line 98 of file ModelPath.cpp.
References SessionItem::parent(), and SessionItem::translateList().
Referenced by ParameterTreeUtils::parameterDictionary().