# HG changeset patch # User Chris Cannam # Date 1389367631 0 # Node ID b5e46f9bceb80f9894b7e4fd079c5ff11adc5011 # Parent edff2113260c8c339fc1ff431c193aee262eac0e Add select-all / clear-selection diff -r edff2113260c -r b5e46f9bceb8 src/MainWindow.cpp --- a/src/MainWindow.cpp Fri Jan 10 15:21:13 2014 +0000 +++ b/src/MainWindow.cpp Fri Jan 10 15:27:11 2014 +0000 @@ -393,7 +393,29 @@ menu->addSeparator(); - //!!! shortcuts, status tip etc + m_keyReference->setCategory(tr("Selection")); + + action = new QAction(tr("Select &All"), this); + action->setShortcut(tr("Ctrl+A")); + action->setStatusTip(tr("Select the whole duration of the current session")); + connect(action, SIGNAL(triggered()), this, SLOT(selectAll())); + connect(this, SIGNAL(canSelect(bool)), action, SLOT(setEnabled(bool))); + m_keyReference->registerShortcut(action); + menu->addAction(action); + m_rightButtonMenu->addAction(action); + + action = new QAction(tr("C&lear Selection"), this); + action->setShortcut(tr("Esc")); + action->setStatusTip(tr("Clear the selection")); + connect(action, SIGNAL(triggered()), this, SLOT(clearSelection())); + connect(this, SIGNAL(canClearSelection(bool)), action, SLOT(setEnabled(bool))); + m_keyReference->registerShortcut(action); + menu->addAction(action); + m_rightButtonMenu->addAction(action); + + menu->addSeparator(); + + //!!! shortcuts, status tip, key reference etc action = new QAction(tr("Octave Shift Up"), this); action->setShortcut(tr("PgUp")); connect(action, SIGNAL(triggered()), this, SLOT(octaveShiftUp()));