# HG changeset patch # User Justin Salamon # Date 1390428480 18000 # Node ID 8571ad52349a72cf176b8230a422869caf7e6305 # Parent 3a4bb7e3c582008cbf405f5f53edaf8adfb3a2ba rearragned son/viz controls diff -r 3a4bb7e3c582 -r 8571ad52349a src/MainWindow.cpp --- a/src/MainWindow.cpp Fri Jan 17 11:59:49 2014 -0500 +++ b/src/MainWindow.cpp Wed Jan 22 17:08:00 2014 -0500 @@ -705,6 +705,7 @@ toolbar = addToolBar(tr("Show and Play")); + /* ORIGINAL DESIGN QLabel *eye = new QLabel; eye->setFixedWidth(40); eye->setAlignment(Qt::AlignRight | Qt::AlignVCenter); @@ -751,6 +752,72 @@ m_playNotes->setCheckable(true); connect(m_playNotes, SIGNAL(triggered()), this, SLOT(playNotesToggled())); connect(this, SIGNAL(canPlay(bool)), m_playNotes, SLOT(setEnabled(bool))); + */ + + // Audio + QLabel *icon_audio = new QLabel; + icon_audio->setFixedWidth(40); + icon_audio->setAlignment(Qt::AlignRight | Qt::AlignVCenter); + icon_audio->setPixmap(il.loadPixmap("waveform")); + toolbar->addWidget(icon_audio); + + m_showAudio = toolbar->addAction(il.load("eye"), tr("Show Audio")); + m_showAudio->setCheckable(true); + connect(m_showAudio, SIGNAL(triggered()), this, SLOT(showAudioToggled())); + connect(this, SIGNAL(canPlay(bool)), m_showAudio, SLOT(setEnabled(bool))); + + m_playAudio = toolbar->addAction(il.load("speaker"), tr("Play Audio")); + m_playAudio->setCheckable(true); + connect(m_playAudio, SIGNAL(triggered()), this, SLOT(playAudioToggled())); + connect(this, SIGNAL(canPlay(bool)), m_playAudio, SLOT(setEnabled(bool))); + + // Pitch (f0) + QLabel *icon_pitch = new QLabel; + icon_pitch->setFixedWidth(40); + icon_pitch->setAlignment(Qt::AlignRight | Qt::AlignVCenter); + icon_pitch->setPixmap(il.loadPixmap("values")); + toolbar->addWidget(icon_pitch); + + m_showPitch = toolbar->addAction(il.load("eye"), tr("Show Pitch Track")); + m_showPitch->setCheckable(true); + connect(m_showPitch, SIGNAL(triggered()), this, SLOT(showPitchToggled())); + connect(this, SIGNAL(canPlay(bool)), m_showPitch, SLOT(setEnabled(bool))); + + m_playPitch = toolbar->addAction(il.load("speaker"), tr("Play Pitch Track")); + m_playPitch->setCheckable(true); + connect(m_playPitch, SIGNAL(triggered()), this, SLOT(playPitchToggled())); + connect(this, SIGNAL(canPlay(bool)), m_playPitch, SLOT(setEnabled(bool))); + + //toolbar->addWidget(m_volumePitch); + + // Notes + QLabel *icon_notes = new QLabel; + icon_notes->setFixedWidth(40); + icon_notes->setAlignment(Qt::AlignRight | Qt::AlignVCenter); + icon_notes->setPixmap(il.loadPixmap("notes")); + toolbar->addWidget(icon_notes); + + m_showNotes = toolbar->addAction(il.load("eye"), tr("Show Notes")); + m_showNotes->setCheckable(true); + connect(m_showNotes, SIGNAL(triggered()), this, SLOT(showNotesToggled())); + connect(this, SIGNAL(canPlay(bool)), m_showNotes, SLOT(setEnabled(bool))); + + m_playNotes = toolbar->addAction(il.load("speaker"), tr("Play Notes")); + m_playNotes->setCheckable(true); + connect(m_playNotes, SIGNAL(triggered()), this, SLOT(playNotesToggled())); + connect(this, SIGNAL(canPlay(bool)), m_playNotes, SLOT(setEnabled(bool))); + + // Spectrogram + QLabel *icon_spectrogram = new QLabel; + icon_spectrogram->setFixedWidth(40); + icon_spectrogram->setAlignment(Qt::AlignRight | Qt::AlignVCenter); + icon_spectrogram->setPixmap(il.loadPixmap("spectrogram")); + toolbar->addWidget(icon_spectrogram); + + m_showSpect = toolbar->addAction(il.load("eye"), tr("Show Spectrogram")); + m_showSpect->setCheckable(true); + connect(m_showSpect, SIGNAL(triggered()), this, SLOT(showSpectToggled())); + connect(this, SIGNAL(canPlay(bool)), m_showSpect, SLOT(setEnabled(bool))); Pane::registerShortcuts(*m_keyReference); } diff -r 3a4bb7e3c582 -r 8571ad52349a src/MainWindow.h --- a/src/MainWindow.h Fri Jan 17 11:59:49 2014 -0500 +++ b/src/MainWindow.h Wed Jan 22 17:08:00 2014 -0500 @@ -149,6 +149,9 @@ QAction *m_playAudio; QAction *m_playPitch; QAction *m_playNotes; + //AudioDial *m_volumeAudio; + //AudioDial *m_volumePitch; + //AudioDial *m_volumeNotes; QLabel *m_waveformStatus; QLabel *m_pitchStatus;