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

Method setSubcategory

src/frontend/datasources/ImportDatasetWidget.cpp:471–484  ·  view source on GitHub ↗

* @brief Sets the currently selected subcategory * @param subcategory the name of the subcategory */

Source from the content-addressed store, hash-verified

469 * @param subcategory the name of the subcategory
470 */
471void ImportDatasetWidget::setSubcategory(const QString& subcategory) {
472 for (int i = 0; i < ui.twCategories->topLevelItemCount(); i++) {
473 if (ui.twCategories->topLevelItem(i)->text(0).compare(m_category) == 0) {
474 QTreeWidgetItem* categoryItem = ui.twCategories->topLevelItem(i);
475 for (int j = 0; j < categoryItem->childCount(); j++) {
476 if (categoryItem->child(j)->text(0).compare(subcategory) == 0) {
477 updateDatasets(categoryItem->child(j));
478 break;
479 }
480 }
481 break;
482 }
483 }
484}
485
486/**
487 * @brief Sets the currently selected dataset

Callers 1

datasetClickedMethod · 0.45

Calls 3

textMethod · 0.45
childCountMethod · 0.45
childMethod · 0.45

Tested by

no test coverage detected