Mercurial > hg > tony
comparison 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 |
comparison
equal
deleted
inserted
replaced
142:edff2113260c | 143:b5e46f9bceb8 |
---|---|
391 m_keyReference->registerShortcut(action); | 391 m_keyReference->registerShortcut(action); |
392 */ | 392 */ |
393 | 393 |
394 menu->addSeparator(); | 394 menu->addSeparator(); |
395 | 395 |
396 //!!! shortcuts, status tip etc | 396 m_keyReference->setCategory(tr("Selection")); |
397 | |
398 action = new QAction(tr("Select &All"), this); | |
399 action->setShortcut(tr("Ctrl+A")); | |
400 action->setStatusTip(tr("Select the whole duration of the current session")); | |
401 connect(action, SIGNAL(triggered()), this, SLOT(selectAll())); | |
402 connect(this, SIGNAL(canSelect(bool)), action, SLOT(setEnabled(bool))); | |
403 m_keyReference->registerShortcut(action); | |
404 menu->addAction(action); | |
405 m_rightButtonMenu->addAction(action); | |
406 | |
407 action = new QAction(tr("C&lear Selection"), this); | |
408 action->setShortcut(tr("Esc")); | |
409 action->setStatusTip(tr("Clear the selection")); | |
410 connect(action, SIGNAL(triggered()), this, SLOT(clearSelection())); | |
411 connect(this, SIGNAL(canClearSelection(bool)), action, SLOT(setEnabled(bool))); | |
412 m_keyReference->registerShortcut(action); | |
413 menu->addAction(action); | |
414 m_rightButtonMenu->addAction(action); | |
415 | |
416 menu->addSeparator(); | |
417 | |
418 //!!! shortcuts, status tip, key reference etc | |
397 action = new QAction(tr("Octave Shift Up"), this); | 419 action = new QAction(tr("Octave Shift Up"), this); |
398 action->setShortcut(tr("PgUp")); | 420 action->setShortcut(tr("PgUp")); |
399 connect(action, SIGNAL(triggered()), this, SLOT(octaveShiftUp())); | 421 connect(action, SIGNAL(triggered()), this, SLOT(octaveShiftUp())); |
400 connect(this, SIGNAL(canClearSelection(bool)), action, SLOT(setEnabled(bool))); | 422 connect(this, SIGNAL(canClearSelection(bool)), action, SLOT(setEnabled(bool))); |
401 menu->addAction(action); | 423 menu->addAction(action); |