~ubuntu-branches/ubuntu/karmic/muse/karmic-proposed

« back to all changes in this revision

Viewing changes to midiedit/pianoroll.h

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Kobras
  • Date: 2002-04-23 17:28:23 UTC
  • Revision ID: james.westby@ubuntu.com-20020423172823-w8yplzr81a759xa3
Tags: upstream-0.5.2
ImportĀ upstreamĀ versionĀ 0.5.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
//=========================================================
 
2
//  MusE
 
3
//  Linux Music Editor
 
4
//    $Id: pianoroll.h,v 1.2 2001/11/20 15:19:33 muse Exp $
 
5
//  (C) Copyright 1999 Werner Schweer (ws@seh.de)
 
6
//=========================================================
 
7
 
 
8
#ifndef __PIANOROLL_H__
 
9
#define __PIANOROLL_H__
 
10
 
 
11
#include "noteinfo.h"
 
12
#include "cobject.h"
 
13
#include "midieditor.h"
 
14
#include "tools.h"
 
15
 
 
16
#include <qwidget.h>
 
17
#include <qmainwindow.h>
 
18
 
 
19
class MidiEvent;
 
20
class MidiPart;
 
21
class TimeLabel;
 
22
class PitchLabel;
 
23
class QLabel;
 
24
class PianoCanvas;
 
25
class IntLabel;
 
26
class MTScale;
 
27
class Track;
 
28
class QToolButton;
 
29
class QPushButton;
 
30
class CtrlEdit;
 
31
class Splitter;
 
32
class PartList;
 
33
class Toolbar1;
 
34
class Xml;
 
35
class QuantConfig;
 
36
class ScrollScale;
 
37
class Event;
 
38
class Part;
 
39
class SoundSource;
 
40
 
 
41
//---------------------------------------------------------
 
42
//   PianoRoll
 
43
//---------------------------------------------------------
 
44
 
 
45
class PianoRoll : public MidiEditor {
 
46
      MidiEvent* selEvent;
 
47
      MidiPart* selPart;
 
48
      int selTick;
 
49
      QPopupMenu *menuEdit, *menuFunctions;
 
50
 
 
51
      NoteInfo* info;
 
52
      QToolButton* srec;
 
53
      QToolButton* midiin;
 
54
 
 
55
      Toolbar1* toolbar;
 
56
      Splitter* splitter;
 
57
 
 
58
      QToolButton* speaker;
 
59
      QToolBar* tools;
 
60
      EditToolBar* tools2;
 
61
 
 
62
      QPopupMenu* eventColor;
 
63
      int colorMode;
 
64
 
 
65
      static int _quantInit, _rasterInit;
 
66
      static int _quantStrengthInit;
 
67
      static int _quantLimitInit;
 
68
      static bool _quantLenInit;
 
69
      static int _toInit;
 
70
      static int colorModeInit;
 
71
 
 
72
      int _quantStrength;
 
73
      int _quantLimit;
 
74
      int _to;
 
75
      bool _quantLen;
 
76
      QuantConfig* quantConfig;
 
77
      bool _playEvents;
 
78
 
 
79
      Q_OBJECT
 
80
      QWidget* genToolbar(QWidget* parent);
 
81
      virtual void closeEvent(QCloseEvent*);
 
82
      virtual void keyPressEvent(QKeyEvent*);
 
83
 
 
84
   private slots:
 
85
      void setSelection(int, Event*, Part*);
 
86
      void noteinfoChanged(NoteInfo::ValType, int);
 
87
      CtrlEdit* addCtrl();
 
88
      void removeCtrl(CtrlEdit* ctrl);
 
89
      void soloChanged(bool flag);
 
90
      void soloChanged(SoundSource*);
 
91
      void setRaster(int);
 
92
      void setQuant(int);
 
93
      void configQuant();
 
94
      void setQuantStrength(int val) { _quantStrength = val; }
 
95
      void setQuantLimit(int val)    { _quantLimit = val; }
 
96
      void setQuantLen(bool val)     { _quantLen = val; }
 
97
      void cmd(int);
 
98
      void setSteprec(bool);
 
99
      void setTo(int val)            { _to = val; }
 
100
      void setEventColorMode(int);
 
101
      void clipboardChanged(); // enable/disable "Paste"
 
102
      void selectionChanged(); // enable/disable "Copy" & "Paste"
 
103
      void setSpeaker(bool);
 
104
      void setTime(int);
 
105
      void follow(int pos);
 
106
 
 
107
   signals:
 
108
      void deleted(int);
 
109
 
 
110
   public:
 
111
      PianoRoll(PartList*, QWidget* parent = 0, const char* name = 0);
 
112
      ~PianoRoll();
 
113
      virtual void readStatus(Xml&);
 
114
      virtual void writeStatus(int, Xml&) const;
 
115
      static void readConfiguration(Xml&);
 
116
      static void writeConfiguration(int, Xml&);
 
117
      };
 
118
 
 
119
#endif
 
120