21 const QModelIndex& parent)
23 for (
int i_row = 0; i_row < model->
rowCount(parent); ++i_row) {
24 QModelIndex index = model->
index(i_row, 0, parent);
26 if (curr == item ||
isValidItem(model, item, index))
35 while (cur && cur->
modelType() != requiredModelType)
Defines namespace GUI::Model::Path.
Defines class SessionModel.
Base class for a GUI data item.
SessionItem * parentItem() const
Returns parent of this item.
QString modelType() const
Get model type.
Base class for a GUI data collection. A collection is e.g. all real data (RealDataModel)....
SessionItem * itemForIndex(const QModelIndex &index) const
QModelIndex index(int row, int column, const QModelIndex &parent) const override
int rowCount(const QModelIndex &parent) const override
bool isValidItem(SessionModel *model, SessionItem *item, const QModelIndex &parent)
Iterates through all the model and returns true if item is found. This is to.
SessionItem * ancestor(SessionItem *item, const QString &requiredModelType)
Returns ancestor of given modelType for given item.