| 26 | } |
| 27 | |
| 28 | void KeyboardMap::initializeMapping() |
| 29 | { |
| 30 | _keyMap.clear(); |
| 31 | for (int octave = 0; octave < 4; octave++) |
| 32 | { |
| 33 | for (int keyNum = (int)ConfManager::KEY_C_LEFT; keyNum <= (int)ConfManager::KEY_C_RIGHT; keyNum++) |
| 34 | { |
| 35 | ConfManager::Key key = (ConfManager::Key)keyNum; |
| 36 | _keyMap[octave][key] = QKeySequence(ContextManager::configuration()->getMapping(octave, key)); |
| 37 | } |
| 38 | } |
| 39 | _firstNote = 12 * ContextManager::configuration()->getValue(ConfManager::SECTION_KEYBOARD, "octave_offset", 3).toInt(); |
| 40 | } |
| 41 | |
| 42 | int KeyboardMap::getKey(QKeySequence sequence) |
| 43 | { |
no test coverage detected