diff options
author | Tim E. Real <termtech@rogers.com> | 2010-12-05 04:34:35 +0000 |
---|---|---|
committer | Tim E. Real <termtech@rogers.com> | 2010-12-05 04:34:35 +0000 |
commit | 3a911929ba263a23eba0c343a4f7b343e7aa9af6 (patch) | |
tree | 588260d0fe9b7147d2a8c358ad0a9f40fa80bb66 /muse2/muse/app.cpp | |
parent | 94ded795771b0e2aeb33147056036ea5b4cce0d0 (diff) |
Some work on shortcuts. See ChangeLog.
Diffstat (limited to 'muse2/muse/app.cpp')
-rw-r--r-- | muse2/muse/app.cpp | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/muse2/muse/app.cpp b/muse2/muse/app.cpp index e589e855..91ede963 100644 --- a/muse2/muse/app.cpp +++ b/muse2/muse/app.cpp @@ -1278,7 +1278,7 @@ MusE::MusE(int argc, char** argv) : QMainWindow() // Miscellaneous shortcuts //-------------------------------------------------- - QShortcut* sc = new QShortcut(Qt::Key_Delete, this); + QShortcut* sc = new QShortcut(shortcuts[SHRT_DELETE].key, this); sc->setContext(Qt::WindowShortcut); connect(sc, SIGNAL(activated()), editSignalMapper, SLOT(map())); editSignalMapper->setMapping(sc, CMD_DELETE); @@ -3552,13 +3552,16 @@ class MuseApplication : public QApplication { if (!accepted) { int key = ke->key(); ///if (ke->state() & Qt::ShiftModifier) - if (globalKeyState & Qt::ShiftModifier) + //if (globalKeyState & Qt::ShiftModifier) + if (((QInputEvent*)ke)->modifiers() & Qt::ShiftModifier) key += Qt::SHIFT; ///if (ke->state() & Qt::AltModifier) - if (globalKeyState & Qt::AltModifier) + //if (globalKeyState & Qt::AltModifier) + if (((QInputEvent*)ke)->modifiers() & Qt::AltModifier) key += Qt::ALT; ///if (ke->state() & Qt::ControlModifier) - if (globalKeyState & Qt::ControlModifier) + //if (globalKeyState & Qt::ControlModifier) + if (((QInputEvent*)ke)->modifiers() & Qt::ControlModifier) key+= Qt::CTRL; muse->kbAccel(key); return true; @@ -5016,17 +5019,17 @@ void MusE::updateConfiguration() //menu_file->setShortcut(shortcuts[SHRT_LOAD_TEMPLATE].key, menu_ids[CMD_LOAD_TEMPLATE]); // Not used. - undoAction->setShortcut(Qt::CTRL+Qt::Key_Z); - redoAction->setShortcut(Qt::CTRL+Qt::Key_Y); - - editCutAction->setShortcut(Qt::CTRL+Qt::Key_X); - editCopyAction->setShortcut(Qt::CTRL+Qt::Key_C); - editPasteAction->setShortcut(Qt::CTRL+Qt::Key_V); - editInsertAction->setShortcut(Qt::CTRL+Qt::SHIFT+Qt::Key_I); - editPasteCloneAction->setShortcut(Qt::CTRL+Qt::SHIFT+Qt::Key_V); - editPaste2TrackAction->setShortcut(Qt::CTRL+Qt::Key_B); - editPasteC2TAction->setShortcut(Qt::CTRL+Qt::SHIFT+Qt::Key_B); - editInsertEMAction->setShortcut(Qt::CTRL+Qt::SHIFT+Qt::Key_X); + undoAction->setShortcut(shortcuts[SHRT_UNDO].key); + redoAction->setShortcut(shortcuts[SHRT_REDO].key); + + editCutAction->setShortcut(shortcuts[SHRT_CUT].key); + editCopyAction->setShortcut(shortcuts[SHRT_COPY].key); + editPasteAction->setShortcut(shortcuts[SHRT_PASTE].key); + editInsertAction->setShortcut(shortcuts[SHRT_INSERT].key); + editPasteCloneAction->setShortcut(shortcuts[SHRT_PASTE_CLONE].key); + editPaste2TrackAction->setShortcut(shortcuts[SHRT_PASTE_TO_TRACK].key); + editPasteC2TAction->setShortcut(shortcuts[SHRT_PASTE_CLONE_TO_TRACK].key); + editInsertEMAction->setShortcut(shortcuts[SHRT_INSERTMEAS].key); //editDeleteSelectedAction has no acceleration |