Skip to content

Commit

Permalink
Shortcuts and QActions for new Note Entry Modes
Browse files Browse the repository at this point in the history
  • Loading branch information
shoogle committed Jul 5, 2016
1 parent 4c2a771 commit a6bba9d
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 17 deletions.
2 changes: 1 addition & 1 deletion libmscore/cmd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2391,7 +2391,7 @@ void Score::cmd(const QAction* a)
changeAccidental(AccidentalType::FLAT);
else if (cmd == "flat2")
changeAccidental(AccidentalType::FLAT2);
else if (cmd == "repitch")
else if (cmd == "note-input-repitch")
_is.setRepitchMode(a->isChecked());
else if (cmd == "flip")
cmdFlip();
Expand Down
8 changes: 4 additions & 4 deletions mscore/data/shortcuts.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@
<key>note-input</key>
<seq>N</seq>
</SC>
<SC>
<key>note-input-repitch</key>
<seq>Ctrl+Shift+I</seq>
</SC>
<SC>
<key>interval1</key>
<seq>Alt+1</seq>
Expand Down Expand Up @@ -683,10 +687,6 @@
<seq>Ctrl+U</seq>
<seq>Meta+Ctrl+F</seq>
</SC>
<SC>
<key>repitch</key>
<seq>Ctrl+Shift+I</seq>
</SC>
<SC>
<key>toggle-piano</key>
<seq>P</seq>
Expand Down
2 changes: 1 addition & 1 deletion mscore/keyb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ void MuseScore::updateInputState(Score* score)
getAction("no-beam")->setChecked(is.beamMode() == Beam::Mode::NONE);
getAction("beam32")->setChecked(is.beamMode() == Beam::Mode::BEGIN32);
getAction("auto-beam")->setChecked(is.beamMode() == Beam::Mode::AUTO);
getAction("repitch")->setChecked(is.repitchMode());
getAction("note-input-repitch")->setChecked(is.repitchMode());

if(is.noteEntryMode() && !is.rest())
updateShadowNote();
Expand Down
66 changes: 55 additions & 11 deletions mscore/shortcut.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,61 @@ Shortcut Shortcut::_sc[] = {
Qt::WindowShortcut,
ShortcutFlags::A_CHECKABLE
},
{
MsWidget::MAIN_WINDOW,
STATE_NORMAL | STATE_NOTE_ENTRY,
"note-input-steptime",
QT_TRANSLATE_NOOP("action","Step-time (default)"),
QT_TRANSLATE_NOOP("action","Enter notes with a mouse or keyboard"),
0,
Icons::noteEntry_ICON, // Icons::noteEntrySteptime_ICON (using normal icon for the time being.)
Qt::WindowShortcut,
ShortcutFlags::A_CHECKABLE
},
{
MsWidget::MAIN_WINDOW,
STATE_NORMAL | STATE_NOTE_ENTRY,
"note-input-repitch",
QT_TRANSLATE_NOOP("action","Re-Pitch"),
QT_TRANSLATE_NOOP("action","Replace pitches without changing rhythms"),
0,
Icons::noteEntryRepitch_ICON,
Qt::ApplicationShortcut,
ShortcutFlags::A_CMD | ShortcutFlags::A_CHECKABLE
},
{
MsWidget::MAIN_WINDOW,
STATE_NORMAL | STATE_NOTE_ENTRY,
"note-input-rhythm",
QT_TRANSLATE_NOOP("action","Rhythm"),
QT_TRANSLATE_NOOP("action","Enter durations with a single click or keypress"),
0,
Icons::noteEntryRhythm_ICON,
Qt::WindowShortcut,
ShortcutFlags::A_CHECKABLE
},
{
MsWidget::MAIN_WINDOW,
STATE_NORMAL | STATE_NOTE_ENTRY,
"note-input-realtime-auto",
QT_TRANSLATE_NOOP("action","Real-time (automatic)"),
QT_TRANSLATE_NOOP("action","Perform the piece at a fixed tempo indicated by a metronome beat"),
0,
Icons::noteEntryRealtimeAuto_ICON,
Qt::WindowShortcut,
ShortcutFlags::A_CHECKABLE
},
{
MsWidget::MAIN_WINDOW,
STATE_NORMAL | STATE_NOTE_ENTRY,
"note-input-realtime-manual",
QT_TRANSLATE_NOOP("action","Real-time (manual)"),
QT_TRANSLATE_NOOP("action","Perform the piece while tapping a key or pedal to set the tempo"),
0,
Icons::noteEntryRealtimeManual_ICON,
Qt::WindowShortcut,
ShortcutFlags::A_CHECKABLE
},
{
MsWidget::MAIN_WINDOW,
STATE_NORMAL | STATE_NOTE_ENTRY,
Expand Down Expand Up @@ -2529,17 +2584,6 @@ Shortcut Shortcut::_sc[] = {
QT_TRANSLATE_NOOP("action","Configure Grid"),
QT_TRANSLATE_NOOP("action","Configure grid")
},
{
MsWidget::MAIN_WINDOW,
STATE_NOTE_ENTRY,
"repitch",
QT_TRANSLATE_NOOP("action","Re-Pitch Mode"),
QT_TRANSLATE_NOOP("action","Replace pitches without changing rhythms"),
0,
Icons::repitch_ICON,
Qt::ApplicationShortcut,
ShortcutFlags::A_CMD | ShortcutFlags::A_CHECKABLE
},
{
MsWidget::MAIN_WINDOW,
STATE_NORMAL | STATE_NOTE_ENTRY | STATE_PLAY | STATE_FOTO | STATE_EDIT,
Expand Down

0 comments on commit a6bba9d

Please sign in to comment.