BornAgain
1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Functions | |
void | iterate (const QModelIndex &index, const QAbstractItemModel *model, const std::function< void(const QModelIndex &)> &fun) |
Iterates through all model indices and calls user function. More... | |
void | iterate_if (const QModelIndex &index, const QAbstractItemModel *model, const std::function< bool(const QModelIndex &)> &fun) |
Iterates through all model indices and calls user function. More... | |
QStringList | topItemNames (SessionModel *model, const QString &modelType="") |
Returns list of top iten manes. More... | |
void ModelUtils::iterate | ( | const QModelIndex & | index, |
const QAbstractItemModel * | model, | ||
const std::function< void(const QModelIndex &)> & | fun | ||
) |
Iterates through all model indices and calls user function.
Definition at line 33 of file ModelUtils.cpp.
Referenced by ModelView::Utils::iterate(), and MaterialPropertyController::relatedSampleItems().
void ModelUtils::iterate_if | ( | const QModelIndex & | index, |
const QAbstractItemModel * | model, | ||
const std::function< bool(const QModelIndex &)> & | fun | ||
) |
Iterates through all model indices and calls user function.
If function returns false for given index, iteration will not go down to children.
Definition at line 47 of file ModelUtils.cpp.
Referenced by ProxyModelStrategy::buildModelMap(), and ModelView::Utils::iterate_if().
QStringList ModelUtils::topItemNames | ( | SessionModel * | model, |
const QString & | modelType = "" |
||
) |
Returns list of top iten manes.
Definition at line 20 of file ModelUtils.cpp.
References SessionModel::topItems().
Referenced by InstrumentViewActions::mapOfNames(), and SimulationDataSelectorWidget::updateViewElements().