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

Method addDatasetItems

src/frontend/datasources/ImportDatasetWidget.cpp:346–356  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

344}
345
346void ImportDatasetWidget::addDatasetItems(const QString& collection, const QString& category, const QString& subcategory, const QString& filter) {
347 if (!filter.isEmpty() && (category.startsWith(filter, Qt::CaseInsensitive) || subcategory.startsWith(filter, Qt::CaseInsensitive))) {
348 for (const QString& dataset : m_model->datasets(collection, category, subcategory))
349 ui.lwDatasets->addItem(new QListWidgetItem(dataset));
350 } else {
351 for (const QString& dataset : m_model->datasets(collection, category, subcategory)) {
352 if (filter.isEmpty() || dataset.startsWith(filter, Qt::CaseInsensitive))
353 ui.lwDatasets->addItem(new QListWidgetItem(dataset));
354 }
355 }
356}
357
358/**
359 * @brief Returns the name of the selected dataset

Callers

nothing calls this directly

Calls 2

datasetsMethod · 0.80
isEmptyMethod · 0.45

Tested by

no test coverage detected