Mercurial > hg > sonic-visualiser
changeset 715:d1c5444be23d tony_integration
Merge from default branch
author | Chris Cannam |
---|---|
date | Fri, 09 May 2014 17:15:50 +0100 |
parents | 2f829a62fe55 (current diff) 0db5796a41da (diff) |
children | c63a27614970 |
files | .hgsubstate main/MainWindow.cpp |
diffstat | 6 files changed, 41 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/.hgsubstate Fri May 09 17:07:46 2014 +0100 +++ b/.hgsubstate Fri May 09 17:15:50 2014 +0100 @@ -2,4 +2,4 @@ 3c5adc4a864fa75e5b1e67c260b77541aaa4f1f6 sv-dependency-builds 8d7f39df44edefb923903325ea0e813004953d86 svapp c48b07b34cb329e28d342d777164f7eabbccbae5 svcore -336ccf8fc3f8dfbb8a3878cfb88266810f7726ae svgui +734ee80286c33f445b0584e077344a7e3862e1a2 svgui
--- a/main/MainWindow.cpp Fri May 09 17:07:46 2014 +0100 +++ b/main/MainWindow.cpp Fri May 09 17:15:50 2014 +0100 @@ -915,7 +915,7 @@ action->setStatusTip(tr("Show or hide the centre line")); connect(action, SIGNAL(triggered()), this, SLOT(toggleCentreLine())); action->setCheckable(true); - action->setChecked(true); + action->setChecked(m_viewManager->shouldShowCentreLine()); m_keyReference->registerShortcut(action); menu->addAction(action); @@ -930,12 +930,14 @@ QActionGroup *overlayGroup = new QActionGroup(this); + ViewManager::OverlayMode mode = m_viewManager->getOverlayMode(); + action = new QAction(tr("Show &No Overlays"), this); action->setShortcut(tr("0")); action->setStatusTip(tr("Hide times, layer names, and scale")); connect(action, SIGNAL(triggered()), this, SLOT(showNoOverlays())); action->setCheckable(true); - action->setChecked(false); + action->setChecked(mode == ViewManager::NoOverlays); overlayGroup->addAction(action); m_keyReference->registerShortcut(action); menu->addAction(action); @@ -945,7 +947,7 @@ action->setStatusTip(tr("Show times and basic scale")); connect(action, SIGNAL(triggered()), this, SLOT(showMinimalOverlays())); action->setCheckable(true); - action->setChecked(true); + action->setChecked(mode == ViewManager::StandardOverlays); overlayGroup->addAction(action); m_keyReference->registerShortcut(action); menu->addAction(action); @@ -955,7 +957,7 @@ action->setStatusTip(tr("Show times, layer names, and scale")); connect(action, SIGNAL(triggered()), this, SLOT(showAllOverlays())); action->setCheckable(true); - action->setChecked(false); + action->setChecked(mode == ViewManager::AllOverlays); overlayGroup->addAction(action); m_keyReference->registerShortcut(action); menu->addAction(action);
--- a/main/PreferencesDialog.cpp Fri May 09 17:07:46 2014 +0100 +++ b/main/PreferencesDialog.cpp Fri May 09 17:15:50 2014 +0100 @@ -122,6 +122,8 @@ connect(propertyLayout, SIGNAL(currentIndexChanged(int)), this, SLOT(propertyLayoutChanged(int))); + + m_tuningFrequency = prefs->getTuningFrequency(); QDoubleSpinBox *frequency = new QDoubleSpinBox; @@ -135,6 +137,19 @@ connect(frequency, SIGNAL(valueChanged(double)), this, SLOT(tuningFrequencyChanged(double))); + QComboBox *octaveSystem = new QComboBox; + int oct = prefs->getPropertyRangeAndValue + ("Octave Numbering System", &min, &max, &deflt); + m_octaveSystem = oct; + for (i = min; i <= max; ++i) { + octaveSystem->addItem(prefs->getPropertyValueLabel + ("Octave Numbering System", i)); + } + octaveSystem->setCurrentIndex(oct); + + connect(octaveSystem, SIGNAL(currentIndexChanged(int)), + this, SLOT(octaveSystemChanged(int))); + QComboBox *audioDevice = new QComboBox; std::vector<QString> devices = AudioTargetFactory::getInstance()->getCallbackTargetNames(); @@ -370,6 +385,11 @@ row, 0); subgrid->addWidget(frequency, row++, 1, 1, 2); + subgrid->addWidget(new QLabel(tr("%1:").arg(prefs->getPropertyLabel + ("Octave Numbering System"))), + row, 0); + subgrid->addWidget(octaveSystem, row++, 1, 1, 2); + subgrid->addWidget(new QLabel(prefs->getPropertyLabel ("Spectrogram Y Smoothing")), row, 0); @@ -589,6 +609,13 @@ } void +PreferencesDialog::octaveSystemChanged(int system) +{ + m_octaveSystem = system; + m_applyButton->setEnabled(true); +} + +void PreferencesDialog::viewFontSizeChanged(int sz) { m_viewFontSize = sz; @@ -622,6 +649,8 @@ prefs->setTimeToTextMode(Preferences::TimeToTextMode(m_timeToTextMode)); prefs->setViewFontSize(m_viewFontSize); + prefs->setProperty("Octave Numbering System", m_octaveSystem); + std::vector<QString> devices = AudioTargetFactory::getInstance()->getCallbackTargetNames();
--- a/main/PreferencesDialog.h Fri May 09 17:07:46 2014 +0100 +++ b/main/PreferencesDialog.h Fri May 09 17:15:50 2014 +0100 @@ -57,6 +57,7 @@ void tempDirRootChanged(QString root); void backgroundModeChanged(int mode); void timeToTextModeChanged(int mode); + void octaveSystemChanged(int system); void viewFontSizeChanged(int sz); void showSplashChanged(int state); void defaultTemplateChanged(int); @@ -96,6 +97,7 @@ QString m_tempDirRoot; int m_backgroundMode; int m_timeToTextMode; + int m_octaveSystem; int m_viewFontSize; bool m_showSplash;
--- a/sonic-visualiser.pro Fri May 09 17:07:46 2014 +0100 +++ b/sonic-visualiser.pro Fri May 09 17:15:50 2014 +0100 @@ -5,7 +5,7 @@ # We should build and run the tests on any platform, # but doing it automatically doesn't work so well from # within an IDE on Windows, so remove that from here - SUBDIRS += svcore/data/fileio/test + SUBDIRS += svcore/base/test svcore/data/fileio/test } sub_sv.file = sv.pro
--- a/templates/default.svt Fri May 09 17:07:46 2014 +0100 +++ b/templates/default.svt Fri May 09 17:15:50 2014 +0100 @@ -2,8 +2,8 @@ <!DOCTYPE sonic-visualiser> <sv> <data> - <layer id="1" type="timeruler" name="Ruler" model="0" colourName="Black" colour="#000000" darkBackground="false" /> - <layer id="2" type="waveform" name="Waveform" model="0" gain="1" showMeans="1" greyscale="1" channelMode="0" channel="-1" scale="0" aggressive="0" autoNormalize="0" colourName="Black" colour="#000000" darkBackground="false" /> + <layer id="1" type="timeruler" name="Ruler" model="0" /> + <layer id="2" type="waveform" name="Waveform" model="0" gain="1" showMeans="1" greyscale="1" channelMode="0" channel="-1" scale="0" aggressive="0" autoNormalize="0" /> </data> <display> <view centre="0" zoom="1024" followPan="1" followZoom="1" tracking="page" type="pane" centreLineVisible="1">