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

Method activateIconViewItem

src/frontend/colormaps/ColorMapsWidget.cpp:361–373  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

359}
360
361void ColorMapsWidget::activateIconViewItem(const QString& name) {
362 auto* model = ui.lvColorMaps->model();
363 if (!model)
364 return;
365
366 for (int i = 0; i < model->rowCount(); ++i) {
367 const auto& index = model->index(i, 0);
368 if (index.data(Qt::DisplayRole).toString() == name) {
369 ui.lvColorMaps->setCurrentIndex(index);
370 ui.lvColorMaps->scrollTo(index);
371 }
372 }
373}
374
375void ColorMapsWidget::activateListViewItem(const QString& name) {
376 const auto& items = ui.lwColorMaps->findItems(name, Qt::MatchExactly);

Callers

nothing calls this directly

Calls 6

modelMethod · 0.45
rowCountMethod · 0.45
indexMethod · 0.45
toStringMethod · 0.45
dataMethod · 0.45
setCurrentIndexMethod · 0.45

Tested by

no test coverage detected