]> code.delx.au - virtualtones/blob - pianoinstrument.h
Remove unused include
[virtualtones] / pianoinstrument.h
1 // pianoinstrument.h - A piano simulator
2 // Written by James Bunton <james@delx.net.au>
3 // Licensed under the GPL, see COPYING.txt for more details
4
5
6 #ifndef PIANOINSTRUMENT_H
7 #define PIANOINSTRUMENT_H
8
9 #include <QWidget>
10 #include <QPixmap>
11 #include <QPainter>
12
13 #include "instrument.h"
14
15
16 class PianoInstrument : public Instrument
17 {
18 Q_OBJECT
19 public:
20 PianoInstrument(QWidget *parent);
21 ~PianoInstrument();
22
23 protected:
24 QString generateHelp();
25 void paintEvent(QPaintEvent *);
26 void keyPressEvent(QKeyEvent *);
27 void keyReleaseEvent(QKeyEvent *);
28
29 private:
30 void paintPart(QPainter &paint, int start, int stop, int y, bool sharp);
31 void copyArray(bool source[26], bool dest[26]);
32 void emitSounds();
33
34 QPixmap background;
35
36 bool oldNotes[26];
37 bool notes[26];
38 };
39
40
41
42 #endif