15 #ifndef BORNAGAIN_GUI_COREGUI_MODELS_MODELUTILS_H
16 #define BORNAGAIN_GUI_COREGUI_MODELS_MODELUTILS_H
22 class QAbstractItemModel;
30 void iterate(
const QModelIndex& index,
const QAbstractItemModel* model,
31 const std::function<
void(
const QModelIndex&)>& fun);
35 void iterate_if(
const QModelIndex& index,
const QAbstractItemModel* model,
36 const std::function<
bool(
const QModelIndex&)>& fun);
QStringList topItemNames(SessionModel *model, const QString &modelType="")
Returns list of top iten manes.
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.
void iterate(const QModelIndex &index, const QAbstractItemModel *model, const std::function< void(const QModelIndex &)> &fun)
Iterates through all model indices and calls user function.