| 359 | } |
| 360 | |
| 361 | void 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 | |
| 375 | void ColorMapsWidget::activateListViewItem(const QString& name) { |
| 376 | const auto& items = ui.lwColorMaps->findItems(name, Qt::MatchExactly); |