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

Function findLeaves

src/frontend/datasources/ROOTOptionsWidget.cpp:45–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43}
44
45QMultiHash<QStringList, QVector<QStringList>>
46findLeaves(QTreeWidgetItem* node, ROOTFilter* filter, const QString& fileName, const QStringList& path = QStringList{}) {
47 QMultiHash<QStringList, QVector<QStringList>> leaves;
48 if (node->childCount() > 0) {
49 for (int i = 0; i < node->childCount(); ++i)
50 leaves.unite(findLeaves(node->child(i), filter, fileName, path + QStringList(node->child(i)->text(0))));
51 } else {
52 leaves.insert(path, filter->listLeaves(fileName, node->data(0, Qt::UserRole).toLongLong()));
53 }
54 return leaves;
55}
56
57void ROOTOptionsWidget::updateContent(ROOTFilter* filter, const QString& fileName) {
58 DEBUG(Q_FUNC_INFO);

Callers 1

updateContentMethod · 0.85

Calls 6

insertMethod · 0.80
listLeavesMethod · 0.80
childCountMethod · 0.45
childMethod · 0.45
textMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected