summaryrefslogtreecommitdiff
path: root/attic/muse_qt4_evolution/muse/strip.h
blob: 1e5f7bd43610e375616d03f76997cf5092b8df9f (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
//=============================================================================
//  MusE
//  Linux Music Editor
//  $Id:$
//
//  Copyright (C) 2002-2006 by Werner Schweer and others
//
//  This program is free software; you can redistribute it and/or modify
//  it under the terms of the GNU General Public License version 2.
//
//  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., 675 Mass Ave, Cambridge, MA 02139, USA.
//=============================================================================

#ifndef __STRIP_H__
#define __STRIP_H__

#include "globaldefs.h"
#include "gui.h"

class Track;
class Meter;
class SimpleButton;
class Mixer;

static const QSize entrySize(STRIP_WIDTH/2-2, ENTRY_HEIGHT);

//---------------------------------------------------------
//   Strip
//---------------------------------------------------------

class Strip : public QFrame {
      Q_OBJECT

   protected:
      Mixer* mixer;
      Track* track;
      QLabel* label;
      QGridLayout* grid;

      SimpleButton* solo;
      SimpleButton* mute;
      SimpleButton* ar;
      SimpleButton* aw;

      void updateLabel();
      bool _align;      // align elements for mixer app

      void recordToggled(bool);
      void addAutomationButtons(int row);
      void addMidiInPorts(QMenu* menu, Track* dtrack, int channel);
      void addMidiOutPorts(QMenu* menu, Track* strack, int channel);

   public slots:
      void resetPeaks();
      virtual void songChanged(int) = 0;
      virtual void controllerChanged(int) {}
      void configChanged();

   public:
      Strip(Mixer* m, Track* t, bool align);
      ~Strip();
      Track* getTrack() const { return track; }
      virtual void heartBeat() = 0;
      virtual QSize sizeHint() const { return QSize(STRIP_WIDTH, 80); }
      };

#endif