22 #include <QGraphicsScene>
23 #include <QScopedPointer>
52 const QColor& keyPressedColor = QColor(),
56 QSize sizeHint()
const;
69 bool showColorScale()
const;
70 void setShowColorScale(
const bool show);
72 QColor getKeyPressedColor()
const;
73 void setKeyPressedColor(
const QColor& color);
74 void resetKeyPressedColor();
76 int getMinNote()
const;
77 void setMinNote(
const int note);
78 int getMaxNote()
const;
79 void setMaxNote(
const int note);
80 int getTranspose()
const;
81 void setTranspose(
const int transpose);
92 bool isKeyboardEnabled()
const;
93 void setKeyboardEnabled(
const bool enable );
94 bool isMouseEnabled()
const;
95 void setMouseEnabled(
const bool enable );
96 bool isTouchEnabled()
const;
97 void setTouchEnabled(
const bool enable );
98 bool velocityTint()
const;
99 void setVelocityTint(
const bool enable );
100 bool isOctaveStart(
const int note );
102 void showNoteOn(
const int note, QColor color,
int vel = -1 );
103 void showNoteOn(
const int note,
int vel = -1 );
104 void showNoteOff(
const int note,
int vel = -1 );
105 int baseOctave()
const;
106 void setBaseOctave(
const int base );
108 int startKey()
const;
110 void keyOn(
const int note );
111 void keyOff(
const int note );
112 bool getRawKeyboardMode()
const;
113 void setRawKeyboardMode(
const bool b);
114 void useCustomNoteNames(
const QStringList& names);
115 void useStandardNoteNames();
116 QStringList customNoteNames()
const;
117 QStringList standardNoteNames()
const;
119 void setVelocity(
const int velocity);
120 int getChannel()
const;
121 void setChannel(
const int channel);
123 void refreshLabels();
150 void showKeyOn( PianoKey *key, QColor color,
int vel );
151 void showKeyOn( PianoKey *key,
int vel );
152 void showKeyOff( PianoKey *key,
int vel );
153 void displayKeyOn(PianoKey *key);
154 void keyOn( PianoKey *key );
155 void keyOff( PianoKey *key );
156 void keyOn( PianoKey *key, qreal pressure );
157 void keyOff( PianoKey *key, qreal pressure );
158 PianoKey *getKeyForPos(
const QPointF &p )
const;
159 PianoKey *getPianoKey(
const int key )
const;
160 QString noteName( PianoKey *key );
161 void mouseMoveEvent ( QGraphicsSceneMouseEvent *mouseEvent )
override;
162 void mousePressEvent ( QGraphicsSceneMouseEvent *mouseEvent )
override;
163 void mouseReleaseEvent ( QGraphicsSceneMouseEvent *mouseEvent )
override;
164 void keyPressEvent ( QKeyEvent *keyEvent )
override;
165 void keyReleaseEvent ( QKeyEvent *keyEvent )
override;
166 bool event(
QEvent *event)
override;
168 void triggerNoteOn(
const int note,
const int vel );
169 void triggerNoteOff(
const int note,
const int vel );
170 int getNoteFromKey(
const int key )
const;
171 void setHighlightColorFromPolicy(PianoKey *key,
const int vel);
172 void hideOrShowKeys();
176 class PianoScenePrivate;
177 QScopedPointer<PianoScenePrivate> d;
The QEvent class is the base class of all event classes.
The QGraphicsScene class provides a surface for managing a large number of 2D graphical items.
The QObject class is the base class of all Qt objects.
Declaration of the KeyLabel class.
Declaration of the PianoKey class.
Piano Palette declarations.