| 88 | } |
| 89 | |
| 90 | void PresetFragment::onLoadClicked() |
| 91 | { |
| 92 | auto* select = ui->files->selectionModel(); |
| 93 | if (!select->hasSelection()) |
| 94 | { |
| 95 | return; |
| 96 | } |
| 97 | |
| 98 | auto indexes = select->selectedIndexes(); |
| 99 | if(!PresetManager::instance().load(PresetManager::instance().presetModel()->data(indexes.first(), Qt::UserRole).toString())) |
| 100 | { |
| 101 | QMessageBox::warning(this, tr("Cannot load preset"), tr("Selected file does not exist anymore"), QMessageBox::Ok); |
| 102 | } |
| 103 | } |
| 104 | |
| 105 | void PresetFragment::onNameFieldChanged(const QString &name) |
| 106 | { |
nothing calls this directly
no test coverage detected