Mercurial > hg > svgui
diff layer/FlexiNoteLayer.cpp @ 694:ad12e428785b tonioni
Merge from default branch
author | Chris Cannam |
---|---|
date | Tue, 03 Dec 2013 17:58:40 +0000 |
parents | layer/NoteLayer.cpp@4dcf10bd2863 layer/NoteLayer.cpp@212644efa523 |
children | 6d9624e0ac55 |
line wrap: on
line diff
--- a/layer/FlexiNoteLayer.cpp Fri Nov 29 14:51:47 2013 +0000 +++ b/layer/FlexiNoteLayer.cpp Tue Dec 03 17:58:40 2013 +0000 @@ -24,6 +24,7 @@ #include "base/RangeMapper.h" #include "ColourDatabase.h" #include "view/View.h" +#include "PianoScale.h" #include "data/model/FlexiNoteModel.h" @@ -856,6 +857,22 @@ paint.restore(); } +int +NoteLayer::getVerticalScaleWidth(View *, bool, QPainter &paint) const +{ + return 10; +} + +void +NoteLayer::paintVerticalScale(View *v, bool, QPainter &paint, QRect) const +{ + float fmin, fmax; + getDisplayExtents(fmin, fmax); + PianoScale().paintPianoVertical + (v, paint, QRect(0, 0, 10, v->height()), fmin, fmax); + paint.drawLine(10, 0, 10, v->height()); +} + void FlexiNoteLayer::drawStart(View *v, QMouseEvent *e) {