Mercurial > hg > svgui
comparison layer/FlexiNoteLayer.cpp @ 633:03d5f370c9a0 tonioni
larger notes plus basic editing functions are now enabled by temporary star icon in toolbar
author | gyorgyf |
---|---|
date | Wed, 17 Apr 2013 09:15:05 +0100 |
parents | 764a9452a71a |
children | 4fa3951bbb05 |
comparison
equal
deleted
inserted
replaced
628:764a9452a71a | 633:03d5f370c9a0 |
---|---|
759 const FlexiNoteModel::Point &p(*i); | 759 const FlexiNoteModel::Point &p(*i); |
760 | 760 |
761 int x = v->getXForFrame(p.frame); | 761 int x = v->getXForFrame(p.frame); |
762 int y = getYForValue(v, p.value); | 762 int y = getYForValue(v, p.value); |
763 int w = v->getXForFrame(p.frame + p.duration) - x; | 763 int w = v->getXForFrame(p.frame + p.duration) - x; |
764 int h = 3; | 764 int h = 8; //GF: larger notes |
765 | 765 |
766 if (m_model->getValueQuantization() != 0.0) { | 766 if (m_model->getValueQuantization() != 0.0) { |
767 h = y - getYForValue(v, p.value + m_model->getValueQuantization()); | 767 h = y - getYForValue(v, p.value + m_model->getValueQuantization()); |
768 if (h < 3) h = 3; | 768 if (h < 3) h = 8; //GF: larger notes |
769 } | 769 } |
770 | 770 |
771 if (w < 1) w = 1; | 771 if (w < 1) w = 1; |
772 paint.setPen(getBaseQColor()); | 772 paint.setPen(getBaseQColor()); |
773 paint.setBrush(brushColour); | 773 paint.setBrush(brushColour); |
985 } | 985 } |
986 | 986 |
987 bool | 987 bool |
988 FlexiNoteLayer::editOpen(View *v, QMouseEvent *e) | 988 FlexiNoteLayer::editOpen(View *v, QMouseEvent *e) |
989 { | 989 { |
990 std::cerr << "Opening note editor dialog" << std::endl; | |
990 if (!m_model) return false; | 991 if (!m_model) return false; |
991 | 992 |
992 FlexiNoteModel::Point note(0); | 993 FlexiNoteModel::Point note(0); |
993 if (!getPointToDrag(v, e->x(), e->y(), note)) return false; | 994 if (!getPointToDrag(v, e->x(), e->y(), note)) return false; |
994 | 995 |