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

Method customTemplatePathChanged

src/frontend/PlotTemplateDialog.cpp:106–120  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

104}
105
106void 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
122QString PlotTemplateDialog::defaultTemplateInstallPath() {
123 // folder where config files will be stored in object specific sub-folders:

Callers

nothing calls this directly

Calls 7

groupFunction · 0.85
setSearchPathMethod · 0.80
setToolTipMethod · 0.80
isEmptyMethod · 0.45
indexMethod · 0.45
setCurrentIndexMethod · 0.45
isValidMethod · 0.45

Tested by

no test coverage detected