22 #include <QGraphicsScene> 23 #include <QScopedPointer> 25 #include <QTouchEvent> 53 const QColor& keyPressedColor = QColor(),
57 QSize sizeHint()
const;
70 bool showColorScale()
const;
71 void setShowColorScale(
const bool show);
73 QColor getKeyPressedColor()
const;
74 void setKeyPressedColor(
const QColor& color);
75 void resetKeyPressedColor();
77 int getMinNote()
const;
78 void setMinNote(
const int note);
79 int getMaxNote()
const;
80 void setMaxNote(
const int note);
81 int getTranspose()
const;
82 void setTranspose(
const int transpose);
93 bool isKeyboardEnabled()
const;
94 void setKeyboardEnabled(
const bool enable );
95 bool isMouseEnabled()
const;
96 void setMouseEnabled(
const bool enable );
97 bool isTouchEnabled()
const;
98 void setTouchEnabled(
const bool enable );
99 bool velocityTint()
const;
100 void setVelocityTint(
const bool enable );
101 bool isOctaveStart(
const int note );
103 void showNoteOn(
const int note, QColor color,
int vel = -1 );
104 void showNoteOn(
const int note,
int vel = -1 );
105 void showNoteOff(
const int note,
int vel = -1 );
106 int baseOctave()
const;
107 void setBaseOctave(
const int base );
109 int startKey()
const;
111 void keyOn(
const int note );
112 void keyOff(
const int note );
113 bool getRawKeyboardMode()
const;
114 void setRawKeyboardMode(
const bool b);
115 void useCustomNoteNames(
const QStringList& names);
116 void useStandardNoteNames();
117 QStringList customNoteNames()
const;
118 QStringList standardNoteNames()
const;
120 void setVelocity(
const int velocity);
121 int getChannel()
const;
122 void setChannel(
const int channel);
124 void refreshLabels();
125 void hideOrShowKeys();
128 void setKeyPicture(
const bool natural,
const QPixmap& pix);
129 QPixmap getKeyPicture(
const bool natural);
131 void setUseKeyPictures(
const bool enable);
132 bool getUseKeyPictures()
const;
134 void saveData(QByteArray& ba);
135 void loadData(QByteArray& ba);
137 bool touchScreenEvent(QTouchEvent *touchEvent);
139 void setUsingNativeFilter(
const bool newState);
140 bool isUsingNativeFilter()
const;
150 void noteOn(
int n,
int v);
158 void noteOff(
int n,
int v);
164 void signalName(
const QString& name);
167 void showKeyOn( PianoKey *key, QColor color,
int vel );
168 void showKeyOn( PianoKey *key,
int vel );
169 void showKeyOff( PianoKey *key,
int vel );
170 void displayKeyOn(PianoKey *key);
171 void keyOn( PianoKey *key );
172 void keyOff( PianoKey *key );
173 void keyOn( PianoKey *key, qreal pressure );
174 void keyOff( PianoKey *key, qreal pressure );
175 PianoKey *getKeyForPos(
const QPointF &p )
const;
176 PianoKey *getPianoKey(
const int key )
const;
177 QString noteName( PianoKey *key );
178 void mouseMoveEvent ( QGraphicsSceneMouseEvent *mouseEvent )
override;
179 void mousePressEvent ( QGraphicsSceneMouseEvent *mouseEvent )
override;
180 void mouseReleaseEvent ( QGraphicsSceneMouseEvent *mouseEvent )
override;
181 void keyPressEvent ( QKeyEvent *keyEvent )
override;
182 void keyReleaseEvent ( QKeyEvent *keyEvent )
override;
183 bool event(
QEvent *event)
override;
185 void triggerNoteOn(
const int note,
const int vel );
186 void triggerNoteOff(
const int note,
const int vel );
187 int getNoteFromKey(
const int key )
const;
188 void setHighlightColorFromPolicy(PianoKey *key,
const int vel);
191 class PianoScenePrivate;
192 QScopedPointer<PianoScenePrivate> d;
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 PianoKey class.
Declaration of the KeyLabel class.
The QEvent class is the base class of all event classes.
Piano Palette declarations.