diff view/Pane.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 2f087d950621
children d632a1e87018 5c9dcec5f3e9
line wrap: on
line diff
--- a/view/Pane.cpp	Mon Jan 30 13:24:55 2012 +0000
+++ b/view/Pane.cpp	Mon Jan 30 16:01:59 2012 +0000
@@ -554,7 +554,8 @@
     // then the scale should be drawn from any underlying layer
     // with a scale regardless of unit.
 
-    int sw = topLayer->getVerticalScaleWidth(this, paint);
+    int sw = topLayer->getVerticalScaleWidth
+        (this, m_manager->shouldShowVerticalColourScale(), paint);
 
     if (sw > 0) {
         scaleLayer = topLayer;
@@ -576,7 +577,8 @@
                         
                     if ((*vi) == topLayer) continue;
                         
-                    sw = (*vi)->getVerticalScaleWidth(this, paint);
+                    sw = (*vi)->getVerticalScaleWidth
+                        (this, m_manager->shouldShowVerticalColourScale(), paint);
                         
                     if (sw > 0) {
                         scaleLayer = *vi;
@@ -605,7 +607,8 @@
                         if ((*vi)->getValueExtents(min, max, log, unit) &&
                             unit == requireUnit) {
 
-                            sw = (*vi)->getVerticalScaleWidth(this, paint);
+                            sw = (*vi)->getVerticalScaleWidth
+                                (this, m_manager->shouldShowVerticalColourScale(), paint);
                             if (sw > 0) {
                                 scaleLayer = *vi;
                                 m_scaleWidth = sw;
@@ -633,7 +636,8 @@
         
         paint.setBrush(Qt::NoBrush);
         scaleLayer->paintVerticalScale
-            (this, paint, QRect(0, 0, m_scaleWidth, height()));
+            (this, m_manager->shouldShowVerticalColourScale(),
+             paint, QRect(0, 0, m_scaleWidth, height()));
         
         paint.restore();
     }
@@ -1053,7 +1057,8 @@
             
             paint.setBrush(Qt::NoBrush);
             (*vi)->paintVerticalScale
-                (this, paint, QRect(xorigin, 0, m_scaleWidth, height()));
+                (this, m_manager->shouldShowVerticalColourScale(),
+                 paint, QRect(xorigin, 0, m_scaleWidth, height()));
             
             paint.restore();
             break;
@@ -1078,7 +1083,8 @@
         for (LayerList::iterator vi = m_layers.end(); vi != m_layers.begin(); ) {
             --vi;
             QPainter paint(image);
-            m_scaleWidth = (*vi)->getVerticalScaleWidth(this, paint);
+            m_scaleWidth = (*vi)->getVerticalScaleWidth
+                (this, m_manager->shouldShowVerticalColourScale(), paint);
             break;
         }
     } else {
@@ -1114,7 +1120,8 @@
         for (LayerList::iterator vi = m_layers.end(); vi != m_layers.begin(); ) {
             --vi;
             QPainter paint(image);
-            sw = (*vi)->getVerticalScaleWidth(this, paint);
+            sw = (*vi)->getVerticalScaleWidth
+                (this, m_manager->shouldShowVerticalColourScale(), paint);
             break;
         }
     }