! * Is called when the current properties are going to be saved in an already available template. * Emits \c saveConfigRequested, the receiver of the signal has to config.sync(). */
| 346 | * Emits \c saveConfigRequested, the receiver of the signal has to config.sync(). |
| 347 | */ |
| 348 | void TemplateHandler::saveMenuSelected(QAction* action) { |
| 349 | QString path = m_dirName + m_className + QLatin1Char('/') + action->data().toString(); |
| 350 | KConfig config(path, KConfig::SimpleConfig); |
| 351 | Q_EMIT saveConfigRequested(config); |
| 352 | Q_EMIT info(i18n("Template \"%1\" was saved.", action->text())); |
| 353 | } |
| 354 | |
| 355 | /*! |
| 356 | * Is called when the current properties are going to be saved as new default properties. |