diff options
author | Florian Jung <flo@windfisch.org> | 2012-03-15 18:21:23 +0000 |
---|---|---|
committer | Florian Jung <flo@windfisch.org> | 2012-03-15 18:21:23 +0000 |
commit | 27b7bf6815cda7abb67026c37b3e44daee1803cb (patch) | |
tree | 0b9d1c0bc84ac7ff8032e707f2b5fb4e0aaabb5c /muse2/muse/midiedit/piano.cpp | |
parent | 2d6f113a10eb485694e20a78500f650776d701e3 (diff) |
merged with trunk
Diffstat (limited to 'muse2/muse/midiedit/piano.cpp')
-rw-r--r-- | muse2/muse/midiedit/piano.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/muse2/muse/midiedit/piano.cpp b/muse2/muse/midiedit/piano.cpp index abd360df..1000ffe9 100644 --- a/muse2/muse/midiedit/piano.cpp +++ b/muse2/muse/midiedit/piano.cpp @@ -404,13 +404,10 @@ void Piano::draw(QPainter& p, const QRect& r) int drawY = octaveSize * drawKey + 81 - KH*2; if (drawY > r.y() && drawY < r.y() + r.height()) { - //printf("drawing c %d at %d r.y %d r.x %d\n",drawKey, drawY, r.y(), r.x()); p.drawPixmap(0,drawY,*c_keys[drawKey]); } } - //p.drawTiledPixmap(r, *c1, r.topLeft()+offset + coffset); - //printf("drawText KH %d %d, x %d y %d\n",KH, curPitch, r.x(), r.y()); - //p.drawText(r,Qt::AlignAuto,"A"); + if (curPitch == -1) return; int y = pitch2y(curPitch); @@ -457,7 +454,7 @@ int Piano::pitch2y(int pitch) const int Piano::y2pitch(int y) const { - const int total = (10 * 7 + 5) * KH; // 75 Ganztonschritte + const int total = (10 * 7 + 5) * KH; // 75 full tone steps y = total - y; int oct = (y / (7 * KH)) * 12; char kt[] = { @@ -524,7 +521,6 @@ void Piano::viewMouseMoveEvent(QMouseEvent* event) keyDown = nk; if (keyDown != -1) { int velocity = event->x()*127/40; - //emit keyPressed(keyDown, shift); emit keyPressed(keyDown, velocity>127 ? 127 : velocity, shift); } } |