| 104 | } |
| 105 | |
| 106 | void PlotTemplateDialog::customTemplatePathChanged(const QString& path) { |
| 107 | KConfigGroup conf = Settings::group(QLatin1String("PlotTemplateDialog")); |
| 108 | if (!path.isEmpty()) |
| 109 | conf.writeEntry(lastDirConfigEntry, path); |
| 110 | |
| 111 | mTemplateListModelCustom->setSearchPath(path); |
| 112 | ui->cbLocation->setToolTip(path); // custom path index is selected |
| 113 | auto index = mTemplateListModelCustom->index(0, 0); |
| 114 | ui->lvInstalledTemplates->setCurrentIndex(index); |
| 115 | |
| 116 | // Because if the modelindex is invalid showPreview() will not be |
| 117 | // called because currentIndex will not trigger indexChange |
| 118 | if (!index.isValid()) |
| 119 | showPreview(); |
| 120 | } |
| 121 | |
| 122 | QString PlotTemplateDialog::defaultTemplateInstallPath() { |
| 123 | // folder where config files will be stored in object specific sub-folders: |
nothing calls this directly
no test coverage detected