comparison layer/SpectrumLayer.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 1a0dfcbffaf1
comparison
equal deleted inserted replaced
606:fbab21439115 607:5b72899d692b
440 extents.push_back(horizontal); 440 extents.push_back(horizontal);
441 441
442 int hoffset = 2; 442 int hoffset = 2;
443 if (m_binScale == LogBins) hoffset = 13; 443 if (m_binScale == LogBins) hoffset = 13;
444 444
445 int sw = getVerticalScaleWidth(v, paint); 445 int sw = getVerticalScaleWidth(v, false, paint);
446 446
447 QRect value(sw, cursorPos.y() - paint.fontMetrics().ascent() - 2, 447 QRect value(sw, cursorPos.y() - paint.fontMetrics().ascent() - 2,
448 paint.fontMetrics().width("0.0000001 V") + 2, 448 paint.fontMetrics().width("0.0000001 V") + 2,
449 paint.fontMetrics().height()); 449 paint.fontMetrics().height());
450 extents.push_back(value); 450 extents.push_back(value);
666 FFTModel *fft = dynamic_cast<FFTModel *> 666 FFTModel *fft = dynamic_cast<FFTModel *>
667 (const_cast<DenseThreeDimensionalModel *>(m_sliceableModel)); 667 (const_cast<DenseThreeDimensionalModel *>(m_sliceableModel));
668 668
669 float thresh = (powf(10, -6) / m_gain) * (m_windowSize / 2.f); // -60dB adj 669 float thresh = (powf(10, -6) / m_gain) * (m_windowSize / 2.f); // -60dB adj
670 670
671 int xorigin = getVerticalScaleWidth(v, paint) + 1; 671 int xorigin = getVerticalScaleWidth(v, false, paint) + 1;
672 int w = v->width() - xorigin - 1; 672 int w = v->width() - xorigin - 1;
673 673
674 int pkh = 0; 674 int pkh = 0;
675 //!!! if (m_binScale == LogBins) { 675 //!!! if (m_binScale == LogBins) {
676 pkh = 10; 676 pkh = 10;