diff src/MainWindow.cpp @ 250:e9a0b3fad713

Remove tool-specific keyboard shortcut reference registration from Pane and put it in MainWindow (as it depends on which tools are in use)
author Chris Cannam
date Wed, 02 Apr 2014 09:01:56 +0100
parents 852ee50c0de5
children 3b5ea600829c
line wrap: on
line diff
--- a/src/MainWindow.cpp	Wed Apr 02 08:33:40 2014 +0100
+++ b/src/MainWindow.cpp	Wed Apr 02 09:01:56 2014 +0100
@@ -493,12 +493,11 @@
     
     CommandHistory::getInstance()->registerToolbar(toolbar);
 
+    QActionGroup *group = new QActionGroup(this);
+
+    IconLoader il;
+
     m_keyReference->setCategory(tr("Tool Selection"));
-
-    QActionGroup *group = new QActionGroup(this);
-
-    IconLoader il;
-
     QAction *action = toolbar->addAction(il.load("navigate"),
                                          tr("Navigate"));
     action->setCheckable(true);
@@ -511,6 +510,19 @@
     menu->addAction(action);
     m_keyReference->registerShortcut(action);
 
+    m_keyReference->setCategory
+        (tr("Navigate Tool Mouse Actions"));
+    m_keyReference->registerShortcut
+        (tr("Navigate"), tr("Left"), 
+         tr("Click left button and drag to move around"));
+    m_keyReference->registerShortcut
+        (tr("Re-Analyse Area"), tr("Shift+Left"), 
+         tr("Shift-click left button and drag to define a specific pitch and time range to re-analyse"));
+    m_keyReference->registerShortcut
+        (tr("Edit"), tr("Double-Click Left"), 
+         tr("Double-click left button on an item to edit it"));
+
+    m_keyReference->setCategory(tr("Tool Selection"));
     action = toolbar->addAction(il.load("move"),
 				tr("Edit"));
     action->setCheckable(true);
@@ -522,8 +534,25 @@
     menu->addAction(action);
     m_keyReference->registerShortcut(action);
 
+    m_keyReference->setCategory
+        (tr("Note Edit Tool Mouse Actions"));
+    m_keyReference->registerShortcut
+        (tr("Adjust Pitch"), tr("Left"), 
+        tr("Click left button on the main part of a note and drag to move it up or down"));
+    m_keyReference->registerShortcut
+        (tr("Split"), tr("Left"), 
+        tr("Click left button on the bottom edge of a note to split it at the click point"));
+    m_keyReference->registerShortcut
+        (tr("Resize"), tr("Left"), 
+        tr("Click left button on the left or right edge of a note and drag to change the time or duration of the note"));
+    m_keyReference->registerShortcut
+        (tr("Erase"), tr("Shift+Left"), 
+        tr("Shift-click left button on a note to remove it"));
+
+
 /* Remove for now...
 
+    m_keyReference->setCategory(tr("Tool Selection"));
     action = toolbar->addAction(il.load("notes"),
 				tr("Free Edit"));
     action->setCheckable(true);