Mercurial > hg > svgui
changeset 819:a9731b49745a tonioni
adding no spectrogram and no sonification options
author | matthiasm |
---|---|
date | Tue, 15 Jul 2014 15:42:20 +0100 |
parents | b68af2be4545 |
children | ec0906aef9bf |
files | layer/FlexiNoteLayer.cpp |
diffstat | 1 files changed, 9 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/layer/FlexiNoteLayer.cpp Wed Jun 18 13:42:25 2014 +0100 +++ b/layer/FlexiNoteLayer.cpp Tue Jul 15 15:42:20 2014 +0100 @@ -801,7 +801,7 @@ int frame0 = v->getFrameForX(x0); int frame1 = v->getFrameForX(x1); - FlexiNoteModel::PointList points(m_model->getPoints(frame0, frame1)); + FlexiNoteModel::PointList points(m_model->getPoints(0, frame1)); if (points.empty()) return; paint.setPen(getBaseQColor()); @@ -828,9 +828,12 @@ paint.save(); paint.setRenderHint(QPainter::Antialiasing, false); + int noteNumber = 0; + for (FlexiNoteModel::PointList::const_iterator i = points.begin(); i != points.end(); ++i) { + ++noteNumber; const FlexiNoteModel::Point &p(*i); int x = v->getXForFrame(p.frame); @@ -882,6 +885,11 @@ x, y + h + 2 + paint.fontMetrics().descent(), llabel, View::OutlinedText); + QString nlabel = QString("%1").arg(noteNumber); + v->drawVisibleText(paint, + x + paint.fontMetrics().averageCharWidth() / 2, + y + h/2 - paint.fontMetrics().descent(), + nlabel, View::OutlinedText); } paint.drawRect(x, y - h/2, w, h);