20 #ifndef __PIANOTOOLS_H__ 21 #define __PIANOTOOLS_H__ 42 virtual void paint(QPainter* painter,
const QStyleOptionGraphicsItem* option, QWidget* widget = 0);
59 class HPiano :
public QGraphicsView {
69 virtual void wheelEvent(QWheelEvent*);
70 virtual bool event(QEvent* event);
71 bool gestureEvent(QGestureEvent *event);
75 void keyPressed(
int pitch,
bool chord,
int velo);
76 void keyReleased(
int pitch,
bool chord,
int velo);
79 HPiano(QWidget* parent = 0);
81 void setPressedPlaybackPitches(QSet<int> pitches);
82 void pressPitch(
int pitch);
83 void releasePitch(
int pitch);
84 void clearSelection();
85 void changeSelection(
const Selection& selection);
87 virtual QSize sizeHint()
const;
90 void setMaximum(
bool top_level);
103 void keyPressed(
int pitch,
bool chord,
int vel);
104 void keyReleased(
int pitch,
bool chord,
int vel);
107 virtual void changeEvent(QEvent *event);
114 void setPlaybackNotes(QList<const Note*> notes);
115 void clearSelection();
116 void changeSelection(
const Selection& selection);
HPiano * piano
Definition: pianotools.h:40
int pitch()
Definition: pianotools.h:49
QSet< int > _pressedPitches
Definition: pianotools.h:66
bool _highlighted
Definition: pianotools.h:38
Definition: pianotools.h:59
QSet< int > _pressedPlaybackPitches
Definition: pianotools.h:64
void releasePitch(int pitch)
Definition: pianotools.cpp:177
void setSelected(bool s)
Definition: pianotools.h:52
int _firstKey
Definition: pianotools.h:61
bool _pressed
Definition: pianotools.h:37
void setHighlighted(bool h)
Definition: pianotools.h:51
PianoKeyItem(HPiano *, int p)
Definition: pianotools.cpp:240
bool _selected
Definition: pianotools.h:39
void setType(int val)
Definition: pianotools.cpp:259
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0)
Definition: pianotools.cpp:383
int _pitch
Definition: pianotools.h:36
Definition: aeolus.cpp:26
void pressPitch(int pitch)
Definition: pianotools.cpp:167
void setPressed(bool p)
Definition: pianotools.h:50
Definition of classes Note and NoteHead.
virtual void mousePressEvent(QGraphicsSceneMouseEvent *)
Definition: pianotools.cpp:360
int type
Definition: pianotools.h:35
QList< PianoKeyItem * > keys
Definition: pianotools.h:67
virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *)
Definition: pianotools.cpp:372
int _lastKey
Definition: pianotools.h:62
Definition: pianotools.h:34
qreal scaleVal
Definition: pianotools.h:68