comparison widgets/LevelPanWidget.h @ 1200:808d375a3b12 levelpanwidget

Support mouse wheel on level-pan tool button
author Chris Cannam
date Fri, 16 Dec 2016 16:29:53 +0000
parents 6a6a63506e3f
children a68c25ba1153
comparison
equal deleted inserted replaced
1199:73d43e410a6b 1200:808d375a3b12
60 void setEditable(bool); 60 void setEditable(bool);
61 61
62 /// Specify whether the level range should include muting or not 62 /// Specify whether the level range should include muting or not
63 void setIncludeMute(bool); 63 void setIncludeMute(bool);
64 64
65 // public so it can be called from LevelPanToolButton (ew)
66 virtual void wheelEvent(QWheelEvent *ev);
67
65 signals: 68 signals:
66 void levelChanged(float); // range [0,1] 69 void levelChanged(float); // range [0,1]
67 void panChanged(float); // range [-1,1] 70 void panChanged(float); // range [-1,1]
68 71
69 void mouseEntered(); 72 void mouseEntered();
71 74
72 protected: 75 protected:
73 virtual void mousePressEvent(QMouseEvent *ev); 76 virtual void mousePressEvent(QMouseEvent *ev);
74 virtual void mouseMoveEvent(QMouseEvent *ev); 77 virtual void mouseMoveEvent(QMouseEvent *ev);
75 virtual void mouseReleaseEvent(QMouseEvent *ev); 78 virtual void mouseReleaseEvent(QMouseEvent *ev);
76 virtual void wheelEvent(QWheelEvent *ev);
77 virtual void paintEvent(QPaintEvent *ev); 79 virtual void paintEvent(QPaintEvent *ev);
78 virtual void enterEvent(QEvent *); 80 virtual void enterEvent(QEvent *);
79 virtual void leaveEvent(QEvent *); 81 virtual void leaveEvent(QEvent *);
80 82
81 void emitLevelChanged(); 83 void emitLevelChanged();