comparison src/MainWindow.cpp @ 224:445dcb9026a9

Fix for #892 (Cannot export pitch track)
author Chris Cannam
date Fri, 07 Mar 2014 16:27:10 +0000
parents 50122e9b817e
children 9bdff8d10a86
comparison
equal deleted inserted replaced
223:d323b5d41570 224:445dcb9026a9
444 menu->addAction(action); 444 menu->addAction(action);
445 445
446 action = new QAction(tr("Export Pitch Track Data..."), this); 446 action = new QAction(tr("Export Pitch Track Data..."), this);
447 action->setStatusTip(tr("Export pitch-track data to a file")); 447 action->setStatusTip(tr("Export pitch-track data to a file"));
448 connect(action, SIGNAL(triggered()), this, SLOT(exportPitchLayer())); 448 connect(action, SIGNAL(triggered()), this, SLOT(exportPitchLayer()));
449 connect(this, SIGNAL(canExportLayer(bool)), action, SLOT(setEnabled(bool))); 449 connect(this, SIGNAL(canExportPitchTrack(bool)), action, SLOT(setEnabled(bool)));
450 menu->addAction(action); 450 menu->addAction(action);
451 451
452 action = new QAction(tr("Export Note Data..."), this); 452 action = new QAction(tr("Export Note Data..."), this);
453 action->setStatusTip(tr("Export note data to a file")); 453 action->setStatusTip(tr("Export note data to a file"));
454 connect(action, SIGNAL(triggered()), this, SLOT(exportNoteLayer())); 454 connect(action, SIGNAL(triggered()), this, SLOT(exportNoteLayer()));
455 connect(this, SIGNAL(canExportLayer(bool)), action, SLOT(setEnabled(bool))); 455 connect(this, SIGNAL(canExportNotes(bool)), action, SLOT(setEnabled(bool)));
456 menu->addAction(action); 456 menu->addAction(action);
457 457
458 menu->addSeparator(); 458 menu->addSeparator();
459 action = new QAction(il.load("exit"), tr("&Quit"), this); 459 action = new QAction(il.load("exit"), tr("&Quit"), this);
460 action->setShortcut(tr("Ctrl+Q")); 460 action->setShortcut(tr("Ctrl+Q"));
1057 emit canChangePlaybackSpeed(true); 1057 emit canChangePlaybackSpeed(true);
1058 int v = m_playSpeed->value(); 1058 int v = m_playSpeed->value();
1059 emit canSpeedUpPlayback(v < m_playSpeed->maximum()); 1059 emit canSpeedUpPlayback(v < m_playSpeed->maximum());
1060 emit canSlowDownPlayback(v > m_playSpeed->minimum()); 1060 emit canSlowDownPlayback(v > m_playSpeed->minimum());
1061 1061
1062 emit canExportPitchTrack(m_analyser->isVisible(Analyser::PitchTrack) &&
1063 m_analyser->getLayer(Analyser::PitchTrack));
1064 emit canExportNotes(m_analyser->isVisible(Analyser::Notes) &&
1065 m_analyser->getLayer(Analyser::Notes));
1066
1062 if (pitchCandidatesVisible) { 1067 if (pitchCandidatesVisible) {
1063 m_showCandidatesAction->setText(tr("Hide Pitch Candidates")); 1068 m_showCandidatesAction->setText(tr("Hide Pitch Candidates"));
1064 m_showCandidatesAction->setStatusTip(tr("Remove the display of alternate pitch candidates for the selected region")); 1069 m_showCandidatesAction->setStatusTip(tr("Remove the display of alternate pitch candidates for the selected region"));
1065 } else { 1070 } else {
1066 m_showCandidatesAction->setText(tr("Show Pitch Candidates")); 1071 m_showCandidatesAction->setText(tr("Show Pitch Candidates"));