13 if (
index.isValid()) {
14 auto pathComponents =
RowPath();
15 auto currentIndex =
index.untyped();
16 while (currentIndex.isValid()) {
17 pathComponents.insert(pathComponents.begin(), currentIndex.row());
18 currentIndex = currentIndex.parent();
27 auto parentIndex = QModelIndex();
28 auto &path = location.
path();
29 for (
auto it = path.cbegin(); it != path.cend() - 1; ++it)
30 parentIndex =
m_model.index(*it, 0, parentIndex);
41 if (
m_model.hasIndex(row, column, parentIndex))
50 if (maybeIndex.is_initialized())
51 return maybeIndex.get();
53 throw std::runtime_error(
"indexAt: Attempted to get model index for "
54 "row location which does not exist.");
std::map< DeltaEMode::Type, std::string > index