* @brief Initializes the list of subcategories. */
| 53 | * @brief Initializes the list of subcategories. |
| 54 | */ |
| 55 | void 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. |