Mercurial > hg > svgui
comparison view/ViewManager.cpp @ 588:707d43018f59 toggle
Add a new feature to allow users to toggle between minimal and full modes. This is done by hiding/showing the pane stack, menu actions, and toolbars.
Changes in ViewManager (header and source) to emit an activity signal when the view mode is toggled.
author | mathieub <mathieu.barthet@eecs.qmul.ac.uk> |
---|---|
date | Tue, 21 Jun 2011 22:11:00 +0100 |
parents | 4806715f7a19 |
children | 5fa210337bee |
comparison
equal
deleted
inserted
replaced
587:4806715f7a19 | 588:707d43018f59 |
---|---|
46 m_overlayMode(StandardOverlays), | 46 m_overlayMode(StandardOverlays), |
47 m_zoomWheelsEnabled(true), | 47 m_zoomWheelsEnabled(true), |
48 m_illuminateLocalFeatures(true), | 48 m_illuminateLocalFeatures(true), |
49 m_showWorkTitle(false), | 49 m_showWorkTitle(false), |
50 m_lightPalette(QApplication::palette()), | 50 m_lightPalette(QApplication::palette()), |
51 m_darkPalette(QApplication::palette()) | 51 m_darkPalette(QApplication::palette()), |
52 m_minimalModeEnabled(0) | |
52 { | 53 { |
53 QSettings settings; | 54 QSettings settings; |
54 settings.beginGroup("MainWindow"); | 55 settings.beginGroup("MainWindow"); |
55 m_overlayMode = OverlayMode | 56 m_overlayMode = OverlayMode |
56 (settings.value("overlay-mode", int(m_overlayMode)).toInt()); | 57 (settings.value("overlay-mode", int(m_overlayMode)).toInt()); |
635 dark = true; | 636 dark = true; |
636 } | 637 } |
637 return dark; | 638 return dark; |
638 } | 639 } |
639 | 640 |
641 void | |
642 ViewManager::setMinimalModeEnabled(bool enabled) | |
643 { | |
644 if (m_minimalModeEnabled != enabled) { | |
645 m_minimalModeEnabled = enabled; | |
646 emit minimalModeEnabledChanged(); | |
647 if (enabled) emit activity("Activates minimal mode"); | |
648 else emit activity("Activates full mode"); | |
649 } | |
650 | |
651 QSettings settings; | |
652 settings.beginGroup("MainWindow"); | |
653 settings.setValue("minimal-mode-enabled", m_minimalModeEnabled); | |
654 settings.endGroup(); | |
655 } | |
656 |