1 //=============================================================================
2 //  MusE Score
3 //  Linux Music Score Editor
4 //
5 //  Copyright (C) 2010 Werner Schweer and others
6 //
7 //  This program is free software; you can redistribute it and/or modify
8 //  it under the terms of the GNU General Public License version 2.
9 //
10 //  This program is distributed in the hope that it will be useful,
11 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
12 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 //  GNU General Public License for more details.
14 //
15 //  You should have received a copy of the GNU General Public License
16 //  along with this program; if not, write to the Free Software
17 //  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18 //=============================================================================
19 
20 #ifndef __DRUMROLL_H__
21 #define __DRUMROLL_H__
22 
23 namespace Awl {
24       class PitchEdit;
25       class PosLabel;
26       };
27 
28 #include "libmscore/pos.h"
29 #include "libmscore/select.h"
30 
31 namespace Ms {
32 
33 class Score;
34 class Staff;
35 class DrumView;
36 class Note;
37 class Ruler;
38 class Seq;
39 
40 //---------------------------------------------------------
41 //   DrumrollEditor
42 //---------------------------------------------------------
43 
44 class DrumrollEditor : public QMainWindow {
45       Q_OBJECT
46 
47       DrumView* gv;
48       Score* _score;
49       Staff* staff;
50       Awl::PitchEdit* pitch;
51       QSpinBox* velocity;
52       Pos locator[3];
53       QComboBox* veloType;
54       Awl::PosLabel* pos;
55       Ruler* ruler;
56 
57       void updateVelocity(Note* note);
58       void updateSelection();
59       void readSettings();
60 
61    private slots:
62       void selectionChanged();
63       void veloTypeChanged(int);
64       void velocityChanged(int);
65       void keyPressed(int);
66       void keyReleased(int);
67       void moveLocator(int);
68       void cmd(QAction*);
69 
70    public slots:
71       void changeSelection(SelState);
72 
73    public:
74       DrumrollEditor(QWidget* parent = 0);
75       void setStaff(Staff* staff);
score()76       Score* score() const { return _score; }
77       void heartBeat(Seq*);
78       void writeSettings();
79       };
80 
81 
82 
83 } // namespace Ms
84 #endif
85 
86