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

Method initSubcategories

src/frontend/DatasetModel.cpp:55–69  ·  view source on GitHub ↗

* @brief Initializes the list of subcategories. */

Source from the content-addressed store, hash-verified

53 * @brief Initializes the list of subcategories.
54 */
55void DatasetModel::initSubcategories(const QMap<QString, QMap<QString, QMap<QString, QVector<QString>>>>& datasetMap) {
56 for (auto collection = datasetMap.begin(); collection != datasetMap.end(); ++collection) {
57 const QMap<QString, QMap<QString, QVector<QString>>> collection_ = collection.value();
58
59 for (auto category = collection_.begin(); category != collection_.end(); ++category) {
60 m_subcategories[collection.key()][category.key()] = category.value().keys();
61
62 for (auto it = category.value().constBegin(); it != category.value().constEnd(); ++it) {
63 const QString& subcategory = it.key();
64 if (!m_allSubcategories[category.key()].contains(subcategory))
65 m_allSubcategories[category.key()].append(subcategory);
66 }
67 }
68 }
69}
70
71/**
72 * @brief Initializes the list of datasets.

Callers

nothing calls this directly

Calls 5

appendMethod · 0.80
beginMethod · 0.45
endMethod · 0.45
valueMethod · 0.45
containsMethod · 0.45

Tested by

no test coverage detected