# HG changeset patch # User Chris Cannam # Date 1399652150 -3600 # Node ID d1c5444be23dc453b66c9fc28da76834f10d4226 # Parent 2f829a62fe559002753d1f771cbe11bc9779856a# Parent 0db5796a41da2d3a650cfe8dc4113b01618d3f1a Merge from default branch diff -r 2f829a62fe55 -r d1c5444be23d .hgsubstate --- 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 diff -r 2f829a62fe55 -r d1c5444be23d main/MainWindow.cpp --- 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); diff -r 2f829a62fe55 -r d1c5444be23d main/PreferencesDialog.cpp --- 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 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 devices = AudioTargetFactory::getInstance()->getCallbackTargetNames(); diff -r 2f829a62fe55 -r d1c5444be23d main/PreferencesDialog.h --- 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; diff -r 2f829a62fe55 -r d1c5444be23d sonic-visualiser.pro --- 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 diff -r 2f829a62fe55 -r d1c5444be23d templates/default.svt --- 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 @@ - - + +