# HG changeset patch # User mathieub # Date 1311616588 -3600 # Node ID 5fa210337beef84ad8cd3388deca71b7aa765bc5 # Parent aaa3be825207c0e86e90b14b393906627940b439# Parent a13aa5320221b2e3f0ac3f80d62f4a03cf4e69a3 Merge from branch "sonification" diff -r a13aa5320221 -r 5fa210337bee view/ViewManager.cpp --- a/view/ViewManager.cpp Wed Jul 06 18:05:42 2011 +0100 +++ b/view/ViewManager.cpp Mon Jul 25 18:56:28 2011 +0100 @@ -48,7 +48,8 @@ m_illuminateLocalFeatures(true), m_showWorkTitle(false), m_lightPalette(QApplication::palette()), - m_darkPalette(QApplication::palette()) + m_darkPalette(QApplication::palette()), + m_minimalModeEnabled(0) { QSettings settings; settings.beginGroup("MainWindow"); @@ -643,3 +644,19 @@ return dark; } +void +ViewManager::setMinimalModeEnabled(bool enabled) +{ + if (m_minimalModeEnabled != enabled) { + m_minimalModeEnabled = enabled; + emit minimalModeEnabledChanged(); + if (enabled) emit activity("Activates minimal mode"); + else emit activity("Activates full mode"); + } + + QSettings settings; + settings.beginGroup("MainWindow"); + settings.setValue("minimal-mode-enabled", m_minimalModeEnabled); + settings.endGroup(); +} + diff -r a13aa5320221 -r 5fa210337bee view/ViewManager.h --- a/view/ViewManager.h Wed Jul 06 18:05:42 2011 +0100 +++ b/view/ViewManager.h Mon Jul 25 18:56:28 2011 +0100 @@ -188,6 +188,9 @@ void setGlobalDarkBackground(bool dark); bool getGlobalDarkBackground() const; + void setMinimalModeEnabled(bool enable); + bool getMinimalModeEnabled() const { return m_minimalModeEnabled; }; + signals: /** Emitted when user causes the global centre frame to change. */ void globalCentreFrameChanged(unsigned long frame); @@ -238,6 +241,11 @@ /** Emitted when any loggable activity has occurred. */ void activity(QString); + /** Emitted when the view mode has been toggled. */ + //no slot associated yet with this signal but may be useful; + //changes currently handled by the slot MainWindow::toggleViewMode() + void minimalModeEnabledChanged(); + public slots: void viewCentreFrameChanged(unsigned long, bool, PlaybackFollowMode); void viewZoomLevelChanged(unsigned long, bool); @@ -298,6 +306,8 @@ bool m_illuminateLocalFeatures; bool m_showWorkTitle; + bool m_minimalModeEnabled; + QPalette m_lightPalette; QPalette m_darkPalette; };