| 73 | } |
| 74 | |
| 75 | void ConfigSectionKeyboard::initialize() |
| 76 | { |
| 77 | // Name of the keys in the table |
| 78 | for (quint32 i = 0; i <= 12; i++) |
| 79 | ui->tableKeyboardMap->horizontalHeaderItem(static_cast<int>(i))->setText( |
| 80 | ContextManager::keyName()->getKeyName(i, true, false, false, true)); |
| 81 | |
| 82 | // Populate the table |
| 83 | int maxWidth = 50; |
| 84 | for (int j = 0; j < ui->tableKeyboardMap->columnCount(); j++) |
| 85 | { |
| 86 | for (int i = 0; i < ui->tableKeyboardMap->rowCount(); i++) |
| 87 | { |
| 88 | EditKey* key = dynamic_cast<EditKey*>(ui->tableKeyboardMap->cellWidget(i, j)); |
| 89 | key->updateText(); |
| 90 | maxWidth = qMax(maxWidth, key->sizeHint().width()); |
| 91 | } |
| 92 | } |
| 93 | ui->tableKeyboardMap->horizontalHeader()->setDefaultSectionSize(maxWidth); |
| 94 | |
| 95 | // Octave configuration |
| 96 | initializeFirstC(); |
| 97 | |
| 98 | // Reference pitch |
| 99 | ui->spinReferencePitch->blockSignals(true); |
| 100 | ui->spinReferencePitch->setValue(ContextManager::configuration()->getValue(ConfManager::SECTION_SOUND_ENGINE, "reference_pitch", 4400).toDouble() / 10.0); |
| 101 | ui->spinReferencePitch->blockSignals(false); |
| 102 | |
| 103 | // Load the temperaments |
| 104 | updateTemperaments(); |
| 105 | } |
| 106 | |
| 107 | void ConfigSectionKeyboard::initializeFirstC() |
| 108 | { |
nothing calls this directly
no test coverage detected