MCPcopy Create free account
hub / github.com/davy7125/polyphone / initializeMapping

Method initializeMapping

sources/clavier/keyboardmap.cpp:28–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26}
27
28void 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
42int KeyboardMap::getKey(QKeySequence sequence)
43{

Callers 1

updateMappingMethod · 0.80

Calls 4

getMappingMethod · 0.80
toIntMethod · 0.80
clearMethod · 0.45
getValueMethod · 0.45

Tested by

no test coverage detected