Palette* MuseScore::newKeySigPalette(bool basic) { Palette* sp = new Palette; sp->setName(QT_TRANSLATE_NOOP("Palette", "Key Signatures")); sp->setMag(1.0); sp->setGrid(56, 64); sp->setYOffset(0.0); for (int i = 0; i < 7; ++i) { KeySig* k = new KeySig(gscore); k->setKey(Key(i + 1)); sp->append(k, qApp->translate("MuseScore", keyNames[i*2])); } for (int i = -7; i < 0; ++i) { KeySig* k = new KeySig(gscore); k->setKey(Key(i)); sp->append(k, qApp->translate("MuseScore", keyNames[(7 + i) * 2 + 1])); } KeySig* k = new KeySig(gscore); k->setKey(Key::C); sp->append(k, qApp->translate("MuseScore", keyNames[14])); if (!basic) { // atonal key signature KeySigEvent nke; nke.setKey(Key::C); nke.setCustom(true); nke.setMode(KeyMode::NONE); KeySig* nk = new KeySig(gscore); nk->setKeySigEvent(nke); sp->append(nk, qApp->translate("MuseScore", keyNames[15])); } return sp; }