* Set the values from a format configuration. * * @param cfg format configuration */
| 78 | * @param cfg format configuration |
| 79 | */ |
| 80 | void FormatBox::fromFormatConfig(const FormatConfig& cfg) |
| 81 | { |
| 82 | m_formatEditingCheckBox->setChecked(cfg.formatWhileEditing()); |
| 83 | m_caseConvComboBox->setCurrentIndex(cfg.caseConversion()); |
| 84 | int localeIndex = m_localeComboBox->findText(cfg.localeName()); |
| 85 | if (localeIndex == -1) { |
| 86 | localeIndex = 0; |
| 87 | } |
| 88 | m_localeComboBox->setCurrentIndex(localeIndex); |
| 89 | m_strRepCheckBox->setChecked(cfg.strRepEnabled()); |
| 90 | m_strReplTableModel->setMap(cfg.strRepMap()); |
| 91 | } |
| 92 | |
| 93 | /** |
| 94 | * Store the values in a format configuration. |
no test coverage detected