Mercurial > hg > svgui
comparison view/ViewManager.cpp @ 607:5b72899d692b
Give a dedicated key to toggling the centre line, and move it out of the overlay level setting -- reducing number of overlay levels to 3. Introduce two distinct vertical scale types (so that we can hide the spectrogram colour scale part easily)
author | Chris Cannam |
---|---|
date | Mon, 30 Jan 2012 16:01:59 +0000 |
parents | 4806715f7a19 |
children | 2c35737cd3f8 c8f45afb83d5 |
comparison
equal
deleted
inserted
replaced
606:fbab21439115 | 607:5b72899d692b |
---|---|
41 m_toolMode(NavigateMode), | 41 m_toolMode(NavigateMode), |
42 m_playLoopMode(false), | 42 m_playLoopMode(false), |
43 m_playSelectionMode(false), | 43 m_playSelectionMode(false), |
44 m_playSoloMode(false), | 44 m_playSoloMode(false), |
45 m_alignMode(false), | 45 m_alignMode(false), |
46 m_overlayMode(StandardOverlays), | 46 m_overlayMode(MinimalOverlays), |
47 m_zoomWheelsEnabled(true), | 47 m_zoomWheelsEnabled(true), |
48 m_showCentreLine(true), | |
48 m_illuminateLocalFeatures(true), | 49 m_illuminateLocalFeatures(true), |
49 m_showWorkTitle(false), | 50 m_showWorkTitle(false), |
50 m_lightPalette(QApplication::palette()), | 51 m_lightPalette(QApplication::palette()), |
51 m_darkPalette(QApplication::palette()) | 52 m_darkPalette(QApplication::palette()) |
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()); |
58 | |
59 if (m_overlayMode != NoOverlays && | |
60 m_overlayMode != MinimalOverlays && | |
61 m_overlayMode != AllOverlays) { | |
62 m_overlayMode = MinimalOverlays; | |
63 } | |
64 | |
57 m_zoomWheelsEnabled = | 65 m_zoomWheelsEnabled = |
58 settings.value("zoom-wheels-enabled", m_zoomWheelsEnabled).toBool(); | 66 settings.value("zoom-wheels-enabled", m_zoomWheelsEnabled).toBool(); |
67 m_showCentreLine = | |
68 settings.value("show-centre-line", m_showCentreLine).toBool(); | |
59 settings.endGroup(); | 69 settings.endGroup(); |
60 | 70 |
61 if (getGlobalDarkBackground()) { | 71 if (getGlobalDarkBackground()) { |
62 /* | 72 /* |
63 std::cerr << "dark palette:" << std::endl; | 73 std::cerr << "dark palette:" << std::endl; |
607 settings.setValue("zoom-wheels-enabled", m_zoomWheelsEnabled); | 617 settings.setValue("zoom-wheels-enabled", m_zoomWheelsEnabled); |
608 settings.endGroup(); | 618 settings.endGroup(); |
609 } | 619 } |
610 | 620 |
611 void | 621 void |
622 ViewManager::setShowCentreLine(bool show) | |
623 { | |
624 if (m_showCentreLine != show) { | |
625 m_showCentreLine = show; | |
626 emit showCentreLineChanged(); | |
627 if (show) emit activity("Show centre line"); | |
628 else emit activity("Hide centre line"); | |
629 } | |
630 | |
631 QSettings settings; | |
632 settings.beginGroup("MainWindow"); | |
633 settings.setValue("show-centre-line", int(m_showCentreLine)); | |
634 settings.endGroup(); | |
635 } | |
636 | |
637 void | |
612 ViewManager::setGlobalDarkBackground(bool dark) | 638 ViewManager::setGlobalDarkBackground(bool dark) |
613 { | 639 { |
614 // also save the current palette, in case the user has changed it | 640 // also save the current palette, in case the user has changed it |
615 // since construction | 641 // since construction |
616 if (getGlobalDarkBackground()) { | 642 if (getGlobalDarkBackground()) { |