comparison view/View.cpp @ 274:b9380f679f70

* Fix centre line position * Fix failure to update overview when generating peaks from wav file * Provide y-coordinate scale values and differences for spectrum measurement mode, and fix values for waveform (inc dB for both) * Add Printer colour scheme (may be futile)
author Chris Cannam
date Mon, 02 Jul 2007 13:04:17 +0000
parents 87e4c880b4c8
children a078aa2932cc
comparison
equal deleted inserted replaced
273:e954c00cbe55 274:b9380f679f70
1724 if ((b1 = topLayer->getYScaleValue(this, r.y() + r.height(), v1, u1))) { 1724 if ((b1 = topLayer->getYScaleValue(this, r.y() + r.height(), v1, u1))) {
1725 bys = QString("%1 %2").arg(v1).arg(u1); 1725 bys = QString("%1 %2").arg(v1).arg(u1);
1726 bw = std::max(bw, paint.fontMetrics().width(bys)); 1726 bw = std::max(bw, paint.fontMetrics().width(bys));
1727 } 1727 }
1728 } 1728 }
1729 1729
1730 if (b0 && b1 && u0 == u1) { 1730 bool bd = false;
1731 dys = QString("(%1 %2)").arg(fabs(v1 - v0)).arg(u1); 1731 float dy = 0.f;
1732 QString du;
1733
1734 if ((bd = topLayer->getYScaleDifference(this, r.y(), r.y() + r.height(),
1735 dy, du))) {
1736 if (du != "") {
1737 dys = QString("(%1 %2)").arg(dy).arg(du);
1738 } else {
1739 dys = QString("(%1)").arg(dy);
1740 }
1732 dw = std::max(dw, paint.fontMetrics().width(dys)); 1741 dw = std::max(dw, paint.fontMetrics().width(dys));
1733 } 1742 }
1734 1743
1735 int mw = r.width(); 1744 int mw = r.width();
1736 int mh = r.height(); 1745 int mh = r.height();