Mercurial > hg > tony
diff src/MainWindow.cpp @ 143:b5e46f9bceb8
Add select-all / clear-selection
author | Chris Cannam |
---|---|
date | Fri, 10 Jan 2014 15:27:11 +0000 |
parents | edff2113260c |
children | c21b87a62ce6 |
line wrap: on
line diff
--- 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()));