~ubuntu-branches/ubuntu/wily/muse/wily-proposed

« back to all changes in this revision

Viewing changes to muse/midiedit/drumedit.h

  • Committer: Package Import Robot
  • Author(s): Alessio Treglia
  • Date: 2011-12-03 17:12:54 UTC
  • mfrom: (1.1.8)
  • Revision ID: package-import@ubuntu.com-20111203171254-28b1j4lpb46r5jtl
Tags: 2.0~rc1-1
* New upstream RC release.
* Refresh patches, remove those patches not needed anymore.

Show diffs side-by-side

added added

removed removed

Lines of Context:
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)
 
6
//
 
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.
 
11
//
 
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.
 
16
//
 
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.
 
20
//
6
21
//=========================================================
7
22
 
8
23
#ifndef __DRUM_EDIT_H__
9
24
#define __DRUM_EDIT_H__
10
25
 
 
26
#include <QByteArray>
 
27
 
11
28
#include <values.h>
12
29
#include "midieditor.h"
13
30
#include "noteinfo.h"
26
43
class QWidget;
27
44
class QComboBox;
28
45
 
 
46
 
 
47
namespace MusECore {
29
48
class MidiPart;
 
49
class Part;
 
50
class PartList;
 
51
class SNode;
 
52
class Xml;
 
53
}
 
54
 
 
55
namespace MusEGui {
 
56
 
 
57
class CtrlCanvas;
 
58
class CtrlEdit;
 
59
class DList;
30
60
class DrumCanvas;
 
61
class Header;
 
62
class ScoreConfig;
31
63
class ScrollScale;
32
 
class ScoreConfig;
33
 
class MTScale;
34
64
class Splitter;
35
 
class PartList;
36
65
class Toolbar1;
37
 
class CtrlCanvas;
38
 
class Xml;
39
 
class DList;
40
 
class Header;
41
 
class CtrlEdit;
42
 
class Part;
43
 
class SNode;
 
66
 
44
67
 
45
68
//---------------------------------------------------------
46
69
//   DrumEdit
47
70
//---------------------------------------------------------
48
71
 
49
72
class DrumEdit : public MidiEditor {
50
 
      Event selEvent;
51
 
      MidiPart* selPart;
 
73
      Q_OBJECT
 
74
    
 
75
      MusECore::Event selEvent;
 
76
      MusECore::MidiPart* selPart;
52
77
      int selTick;
53
78
      QMenu* menuEdit, *menuFunctions, *menuFile, *menuSelect;
54
79
 
55
 
      NoteInfo* info;
 
80
      MusEGui::NoteInfo* info;
56
81
      QToolButton* srec;
57
82
      QToolButton* midiin;
58
 
      EditToolBar* tools2;
 
83
      MusEGui::EditToolBar* tools2;
59
84
 
60
 
      Toolbar1* toolbar;
61
 
      Splitter* split1;
62
 
      Splitter* split2;
 
85
      MusEGui::Toolbar1* toolbar;
 
86
      MusEGui::Splitter* split1;
 
87
      MusEGui::Splitter* split2;
63
88
      QWidget* split1w1;
64
89
      DList* dlist;
65
 
      Header* header;
 
90
      MusEGui::Header* header;
66
91
      QToolBar* tools;
67
92
      QComboBox *stepLenWidget;
68
93
 
69
 
      static int _quantInit, _rasterInit;
70
 
      static int _widthInit, _heightInit;
 
94
      static int _rasterInit;
71
95
      static int _dlistWidthInit, _dcanvasWidthInit;
72
96
 
73
 
      static int _toInit; //Used in function dialog for applying modification to selection
74
 
 
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;
80
102
 
81
 
      Q_OBJECT
 
103
      
82
104
      void initShortcuts();
83
105
 
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
 
109
 
89
110
      void setHeaderToolTips();
90
111
      void setHeaderWhatsThis();
91
112
 
92
113
   private slots:
93
114
      void setRaster(int);
94
 
      void setQuant(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);
98
118
      void cmd(int);
109
129
      void setStep(QString);
110
130
 
111
131
   public slots:
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);
117
137
      
118
138
      virtual void updateHScrollRange();
119
139
   signals:
120
 
      void deleted(unsigned long);
 
140
      void isDeleting(MusEGui::TopWin*);
121
141
 
122
142
   public:
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&);
129
149
      };
130
150
 
 
151
} // namespace MusEGui
 
152
 
131
153
#endif