summaryrefslogtreecommitdiff
path: root/muse2/muse/midiedit/piano.h
diff options
context:
space:
mode:
authorTim E. Real <termtech@rogers.com>2012-10-27 09:58:29 +0000
committerTim E. Real <termtech@rogers.com>2012-10-27 09:58:29 +0000
commitb1776f093d4b87ad2635990f429f4503157f6288 (patch)
treea18bcc5e23674d74037c87e0541f9feefdc7b9ca /muse2/muse/midiedit/piano.h
parentb297348e8e2cd76be6f1d546fb458865cc4d263b (diff)
Improved: Velocity graphs. Icon for showing per-note or all velocities. Also found in Settings.
Improved: Piano KB has current selected note (yellow). For velocity/polyaftertouch/other per-note ctrls. Bad timing warning now has "don't show again". Added 'speaker' icon to drum edit. And drum list and piano keyboard now obey the 'speaker' icon.
Diffstat (limited to 'muse2/muse/midiedit/piano.h')
-rw-r--r--muse2/muse/midiedit/piano.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/muse2/muse/midiedit/piano.h b/muse2/muse/midiedit/piano.h
index ea032189..f42037ec 100644
--- a/muse2/muse/midiedit/piano.h
+++ b/muse2/muse/midiedit/piano.h
@@ -27,26 +27,34 @@
class QEvent;
class QMouseEvent;
+class QWheelEvent;
class QPainter;
class QPixmap;
#define KH 13
+namespace MusEGui {
+
//---------------------------------------------------------
// Piano
//---------------------------------------------------------
-class Piano : public MusEGui::View
+class Piano : public View
{
Q_OBJECT
int curPitch;
+ int _curSelectedPitch;
QPixmap* octave;
QPixmap* c_keys[10];
QPixmap* mk1;
QPixmap* mk2;
QPixmap* mk3;
QPixmap* mk4;
+ QPixmap* mk5;
+ QPixmap* mk6;
+ QPixmap* mk7;
+ QPixmap* mk8;
int keyDown;
bool shift;
int button;
@@ -59,6 +67,7 @@ class Piano : public MusEGui::View
virtual void viewMousePressEvent(QMouseEvent* event);
virtual void viewMouseReleaseEvent(QMouseEvent*);
+ virtual void wheelEvent(QWheelEvent* e);
protected:
virtual void draw(QPainter&, const QRect&);
@@ -67,13 +76,19 @@ class Piano : public MusEGui::View
void pitchChanged(int);
void keyPressed(int, int, bool);
void keyReleased(int, bool);
+ void curSelectedPitchChanged(int);
+ void redirectWheelEvent(QWheelEvent*);
public slots:
void setPitch(int);
public:
Piano(QWidget*, int);
+ int curSelectedPitch() const { return _curSelectedPitch; }
+ void setCurSelectedPitch(int pitch);
};
+} // namespace MusEGui
+
#endif