3
3
// Linux Music Editor
4
4
// $Id: drumedit.h,v 1.9.2.7 2009/11/16 11:29:33 lunar_shuttle Exp $
5
5
// (C) Copyright 1999 Werner Schweer (ws@seh.de)
7
// This program is free software; you can redistribute it and/or
8
// modify it under the terms of the GNU General Public License
9
// as published by the Free Software Foundation; version 2 of
10
// the License, or (at your option) any later version.
12
// This program is distributed in the hope that it will be useful,
13
// but WITHOUT ANY WARRANTY; without even the implied warranty of
14
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
// GNU General Public License for more details.
17
// You should have received a copy of the GNU General Public License
18
// along with this program; if not, write to the Free Software
19
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
6
21
//=========================================================
8
23
#ifndef __DRUM_EDIT_H__
9
24
#define __DRUM_EDIT_H__
11
28
#include <values.h>
12
29
#include "midieditor.h"
13
30
#include "noteinfo.h"
45
68
//---------------------------------------------------------
47
70
//---------------------------------------------------------
49
72
class DrumEdit : public MidiEditor {
75
MusECore::Event selEvent;
76
MusECore::MidiPart* selPart;
53
78
QMenu* menuEdit, *menuFunctions, *menuFile, *menuSelect;
80
MusEGui::NoteInfo* info;
57
82
QToolButton* midiin;
83
MusEGui::EditToolBar* tools2;
85
MusEGui::Toolbar1* toolbar;
86
MusEGui::Splitter* split1;
87
MusEGui::Splitter* split2;
90
MusEGui::Header* header;
67
92
QComboBox *stepLenWidget;
69
static int _quantInit, _rasterInit;
70
static int _widthInit, _heightInit;
94
static int _rasterInit;
71
95
static int _dlistWidthInit, _dcanvasWidthInit;
73
static int _toInit; //Used in function dialog for applying modification to selection
75
97
QAction *loadAction, *saveAction, *resetAction;
76
QAction *cutAction, *copyAction, *pasteAction, *deleteAction;
77
QAction *fixedAction, *veloAction;
98
QAction *cutAction, *copyAction, *copyRangeAction, *pasteAction, *pasteDialogAction, *deleteAction;
99
QAction *fixedAction, *veloAction, *crescAction, *quantizeAction;
78
100
QAction *sallAction, *snoneAction, *invAction, *inAction , *outAction;
79
101
QAction *prevAction, *nextAction;
82
104
void initShortcuts();
84
106
virtual void closeEvent(QCloseEvent*);
85
107
QWidget* genToolbar(QWidget* parent);
86
virtual void resizeEvent(QResizeEvent*);
87
108
virtual void keyPressEvent(QKeyEvent*);
88
int _to;//TODO: Make this work
89
110
void setHeaderToolTips();
90
111
void setHeaderWhatsThis();
93
114
void setRaster(int);
95
void noteinfoChanged(NoteInfo::ValType type, int val);
115
void noteinfoChanged(MusEGui::NoteInfo::ValType type, int val);
96
116
//CtrlEdit* addCtrl();
97
117
void removeCtrl(CtrlEdit* ctrl);
109
129
void setStep(QString);
112
void setSelection(int, Event&, Part*);
132
void setSelection(int, MusECore::Event&, MusECore::Part*);
113
133
void soloChanged(bool); // called by Solo button
114
134
void execDeliveredScript(int);
115
135
void execUserScript(int);
118
138
virtual void updateHScrollRange();
120
void deleted(unsigned long);
140
void isDeleting(MusEGui::TopWin*);
123
DrumEdit(PartList*, QWidget* parent = 0, const char* name = 0, unsigned initPos = MAXINT);
143
DrumEdit(MusECore::PartList*, QWidget* parent = 0, const char* name = 0, unsigned initPos = MAXINT);
124
144
virtual ~DrumEdit();
125
virtual void readStatus(Xml&);
126
virtual void writeStatus(int, Xml&) const;
127
static void readConfiguration(Xml& xml);
128
static void writeConfiguration(int, Xml&);
145
virtual void readStatus(MusECore::Xml&);
146
virtual void writeStatus(int, MusECore::Xml&) const;
147
static void readConfiguration(MusECore::Xml& xml);
148
static void writeConfiguration(int, MusECore::Xml&);
151
} // namespace MusEGui