comparison 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
comparison
equal deleted inserted replaced
688:212644efa523 694:ad12e428785b
22 #include "base/Pitch.h" 22 #include "base/Pitch.h"
23 #include "base/LogRange.h" 23 #include "base/LogRange.h"
24 #include "base/RangeMapper.h" 24 #include "base/RangeMapper.h"
25 #include "ColourDatabase.h" 25 #include "ColourDatabase.h"
26 #include "view/View.h" 26 #include "view/View.h"
27 #include "PianoScale.h"
27 28
28 #include "data/model/FlexiNoteModel.h" 29 #include "data/model/FlexiNoteModel.h"
29 30
30 #include "widgets/ItemEditDialog.h" 31 #include "widgets/ItemEditDialog.h"
31 32
852 853
853 paint.drawRect(x, y - h/2, w, h); 854 paint.drawRect(x, y - h/2, w, h);
854 } 855 }
855 856
856 paint.restore(); 857 paint.restore();
858 }
859
860 int
861 NoteLayer::getVerticalScaleWidth(View *, bool, QPainter &paint) const
862 {
863 return 10;
864 }
865
866 void
867 NoteLayer::paintVerticalScale(View *v, bool, QPainter &paint, QRect) const
868 {
869 float fmin, fmax;
870 getDisplayExtents(fmin, fmax);
871 PianoScale().paintPianoVertical
872 (v, paint, QRect(0, 0, 10, v->height()), fmin, fmax);
873 paint.drawLine(10, 0, 10, v->height());
857 } 874 }
858 875
859 void 876 void
860 FlexiNoteLayer::drawStart(View *v, QMouseEvent *e) 877 FlexiNoteLayer::drawStart(View *v, QMouseEvent *e)
861 { 878 {