# HG changeset patch # User matthiasm # Date 1402581801 -3600 # Node ID bb1f2a20f7dbc860f7e9778c87315be3c2817b52 # Parent 0ba792bb235bfdbf11d4653ce41fdebf3d74bcc8 flexinote now displays frequency, duration and text above/below the note diff -r 0ba792bb235b -r bb1f2a20f7db layer/FlexiNoteLayer.cpp --- a/layer/FlexiNoteLayer.cpp Thu Jun 12 14:31:48 2014 +0100 +++ b/layer/FlexiNoteLayer.cpp Thu Jun 12 15:03:21 2014 +0100 @@ -859,19 +859,30 @@ paint.setPen(v->getForeground()); // paint.setBrush(v->getForeground()); - QString vlabel = QString("%1%2").arg(p.value).arg(m_model->getScaleUnits()); + QString vlabel = QString("freq: %1%2").arg(p.value).arg(m_model->getScaleUnits()); + // v->drawVisibleText(paint, + // x - paint.fontMetrics().width(vlabel) - 2, + // y + paint.fontMetrics().height()/2 + // - paint.fontMetrics().descent(), + // vlabel, View::OutlinedText); v->drawVisibleText(paint, - x - paint.fontMetrics().width(vlabel) - 2, - y + paint.fontMetrics().height()/2 + x, + y - h/2 - 2 - paint.fontMetrics().height() - paint.fontMetrics().descent(), vlabel, View::OutlinedText); - - QString hlabel = RealTime::frame2RealTime - (p.duration, m_model->getSampleRate()).toText(true).c_str(); + + QString hlabel = "dur: " + QString(RealTime::frame2RealTime + (p.duration, m_model->getSampleRate()).toText(true).c_str()); v->drawVisibleText(paint, x, y - h/2 - paint.fontMetrics().descent() - 2, hlabel, View::OutlinedText); + + QString llabel = QString("%1").arg(p.label); + v->drawVisibleText(paint, + x, + y + h + 2 + paint.fontMetrics().descent(), + llabel, View::OutlinedText); } paint.drawRect(x, y - h/2, w, h);