summaryrefslogtreecommitdiff
path: root/muse2/muse/liste/editevent.h
blob: 51ba80d0e4641a9ac1304206213e41ed3a78e444 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
//=========================================================
//  MusE
//  Linux Music Editor
//    $Id: editevent.h,v 1.6.2.1 2008/05/21 00:28:53 terminator356 Exp $
//  (C) Copyright 1999 Werner Schweer (ws@seh.de)
//
//  This program is free software; you can redistribute it and/or
//  modify it under the terms of the GNU General Public License
//  as published by the Free Software Foundation; version 2 of
//  the License, or (at your option) any later version.
//
//  This program is distributed in the hope that it will be useful,
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//  GNU General Public License for more details.
//
//  You should have received a copy of the GNU General Public License
//  along with this program; if not, write to the Free Software
//  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
//
//=========================================================

#ifndef __EDIT_EVENT_H__
#define __EDIT_EVENT_H__

#include "ui_editnotedialogbase.h"
#include "ui_editsysexdialogbase.h"
#include "ui_editctrlbase.h"
#include "event.h"

class QDialog;
class QLabel;
class QGridLayout;
class QTextEdit;
class QRadioButton;
class QListWidgetItem;
class QMenu;

namespace Awl {
      class PosEdit;
      };

namespace MusECore {
class MidiPart;
}

namespace MusEGui {

class IntLabel;
class PitchEdit;
///class PosEdit;


//---------------------------------------------------------
//   EditEventDialog
//---------------------------------------------------------

class EditEventDialog : public QDialog {
      Q_OBJECT

   protected:
      QGridLayout* layout1;

   public:
      EditEventDialog(QWidget* parent=0);
      virtual MusECore::Event event() = 0;
      };

//---------------------------------------------------------
//   EditNoteDialog
//---------------------------------------------------------

class EditNoteDialog : public QDialog, public Ui::EditNoteDialogBase {
      Q_OBJECT

   public:
      EditNoteDialog(int tick, const MusECore::Event&,
         QWidget* parent=0);
      static MusECore::Event getEvent(int tick, const MusECore::Event&,
         QWidget* parent = 0);
      virtual MusECore::Event event();
      };

//---------------------------------------------------------
//   EditSysExDialog
//---------------------------------------------------------

class EditSysexDialog : public QDialog, public Ui::EditSysexDialogBase {
      Q_OBJECT

      unsigned char* sysex;
      int len;

   protected:
      QGridLayout* layout;

   private slots:
      virtual void accept();

   public:
      EditSysexDialog(int tick, const MusECore::Event&,
         QWidget* parent=0);
      ~EditSysexDialog();
      static MusECore::Event getEvent(int tick, const MusECore::Event&,
         QWidget* parent = 0);
      virtual MusECore::Event event();
      };

//---------------------------------------------------------
//   EditCtrlDialog
//---------------------------------------------------------

class EditCtrlDialog : public QDialog, public Ui::EditCtrlBase  {
      Q_OBJECT

      int num;          // controller number
      int val;          // controller value (for prog. changes)

      const MusECore::MidiPart* part;
      ///QMenu* pop;

      void updatePatch();

   private slots:
      void ctrlListClicked(QListWidgetItem*);
      void newController();
      void programChanged();
      void instrPopup();

   protected:
      QGridLayout* layout;


   public:
      EditCtrlDialog(int tick, const MusECore::Event&,
         const MusECore::MidiPart*, QWidget* parent=0);
      static MusECore::Event getEvent(int tick, const MusECore::Event&, const MusECore::MidiPart*,
         QWidget* parent = 0);
      virtual MusECore::Event event();
      };

//---------------------------------------------------------
//   EditMetaDialog
//---------------------------------------------------------

class EditMetaDialog : public EditEventDialog {
      Q_OBJECT

      unsigned char* meta;
      int len;
      ///PosEdit* epos;
      Awl::PosEdit* epos;
      QTextEdit* edit;
      MusEGui::IntLabel* il2;
      QRadioButton* hexButton;
      QLabel* typeLabel;

   protected:
      QGridLayout* layout;

   private slots:
      virtual void accept();
      void toggled(bool);
      void typeChanged(int);

   public:
      EditMetaDialog(int tick, const MusECore::Event&,
         QWidget* parent=0);
      ~EditMetaDialog();
      static MusECore::Event getEvent(int tick, const MusECore::Event&,
         QWidget* parent = 0);
      virtual MusECore::Event event();
      };

//---------------------------------------------------------
//   EditCAfterDialog
//---------------------------------------------------------

class EditCAfterDialog : public EditEventDialog {
      Q_OBJECT

      ///PosEdit* epos;
      Awl::PosEdit* epos;
      MusEGui::IntLabel* il2;

   protected:
      QGridLayout* layout;

   public:
      EditCAfterDialog(int tick, const MusECore::Event&,
         QWidget* parent=0);
      static MusECore::Event getEvent(int tick, const MusECore::Event&,
         QWidget* parent = 0);
      virtual MusECore::Event event();
      };

//---------------------------------------------------------
//   EditPAfterDialog
//---------------------------------------------------------

class EditPAfterDialog : public EditEventDialog {
      Q_OBJECT

      ///PosEdit* epos;
      Awl::PosEdit* epos;
      MusEGui::PitchEdit* pl;
      MusEGui::IntLabel* il2;

   protected:
      QGridLayout* layout;

   public:
      EditPAfterDialog(int tick, const MusECore::Event&,
         QWidget* parent=0);
      static MusECore::Event getEvent(int tick, const MusECore::Event&,
         QWidget* parent = 0);
      virtual MusECore::Event event();
      };

} // namespace MusEGui

#endif