! loads the settings for the current filter from a template */
| 1218 | loads the settings for the current filter from a template |
| 1219 | */ |
| 1220 | void ImportFileWidget::loadConfigFromTemplate(KConfig& config) { |
| 1221 | auto fileType = currentFileType(); |
| 1222 | KConfigGroup group; |
| 1223 | if (fileType == AbstractFileFilter::FileType::Ascii) { |
| 1224 | m_asciiOptionsWidget->loadConfigFromTemplate(config); |
| 1225 | group = config.group(QLatin1String("ImportAscii")); |
| 1226 | } else if (fileType == AbstractFileFilter::FileType::Binary) { |
| 1227 | m_binaryOptionsWidget->loadConfigFromTemplate(config); |
| 1228 | group = config.group(QLatin1String("ImportBinary")); |
| 1229 | } |
| 1230 | |
| 1231 | // load additionally the "data portion to read"-settings which are not |
| 1232 | // part of the options widgets and were not loaded above |
| 1233 | ui.sbStartRow->setValue(group.readEntry(QLatin1String("StartRow"), -1)); |
| 1234 | ui.sbEndRow->setValue(group.readEntry(QLatin1String("EndRow"), -1)); |
| 1235 | ui.sbStartColumn->setValue(group.readEntry(QLatin1String("StartColumn"), -1)); |
| 1236 | ui.sbEndColumn->setValue(group.readEntry(QLatin1String("EndColumn"), -1)); |
| 1237 | } |
| 1238 | |
| 1239 | /*! |
| 1240 | * \brief ImportFileWidget::hidePropertyWidgets |
no test coverage detected