Mercurial > hg > svgui
diff layer/TimeValueLayer.cpp @ 694:ad12e428785b tonioni
Merge from default branch
author | Chris Cannam |
---|---|
date | Tue, 03 Dec 2013 17:58:40 +0000 |
parents | 5674950ed82a |
children | e77b1673e17e 26b1ffe412f9 |
line wrap: on
line diff
--- a/layer/TimeValueLayer.cpp Fri Nov 29 14:51:47 2013 +0000 +++ b/layer/TimeValueLayer.cpp Tue Dec 03 17:58:40 2013 +0000 @@ -30,6 +30,7 @@ #include "widgets/ListInputDialog.h" #include "ColourMapper.h" +#include "PianoScale.h" #include <QPainter> #include <QPainterPath> @@ -1179,9 +1180,11 @@ ++pointCount; } - if ((m_plotStyle == PlotCurve || m_plotStyle == PlotDiscreteCurves || - m_plotStyle == PlotLines) - && !path.isEmpty()) { + if (m_plotStyle == PlotDiscreteCurves) { + paint.setRenderHint(QPainter::Antialiasing, true); + paint.drawPath(path); + } else if ((m_plotStyle == PlotCurve || m_plotStyle == PlotLines) + && !path.isEmpty()) { paint.setRenderHint(QPainter::Antialiasing, pointCount <= v->width()); paint.drawPath(path); } @@ -1336,6 +1339,16 @@ paint.drawText(5, 5 + paint.fontMetrics().ascent(), m_model->getScaleUnits()); } + + if (logarithmic && + (m_model->getScaleUnits() == "Hz") && + (m_plotStyle != PlotSegmentation)) { + float fmin, fmax; + getDisplayExtents(fmin, fmax); + PianoScale().paintPianoVertical + (v, paint, QRect(w, 0, 10, h), fmin, fmax); + paint.drawLine(w + 10, 0, w + 10, h); + } } void