# HG changeset patch # User matthiasm # Date 1405435340 -3600 # Node ID a9731b49745a3ab73b5c5597004e6bc25f14f4dc # Parent b68af2be4545adf04eec58c50d8419dc574b8642 adding no spectrogram and no sonification options diff -r b68af2be4545 -r a9731b49745a layer/FlexiNoteLayer.cpp --- 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);