comparison layer/NoteLayer.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 4fe7a09be0fe
children ee01a4062747
comparison
equal deleted inserted replaced
1076:e536dfc6b250 1077:5144d7185fb5
811 QString vlabel = QString("%1%2").arg(p.value).arg(getScaleUnits()); 811 QString vlabel = QString("%1%2").arg(p.value).arg(getScaleUnits());
812 v->drawVisibleText(paint, 812 v->drawVisibleText(paint,
813 x - paint.fontMetrics().width(vlabel) - 2, 813 x - paint.fontMetrics().width(vlabel) - 2,
814 y + paint.fontMetrics().height()/2 814 y + paint.fontMetrics().height()/2
815 - paint.fontMetrics().descent(), 815 - paint.fontMetrics().descent(),
816 vlabel, View::OutlinedText); 816 vlabel, LayerGeometryProvider::OutlinedText);
817 817
818 QString hlabel = RealTime::frame2RealTime 818 QString hlabel = RealTime::frame2RealTime
819 (p.frame, m_model->getSampleRate()).toText(true).c_str(); 819 (p.frame, m_model->getSampleRate()).toText(true).c_str();
820 v->drawVisibleText(paint, 820 v->drawVisibleText(paint,
821 x, 821 x,
822 y - h/2 - paint.fontMetrics().descent() - 2, 822 y - h/2 - paint.fontMetrics().descent() - 2,
823 hlabel, View::OutlinedText); 823 hlabel, LayerGeometryProvider::OutlinedText);
824 } 824 }
825 825
826 paint.drawRect(x, y - h/2, w, h); 826 paint.drawRect(x, y - h/2, w, h);
827 } 827 }
828 828