# HG changeset patch # User mathieub # Date 1314097557 -3600 # Node ID 8c410ad4aa97d19bfa2c35fc99f62f7a645d3502 # Parent 5e8b3ca147e4db7c549d4d9f64f43361f8629d3e# Parent 5117d7cf59ec6e04203042998e084030f34c1196 Merge from the default branch diff -r 5117d7cf59ec -r 8c410ad4aa97 base/AudioPlaySource.h --- a/base/AudioPlaySource.h Wed Aug 17 22:14:52 2011 +0100 +++ b/base/AudioPlaySource.h Tue Aug 23 12:05:57 2011 +0100 @@ -96,6 +96,11 @@ */ virtual void setAuditioningEffect(Auditionable *) = 0; + /** + * Request spontaneous playback of a single short note of the + * given pitch. + */ + virtual void queueExampleNote(int midiPitch) = 0; }; #endif diff -r 5117d7cf59ec -r 8c410ad4aa97 base/Preferences.cpp --- a/base/Preferences.cpp Wed Aug 17 22:14:52 2011 +0100 +++ b/base/Preferences.cpp Tue Aug 23 12:05:57 2011 +0100 @@ -47,7 +47,8 @@ m_viewFontSize(10), m_backgroundMode(BackgroundFromTheme), m_timeToTextMode(TimeToTextMs), - m_showSplash(true) + m_showSplash(true), + m_startInMiniMode(false) { QSettings settings; settings.beginGroup("Preferences"); @@ -68,6 +69,7 @@ (settings.value("time-to-text-mode", int(TimeToTextMs)).toInt()); m_viewFontSize = settings.value("view-font-size", 10).toInt(); m_showSplash = settings.value("show-splash", true).toBool(); + m_startInMiniMode = settings.value("start-in-mini-mode", false).toBool(); settings.endGroup(); settings.beginGroup("TempDirectory"); @@ -96,6 +98,7 @@ props.push_back("Time To Text Mode"); props.push_back("View Font Size"); props.push_back("Show Splash Screen"); + props.push_back("Start In Minimal Mode"); return props; } @@ -141,6 +144,9 @@ if (name == "Show Splash Screen") { return tr("Show splash screen on startup"); } + if (name == "Start In Minimal Mode") { + return tr("Start Sonic Visualiser in minimal mode"); + } return name; } @@ -187,6 +193,9 @@ if (name == "Show Splash Screen") { return ToggleProperty; } + if (name == "Start In Minimal Mode") { + return ToggleProperty; + } return InvalidProperty; } @@ -259,6 +268,10 @@ if (deflt) *deflt = 1; } + if (name == "Start In Minimal Mode") { + if (deflt) *deflt = 0; + } + return 0; } @@ -363,6 +376,8 @@ setViewFontSize(value); } else if (name == "Show Splash Screen") { setShowSplash(value ? true : false); + } else if (name == "Start In Minimal Mode") { + setStartInMiniMode(value ? true : false); } } @@ -553,4 +568,19 @@ emit propertyChanged("Show Splash Screen"); } } + +void +Preferences::setStartInMiniMode(bool show) +{ + if (m_startInMiniMode != show) { + + m_startInMiniMode = show; + + QSettings settings; + settings.beginGroup("Preferences"); + settings.setValue("start-in-mini-mode", show); + settings.endGroup(); + emit propertyChanged("Start Sonic Visualiser in minimal mode"); + } +} diff -r 5117d7cf59ec -r 8c410ad4aa97 base/Preferences.h --- a/base/Preferences.h Wed Aug 17 22:14:52 2011 +0100 +++ b/base/Preferences.h Tue Aug 23 12:05:57 2011 +0100 @@ -88,6 +88,8 @@ bool getShowSplash() const { return m_showSplash; } + bool getStartInMiniMode() const { return m_startInMiniMode; } + public slots: virtual void setProperty(const PropertyName &, int); @@ -105,6 +107,8 @@ void setViewFontSize(int size); void setShowSplash(bool); + void setStartInMiniMode(bool); + private: Preferences(); // may throw DirectoryCreationFailed virtual ~Preferences(); @@ -124,6 +128,8 @@ BackgroundMode m_backgroundMode; TimeToTextMode m_timeToTextMode; bool m_showSplash; + + bool m_startInMiniMode; }; #endif