Mercurial > hg > svgui
diff layer/FlexiNoteLayer.cpp @ 1077:5144d7185fb5 spectrogram-minor-refactor
Move LayerGeometryProvider from view to layer
author | Chris Cannam |
---|---|
date | Thu, 30 Jun 2016 10:59:11 +0100 |
parents | 8bf05426d950 |
children | ee01a4062747 |
line wrap: on
line diff
--- a/layer/FlexiNoteLayer.cpp Thu Jun 30 10:36:52 2016 +0100 +++ b/layer/FlexiNoteLayer.cpp Thu Jun 30 10:59:11 2016 +0100 @@ -23,7 +23,7 @@ #include "base/LogRange.h" #include "base/RangeMapper.h" #include "ColourDatabase.h" -#include "view/View.h" +#include "LayerGeometryProvider.h" #include "PianoScale.h" #include "LinearNumericalScale.h" @@ -31,6 +31,8 @@ #include "data/model/FlexiNoteModel.h" +#include "view/View.h" + #include "widgets/ItemEditDialog.h" #include "widgets/TextAbbrev.h" @@ -871,30 +873,30 @@ // x - paint.fontMetrics().width(vlabel) - 2, // y + paint.fontMetrics().height()/2 // - paint.fontMetrics().descent(), - // vlabel, View::OutlinedText); + // vlabel, LayerGeometryProvider::OutlinedText); v->drawVisibleText(paint, x, y - h/2 - 2 - paint.fontMetrics().height() - paint.fontMetrics().descent(), - vlabel, View::OutlinedText); + vlabel, LayerGeometryProvider::OutlinedText); 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); + hlabel, LayerGeometryProvider::OutlinedText); QString llabel = QString("%1").arg(p.label); v->drawVisibleText(paint, x, y + h + 2 + paint.fontMetrics().descent(), - llabel, View::OutlinedText); + llabel, LayerGeometryProvider::OutlinedText); QString nlabel = QString("%1").arg(noteNumber); v->drawVisibleText(paint, x + paint.fontMetrics().averageCharWidth() / 2, y + h/2 - paint.fontMetrics().descent(), - nlabel, View::OutlinedText); + nlabel, LayerGeometryProvider::OutlinedText); } paint.drawRect(x, y - h/2, w, h);