MCPcopy Create free account
hub / github.com/KDE/labplot / collapseParents

Method collapseParents

src/frontend/ProjectExplorer.cpp:1249–1258  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1247}
1248
1249void ProjectExplorer::collapseParents(const QModelIndex& index, const QList<QModelIndex>& expanded) {
1250 if (index.column() == 0 && index.row() == 0) { // root/project index, doesn't have any parent
1251 if (expanded.indexOf(index) == -1)
1252 m_treeView->collapse(index);
1253 } else {
1254 const auto& parent = index.parent();
1255 if (parent != QModelIndex() && expanded.indexOf(parent) == -1)
1256 m_treeView->collapse(parent);
1257 }
1258}

Callers

nothing calls this directly

Calls 5

QModelIndexClass · 0.70
columnMethod · 0.45
rowMethod · 0.45
indexOfMethod · 0.45
parentMethod · 0.45

Tested by

no test coverage detected