~ubuntu-branches/ubuntu/oneiric/muse/oneiric

« back to all changes in this revision

Viewing changes to arranger/arranger.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: arranger.h,v 1.3 2001/12/04 09:36:17 muse Exp $
 
5
//  (C) Copyright 1999 Werner Schweer (ws@seh.de)
 
6
//=========================================================
 
7
 
 
8
#ifndef __ARRANGER_H__
 
9
#define __ARRANGER_H__
 
10
 
 
11
#include <qwidget.h>
 
12
#include <qheader.h>
 
13
#include <qwhatsthis.h>
 
14
 
 
15
#include "midieditor.h"
 
16
#include "progname.h"
 
17
#include "pcanvas.h"
 
18
#include "ssource.h"
 
19
 
 
20
class QToolButton;
 
21
class Header;
 
22
class TList;
 
23
class ScrollScale;
 
24
class MTScale;
 
25
class IntLabel;
 
26
class QLineEdit;
 
27
class LabelEntry;
 
28
class Track;
 
29
class Xml;
 
30
class QComboBox;
 
31
class Splitter;
 
32
class LabelCombo;
 
33
class QLabel;
 
34
class PosLabel;
 
35
class QCheckBox;
 
36
class QSpinBox;
 
37
class TrackInfoBase;
 
38
 
 
39
class TWhatsThis : public QWhatsThis {
 
40
      Header* header;
 
41
   protected:
 
42
      QString text(const QPoint&);
 
43
   public:
 
44
      TWhatsThis(QWidget* parent, Header* h) : QWhatsThis(parent) {
 
45
            header = h;
 
46
            }
 
47
      };
 
48
 
 
49
//---------------------------------------------------------
 
50
//   Arranger
 
51
//---------------------------------------------------------
 
52
 
 
53
class Arranger : public QWidget {
 
54
      int _quant, _raster;
 
55
      PartCanvas* canvas;
 
56
      ScrollScale* hscroll;
 
57
      ScrollScale* vscroll;
 
58
      TList* list;
 
59
      Header* header;
 
60
      MTScale* time;
 
61
      QSpinBox* lenEntry;
 
62
      bool showTrackinfo;
 
63
 
 
64
      TrackInfoBase* midiTrackInfo;
 
65
      QWidget* waveTrackInfo;
 
66
      QWidget* noTrackInfo;
 
67
 
 
68
      QLineEdit* iwName;
 
69
      QLabel* ifName;
 
70
      QComboBox* iChannels;
 
71
 
 
72
      QCheckBox* midiThru;
 
73
 
 
74
      Track* selected;
 
75
      QToolButton* solo;
 
76
 
 
77
      LabelCombo* typeBox;
 
78
      QToolButton* ib;
 
79
      int trackInfoType;
 
80
      Splitter* split;
 
81
      QPopupMenu* pop;
 
82
      QPopupMenu* subPop[PROG_GROUPS];
 
83
      int songType;
 
84
      QString _bgPixmap;
 
85
      PosLabel* cursorPos;
 
86
 
 
87
      int trackInfoSize;
 
88
 
 
89
      Q_OBJECT
 
90
      void genTrackInfo(QWidget* parent);
 
91
      void genMidiTrackInfo();
 
92
      void genWaveTrackInfo();
 
93
      void updateMidiTrackInfo();
 
94
      void updateWaveTrackInfo();
 
95
      void updateNoTrackInfo();
 
96
 
 
97
   private slots:
 
98
      void _setRaster(int);
 
99
      void songlenChanged(int);
 
100
      void showInspector(bool);
 
101
      void trackSelectionChanged();
 
102
 
 
103
      void iNameChanged();
 
104
      void nameChanged(const QString&);
 
105
      void iHBankChanged(int);
 
106
      void iLBankChanged(int);
 
107
      void iInputChannelChanged(const QString&);
 
108
      void iOutputChannelChanged(int);
 
109
      void iInputPortChanged(const QString&);
 
110
      void iOutputPortChanged(int);
 
111
      void iProgramChanged(int);
 
112
      void iLautstChanged(int);
 
113
      void iTranspChanged(int);
 
114
      void iAnschlChanged(int);
 
115
      void iVerzChanged(int);
 
116
      void iLenChanged(int);
 
117
      void iKomprChanged(int);
 
118
      void iPanChanged(int);
 
119
      void updateInspector();
 
120
      void setPartColor(int);
 
121
      void songChanged(int);
 
122
      void soloChanged(SoundSource*);
 
123
      void modeChange(int);
 
124
      void instrPopup();
 
125
      void iChannelsChanged(int);
 
126
//      void iwNameChanged();
 
127
      void setTime(int);
 
128
      void recFileDialog();
 
129
      void midiThruChanged(bool);
 
130
      void headerMoved();
 
131
 
 
132
   signals:
 
133
      void editPart(Track*);
 
134
      void soloChanged(bool, Track*);
 
135
      void selectionChanged();
 
136
      void dropFile(const QString&);
 
137
      void startEditor(PartList*, int);
 
138
 
 
139
   public slots:
 
140
      void dclickPart(Track*);
 
141
      void setTool(int);
 
142
      void setActivityMode(int);
 
143
      void setActivityColor(QColor);
 
144
      void setSelectedTrackColor(QColor c);
 
145
      void soloChanged(bool flag);
 
146
 
 
147
   public:
 
148
      enum { CMD_CUT_PART, CMD_COPY_PART, CMD_PASTE_PART };
 
149
 
 
150
      Arranger(MainWindow* parent, const char* name = 0);
 
151
      void setBgPixmap(const QString&);
 
152
      const QString bgPixmap() const { return _bgPixmap; }
 
153
      void setMode(int);
 
154
      void reset();
 
155
      int showPartType() const;
 
156
      int showPartEvent() const;
 
157
      void setShowPartType(int val);
 
158
      void setShowPartEvent(int val);
 
159
 
 
160
      void writeStatus(int level, Xml&);
 
161
      void readStatus(Xml&);
 
162
 
 
163
      Track* curTrack() const { return selected; }
 
164
      void cmd(int);
 
165
      bool isSingleSelection() { return canvas->isSingleSelection(); }
 
166
      int getActivityMode() const;
 
167
      QColor getActivityColor() const;
 
168
      QColor getSelectedTrackColor() const;
 
169
      void setGrid(bool);
 
170
      bool hasGrid();
 
171
      };
 
172
#endif
 
173