comparison layer/Colour3DPlotLayer.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 d632a1e87018
comparison
equal deleted inserted replaced
606:fbab21439115 607:5b72899d692b
712 int cw = 20; 712 int cw = 20;
713 return cw; 713 return cw;
714 } 714 }
715 715
716 int 716 int
717 Colour3DPlotLayer::getVerticalScaleWidth(View *, QPainter &paint) const 717 Colour3DPlotLayer::getVerticalScaleWidth(View *, bool, QPainter &paint) const
718 { 718 {
719 if (!m_model) return 0; 719 if (!m_model) return 0;
720 720
721 QString sampleText = QString("[%1]").arg(m_model->getHeight()); 721 QString sampleText = QString("[%1]").arg(m_model->getHeight());
722 int tw = paint.fontMetrics().width(sampleText); 722 int tw = paint.fontMetrics().width(sampleText);
734 734
735 return tw + 13 + getColourScaleWidth(paint); 735 return tw + 13 + getColourScaleWidth(paint);
736 } 736 }
737 737
738 void 738 void
739 Colour3DPlotLayer::paintVerticalScale(View *v, QPainter &paint, QRect rect) const 739 Colour3DPlotLayer::paintVerticalScale(View *v, bool, QPainter &paint, QRect rect) const
740 { 740 {
741 if (!m_model) return; 741 if (!m_model) return;
742 742
743 int h = rect.height(), w = rect.width(); 743 int h = rect.height(), w = rect.width();
744 744