Mercurial > hg > tony
comparison src/MainWindow.cpp @ 419:dfde9c7637cd
Fixes to enabled/disabled state in level-pan tool button
author | Chris Cannam |
---|---|
date | Wed, 25 Mar 2015 11:41:17 +0000 |
parents | 912a7212e0cf |
children | abf3af4fc20b |
comparison
equal
deleted
inserted
replaced
418:f041a5a66b35 | 419:dfde9c7637cd |
---|---|
1073 m_showAudio = toolbar->addAction(il.load("waveform"), tr("Show Audio")); | 1073 m_showAudio = toolbar->addAction(il.load("waveform"), tr("Show Audio")); |
1074 m_showAudio->setCheckable(true); | 1074 m_showAudio->setCheckable(true); |
1075 connect(m_showAudio, SIGNAL(triggered()), this, SLOT(showAudioToggled())); | 1075 connect(m_showAudio, SIGNAL(triggered()), this, SLOT(showAudioToggled())); |
1076 connect(this, SIGNAL(canPlay(bool)), m_showAudio, SLOT(setEnabled(bool))); | 1076 connect(this, SIGNAL(canPlay(bool)), m_showAudio, SLOT(setEnabled(bool))); |
1077 | 1077 |
1078 m_audioLPW->setImageSize(m_viewManager->scalePixelSize(26)); | |
1078 toolbar->addWidget(m_audioLPW); | 1079 toolbar->addWidget(m_audioLPW); |
1079 | 1080 |
1080 // Pitch (f0) | 1081 // Pitch (f0) |
1081 QLabel *spacer = new QLabel; // blank | 1082 QLabel *spacer = new QLabel; // blank |
1082 spacer->setFixedWidth(40); | 1083 spacer->setFixedWidth(m_viewManager->scalePixelSize(30)); |
1083 toolbar->addWidget(spacer); | 1084 toolbar->addWidget(spacer); |
1084 | 1085 |
1085 m_showPitch = toolbar->addAction(il.load("values"), tr("Show Pitch Track")); | 1086 m_showPitch = toolbar->addAction(il.load("values"), tr("Show Pitch Track")); |
1086 m_showPitch->setCheckable(true); | 1087 m_showPitch->setCheckable(true); |
1087 connect(m_showPitch, SIGNAL(triggered()), this, SLOT(showPitchToggled())); | 1088 connect(m_showPitch, SIGNAL(triggered()), this, SLOT(showPitchToggled())); |
1088 connect(this, SIGNAL(canPlay(bool)), m_showPitch, SLOT(setEnabled(bool))); | 1089 connect(this, SIGNAL(canPlay(bool)), m_showPitch, SLOT(setEnabled(bool))); |
1089 | 1090 |
1090 if (m_withSonification) { | 1091 if (m_withSonification) { |
1092 m_pitchLPW->setImageSize(m_viewManager->scalePixelSize(26)); | |
1091 toolbar->addWidget(m_pitchLPW); | 1093 toolbar->addWidget(m_pitchLPW); |
1092 } | 1094 } |
1093 | 1095 |
1094 // Notes | 1096 // Notes |
1095 spacer = new QLabel; | 1097 spacer = new QLabel; |
1096 spacer->setFixedWidth(40); | 1098 spacer->setFixedWidth(m_viewManager->scalePixelSize(30)); |
1097 toolbar->addWidget(spacer); | 1099 toolbar->addWidget(spacer); |
1098 | 1100 |
1099 m_showNotes = toolbar->addAction(il.load("notes"), tr("Show Notes")); | 1101 m_showNotes = toolbar->addAction(il.load("notes"), tr("Show Notes")); |
1100 m_showNotes->setCheckable(true); | 1102 m_showNotes->setCheckable(true); |
1101 connect(m_showNotes, SIGNAL(triggered()), this, SLOT(showNotesToggled())); | 1103 connect(m_showNotes, SIGNAL(triggered()), this, SLOT(showNotesToggled())); |
1102 connect(this, SIGNAL(canPlay(bool)), m_showNotes, SLOT(setEnabled(bool))); | 1104 connect(this, SIGNAL(canPlay(bool)), m_showNotes, SLOT(setEnabled(bool))); |
1103 | 1105 |
1104 if (m_withSonification) { | 1106 if (m_withSonification) { |
1107 m_notesLPW->setImageSize(m_viewManager->scalePixelSize(26)); | |
1105 toolbar->addWidget(m_notesLPW); | 1108 toolbar->addWidget(m_notesLPW); |
1106 } | 1109 } |
1107 | 1110 |
1108 // Spectrogram | 1111 // Spectrogram |
1109 spacer = new QLabel; | 1112 spacer = new QLabel; |
1110 spacer->setFixedWidth(40); | 1113 spacer->setFixedWidth(m_viewManager->scalePixelSize(30)); |
1111 toolbar->addWidget(spacer); | 1114 toolbar->addWidget(spacer); |
1112 | 1115 |
1113 if (!m_withSpectrogram) | 1116 if (!m_withSpectrogram) |
1114 { | 1117 { |
1115 m_showSpect = new QAction(tr("Show Spectrogram"), this); | 1118 m_showSpect = new QAction(tr("Show Spectrogram"), this); |
2846 if (!m_withSonification) | 2849 if (!m_withSonification) |
2847 { | 2850 { |
2848 m_analyser->setAudible(Analyser::PitchTrack, false); | 2851 m_analyser->setAudible(Analyser::PitchTrack, false); |
2849 m_analyser->setAudible(Analyser::Notes, false); | 2852 m_analyser->setAudible(Analyser::Notes, false); |
2850 } | 2853 } |
2854 | |
2855 updateLayerStatuses(); | |
2851 } | 2856 } |
2852 | 2857 |
2853 void | 2858 void |
2854 MainWindow::modelGenerationFailed(QString transformName, QString message) | 2859 MainWindow::modelGenerationFailed(QString transformName, QString message) |
2855 { | 2860 { |