Mercurial > hg > tony
comparison src/MainWindow.cpp @ 392:836afacacd92
Back out earlier experimental switch to select tool for default
author | Chris Cannam |
---|---|
date | Mon, 10 Nov 2014 14:41:00 +0000 |
parents | 54676e2449b8 |
children | bed6493c3042 |
comparison
equal
deleted
inserted
replaced
391:54676e2449b8 | 392:836afacacd92 |
---|---|
157 .arg(int(WaveformLayer::MixChannels))); | 157 .arg(int(WaveformLayer::MixChannels))); |
158 settings.endGroup(); | 158 settings.endGroup(); |
159 | 159 |
160 m_viewManager->setAlignMode(false); | 160 m_viewManager->setAlignMode(false); |
161 m_viewManager->setPlaySoloMode(false); | 161 m_viewManager->setPlaySoloMode(false); |
162 m_viewManager->setToolMode(ViewManager::SelectMode); | 162 m_viewManager->setToolMode(ViewManager::NavigateMode); |
163 m_viewManager->setZoomWheelsEnabled(false); | 163 m_viewManager->setZoomWheelsEnabled(false); |
164 m_viewManager->setIlluminateLocalFeatures(true); | 164 m_viewManager->setIlluminateLocalFeatures(true); |
165 m_viewManager->setShowWorkTitle(false); | 165 m_viewManager->setShowWorkTitle(false); |
166 m_viewManager->setShowCentreLine(false); | 166 m_viewManager->setShowCentreLine(false); |
167 m_viewManager->setShowDuration(false); | 167 m_viewManager->setShowDuration(false); |
578 QActionGroup *group = new QActionGroup(this); | 578 QActionGroup *group = new QActionGroup(this); |
579 | 579 |
580 IconLoader il; | 580 IconLoader il; |
581 | 581 |
582 m_keyReference->setCategory(tr("Tool Selection")); | 582 m_keyReference->setCategory(tr("Tool Selection")); |
583 | |
584 QAction *action = toolbar->addAction(il.load("select"), | |
585 tr("Select")); | |
586 action->setCheckable(true); | |
587 action->setChecked(true); | |
588 action->setShortcut(tr("1")); | |
589 action->setStatusTip(tr("Select")); | |
590 connect(action, SIGNAL(triggered()), this, SLOT(toolSelectSelected())); | |
591 connect(this, SIGNAL(replacedDocument()), action, SLOT(trigger())); | |
592 group->addAction(action); | |
593 menu->addAction(action); | |
594 m_keyReference->registerShortcut(action); | |
595 | |
596 /* | |
597 QAction *action = toolbar->addAction(il.load("navigate"), | 583 QAction *action = toolbar->addAction(il.load("navigate"), |
598 tr("Navigate")); | 584 tr("Navigate")); |
599 action->setCheckable(true); | 585 action->setCheckable(true); |
600 action->setChecked(true); | 586 action->setChecked(true); |
601 action->setShortcut(tr("1")); | 587 action->setShortcut(tr("1")); |
615 (tr("Re-Analyse Area"), tr("Shift+Left"), | 601 (tr("Re-Analyse Area"), tr("Shift+Left"), |
616 tr("Shift-click left button and drag to define a specific pitch and time range to re-analyse")); | 602 tr("Shift-click left button and drag to define a specific pitch and time range to re-analyse")); |
617 m_keyReference->registerShortcut | 603 m_keyReference->registerShortcut |
618 (tr("Edit"), tr("Double-Click Left"), | 604 (tr("Edit"), tr("Double-Click Left"), |
619 tr("Double-click left button on an item to edit it")); | 605 tr("Double-click left button on an item to edit it")); |
620 */ | 606 |
621 m_keyReference->setCategory(tr("Tool Selection")); | 607 m_keyReference->setCategory(tr("Tool Selection")); |
622 action = toolbar->addAction(il.load("move"), | 608 action = toolbar->addAction(il.load("move"), |
623 tr("Edit")); | 609 tr("Edit")); |
624 action->setCheckable(true); | 610 action->setCheckable(true); |
625 action->setShortcut(tr("2")); | 611 action->setShortcut(tr("2")); |
1352 | 1338 |
1353 void | 1339 void |
1354 MainWindow::toolNavigateSelected() | 1340 MainWindow::toolNavigateSelected() |
1355 { | 1341 { |
1356 m_viewManager->setToolMode(ViewManager::NavigateMode); | 1342 m_viewManager->setToolMode(ViewManager::NavigateMode); |
1357 m_intelligentActionOn = true; | |
1358 } | |
1359 | |
1360 void | |
1361 MainWindow::toolSelectSelected() | |
1362 { | |
1363 m_viewManager->setToolMode(ViewManager::SelectMode); | |
1364 m_intelligentActionOn = true; | 1343 m_intelligentActionOn = true; |
1365 } | 1344 } |
1366 | 1345 |
1367 void | 1346 void |
1368 MainWindow::toolEditSelected() | 1347 MainWindow::toolEditSelected() |