Mercurial > hg > svgui
comparison layer/NoteLayer.cpp @ 692:4dcf10bd2863
Add piano scale to note layer as well (need to handle the auto-align case properly)
author | Chris Cannam |
---|---|
date | Tue, 03 Dec 2013 17:55:37 +0000 |
parents | 1a0dfcbffaf1 |
children | ad12e428785b 26b1ffe412f9 |
comparison
equal
deleted
inserted
replaced
691:5674950ed82a | 692:4dcf10bd2863 |
---|---|
21 #include "base/Pitch.h" | 21 #include "base/Pitch.h" |
22 #include "base/LogRange.h" | 22 #include "base/LogRange.h" |
23 #include "base/RangeMapper.h" | 23 #include "base/RangeMapper.h" |
24 #include "ColourDatabase.h" | 24 #include "ColourDatabase.h" |
25 #include "view/View.h" | 25 #include "view/View.h" |
26 #include "PianoScale.h" | |
26 | 27 |
27 #include "data/model/NoteModel.h" | 28 #include "data/model/NoteModel.h" |
28 | 29 |
29 #include "widgets/ItemEditDialog.h" | 30 #include "widgets/ItemEditDialog.h" |
30 | 31 |
809 | 810 |
810 paint.drawRect(x, y - h/2, w, h); | 811 paint.drawRect(x, y - h/2, w, h); |
811 } | 812 } |
812 | 813 |
813 paint.restore(); | 814 paint.restore(); |
815 } | |
816 | |
817 int | |
818 NoteLayer::getVerticalScaleWidth(View *, bool, QPainter &paint) const | |
819 { | |
820 return 10; | |
821 } | |
822 | |
823 void | |
824 NoteLayer::paintVerticalScale(View *v, bool, QPainter &paint, QRect) const | |
825 { | |
826 float fmin, fmax; | |
827 getDisplayExtents(fmin, fmax); | |
828 PianoScale().paintPianoVertical | |
829 (v, paint, QRect(0, 0, 10, v->height()), fmin, fmax); | |
830 paint.drawLine(10, 0, 10, v->height()); | |
814 } | 831 } |
815 | 832 |
816 void | 833 void |
817 NoteLayer::drawStart(View *v, QMouseEvent *e) | 834 NoteLayer::drawStart(View *v, QMouseEvent *e) |
818 { | 835 { |