diff layer/SliceLayer.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 3803f6dcf361
children 1a0dfcbffaf1
line wrap: on
line diff
--- a/layer/SliceLayer.cpp	Mon Jan 30 13:24:55 2012 +0000
+++ b/layer/SliceLayer.cpp	Mon Jan 30 16:01:59 2012 +0000
@@ -330,7 +330,7 @@
 
     paint.setPen(getBaseQColor());
 
-    int xorigin = getVerticalScaleWidth(v, paint) + 1;
+    int xorigin = getVerticalScaleWidth(v, true, paint) + 1;
     int w = v->width() - xorigin - 1;
 
     m_xorigins[v] = xorigin; // for use in getFeatureDescription
@@ -498,7 +498,7 @@
 }
 
 int
-SliceLayer::getVerticalScaleWidth(View *, QPainter &paint) const
+SliceLayer::getVerticalScaleWidth(View *, bool, QPainter &paint) const
 {
     if (m_energyScale == LinearScale || m_energyScale == AbsoluteScale) {
 	return std::max(paint.fontMetrics().width("0.0") + 13,
@@ -510,7 +510,7 @@
 }
 
 void
-SliceLayer::paintVerticalScale(View *v, QPainter &paint, QRect rect) const
+SliceLayer::paintVerticalScale(View *v, bool, QPainter &paint, QRect rect) const
 {
     float thresh = m_threshold;
     if (m_energyScale != LinearScale && m_energyScale != AbsoluteScale) {