Mercurial > hg > tony
comparison src/MainWindow.cpp @ 189:e963bdbc0707
Add status tips, add actions to key reference etc
author | Chris Cannam |
---|---|
date | Tue, 04 Mar 2014 16:32:08 +0000 |
parents | b970b39e1fab |
children | add7468a7ca1 |
comparison
equal
deleted
inserted
replaced
188:b970b39e1fab | 189:e963bdbc0707 |
---|---|
532 m_keyReference->registerShortcut(action); | 532 m_keyReference->registerShortcut(action); |
533 menu->addAction(action); | 533 menu->addAction(action); |
534 m_rightButtonMenu->addAction(action); | 534 m_rightButtonMenu->addAction(action); |
535 | 535 |
536 menu->addSeparator(); | 536 menu->addSeparator(); |
537 m_rightButtonMenu->addSeparator(); | |
537 | 538 |
538 //!!! shortcuts, status tip, key reference etc | 539 m_keyReference->setCategory(tr("Pitch Track")); |
540 | |
539 m_showCandidatesAction = new QAction(tr("Show Pitch Candidates"), this); | 541 m_showCandidatesAction = new QAction(tr("Show Pitch Candidates"), this); |
540 m_showCandidatesAction->setShortcut(tr("Ctrl+Return")); | 542 m_showCandidatesAction->setShortcut(tr("Ctrl+Return")); |
543 m_showCandidatesAction->setStatusTip(tr("Toggle the display of alternative pitch candidates for the selected region")); | |
544 m_keyReference->registerShortcut(m_showCandidatesAction); | |
541 connect(m_showCandidatesAction, SIGNAL(triggered()), this, SLOT(togglePitchCandidates())); | 545 connect(m_showCandidatesAction, SIGNAL(triggered()), this, SLOT(togglePitchCandidates())); |
542 connect(this, SIGNAL(canClearSelection(bool)), m_showCandidatesAction, SLOT(setEnabled(bool))); | 546 connect(this, SIGNAL(canClearSelection(bool)), m_showCandidatesAction, SLOT(setEnabled(bool))); |
543 menu->addAction(m_showCandidatesAction); | 547 menu->addAction(m_showCandidatesAction); |
548 m_rightButtonMenu->addAction(m_showCandidatesAction); | |
544 | 549 |
545 //!!! shortcuts, status tip, key reference etc | |
546 action = new QAction(tr("Pick Higher Pitch Candidate"), this); | 550 action = new QAction(tr("Pick Higher Pitch Candidate"), this); |
547 action->setShortcut(tr("Ctrl+Up")); | 551 action->setShortcut(tr("Ctrl+Up")); |
552 action->setStatusTip(tr("Switch to the next higher pitch candidate in the selected region")); | |
553 m_keyReference->registerShortcut(action); | |
548 connect(action, SIGNAL(triggered()), this, SLOT(switchPitchUp())); | 554 connect(action, SIGNAL(triggered()), this, SLOT(switchPitchUp())); |
549 connect(this, SIGNAL(canChangePitchCandidate(bool)), action, SLOT(setEnabled(bool))); | 555 connect(this, SIGNAL(canChangePitchCandidate(bool)), action, SLOT(setEnabled(bool))); |
550 menu->addAction(action); | 556 menu->addAction(action); |
557 m_rightButtonMenu->addAction(action); | |
551 | 558 |
552 //!!! shortcuts, status tip, key reference etc | |
553 action = new QAction(tr("Pick Lower Pitch Candidate"), this); | 559 action = new QAction(tr("Pick Lower Pitch Candidate"), this); |
554 action->setShortcut(tr("Ctrl+Down")); | 560 action->setShortcut(tr("Ctrl+Down")); |
561 action->setStatusTip(tr("Switch to the next lower pitch candidate in the selected region")); | |
562 m_keyReference->registerShortcut(action); | |
555 connect(action, SIGNAL(triggered()), this, SLOT(switchPitchDown())); | 563 connect(action, SIGNAL(triggered()), this, SLOT(switchPitchDown())); |
556 connect(this, SIGNAL(canChangePitchCandidate(bool)), action, SLOT(setEnabled(bool))); | 564 connect(this, SIGNAL(canChangePitchCandidate(bool)), action, SLOT(setEnabled(bool))); |
557 menu->addAction(action); | 565 menu->addAction(action); |
566 m_rightButtonMenu->addAction(action); | |
558 | 567 |
559 menu->addSeparator(); | 568 menu->addSeparator(); |
569 m_rightButtonMenu->addSeparator(); | |
560 | 570 |
561 //!!! shortcuts, status tip, key reference etc | |
562 action = new QAction(tr("Octave Shift Up"), this); | 571 action = new QAction(tr("Octave Shift Up"), this); |
563 action->setShortcut(tr("PgUp")); | 572 action->setShortcut(tr("PgUp")); |
573 action->setStatusTip(tr("Move all pitches up an octave in the selected region")); | |
574 m_keyReference->registerShortcut(action); | |
564 connect(action, SIGNAL(triggered()), this, SLOT(octaveShiftUp())); | 575 connect(action, SIGNAL(triggered()), this, SLOT(octaveShiftUp())); |
565 connect(this, SIGNAL(canClearSelection(bool)), action, SLOT(setEnabled(bool))); | 576 connect(this, SIGNAL(canClearSelection(bool)), action, SLOT(setEnabled(bool))); |
566 menu->addAction(action); | 577 menu->addAction(action); |
578 m_rightButtonMenu->addAction(action); | |
567 | 579 |
568 action = new QAction(tr("Octave Shift Down"), this); | 580 action = new QAction(tr("Octave Shift Down"), this); |
569 action->setShortcut(tr("PgDown")); | 581 action->setShortcut(tr("PgDown")); |
582 action->setStatusTip(tr("Move all pitches down an octave in the selected region")); | |
583 m_keyReference->registerShortcut(action); | |
570 connect(action, SIGNAL(triggered()), this, SLOT(octaveShiftDown())); | 584 connect(action, SIGNAL(triggered()), this, SLOT(octaveShiftDown())); |
571 connect(this, SIGNAL(canClearSelection(bool)), action, SLOT(setEnabled(bool))); | 585 connect(this, SIGNAL(canClearSelection(bool)), action, SLOT(setEnabled(bool))); |
572 menu->addAction(action); | 586 menu->addAction(action); |
587 m_rightButtonMenu->addAction(action); | |
573 | 588 |
574 menu->addSeparator(); | 589 menu->addSeparator(); |
590 m_rightButtonMenu->addSeparator(); | |
575 | 591 |
576 //!!! shortcuts, status tip, key reference etc | |
577 action = new QAction(tr("Remove Pitches"), this); | 592 action = new QAction(tr("Remove Pitches"), this); |
578 action->setShortcut(tr("Ctrl+Backspace")); | 593 action->setShortcut(tr("Ctrl+Backspace")); |
594 action->setStatusTip(tr("Remove all pitch estimates within the selected region (converting it to unvoiced)")); | |
595 m_keyReference->registerShortcut(action); | |
579 connect(action, SIGNAL(triggered()), this, SLOT(clearPitches())); | 596 connect(action, SIGNAL(triggered()), this, SLOT(clearPitches())); |
580 connect(this, SIGNAL(canClearSelection(bool)), action, SLOT(setEnabled(bool))); | 597 connect(this, SIGNAL(canClearSelection(bool)), action, SLOT(setEnabled(bool))); |
581 menu->addAction(action); | 598 menu->addAction(action); |
599 m_rightButtonMenu->addAction(action); | |
582 } | 600 } |
583 | 601 |
584 void | 602 void |
585 MainWindow::setupViewMenu() | 603 MainWindow::setupViewMenu() |
586 { | 604 { |