~ubuntu-branches/ubuntu/quantal/muse/quantal

« back to all changes in this revision

Viewing changes to transport.h

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Kobras
  • Date: 2005-08-23 17:19:39 UTC
  • mto: (4.1.1 breezy) (1.1.9) (10.1.6 sid)
  • mto: This revision was merged to the branch mainline in revision 5.
  • Revision ID: james.westby@ubuntu.com-20050823171939-hd8fgzokb4dbj007
Tags: upstream-0.7.1+0.7.2pre2
ImportĀ upstreamĀ versionĀ 0.7.1+0.7.2pre2

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
//=========================================================
2
 
//  MusE
3
 
//  Linux Music Editor
4
 
//  $Id: transport.h,v 1.1.1.1 2003/10/29 10:05:15 wschweer Exp $
5
 
//
6
 
//  (C) Copyright 1999/2000 Werner Schweer (ws@seh.de)
7
 
//=========================================================
8
 
 
9
 
#ifndef __TRANSPORT_H__
10
 
#define __TRANSPORT_H__
11
 
 
12
 
#include <qwidget.h>
13
 
// #include <qframe.h>
14
 
 
15
 
class QToolButton;
16
 
class QHBox;
17
 
class PosEdit;
18
 
class QSlider;
19
 
class DoubleLabel;
20
 
class SigLabel;
21
 
class QComboBox;
22
 
class Pos;
23
 
 
24
 
//---------------------------------------------------------
25
 
//    TempoSig
26
 
//---------------------------------------------------------
27
 
 
28
 
class TempoSig : public QWidget {
29
 
      DoubleLabel* l1;
30
 
      SigLabel* l2;
31
 
      Q_OBJECT
32
 
 
33
 
   public slots:
34
 
      void setTempo(double);
35
 
      void setTempo(int tempo);
36
 
 
37
 
   signals:
38
 
      void tempoChanged(int);
39
 
      void sigChanged(int, int);
40
 
 
41
 
   public:
42
 
      TempoSig(QWidget* parent);
43
 
      void setTimesig(int a, int b);
44
 
      };
45
 
 
46
 
//---------------------------------------------------------
47
 
//   Handle
48
 
//---------------------------------------------------------
49
 
 
50
 
class Handle : public QWidget {
51
 
      QWidget* rootWin;
52
 
      int dx, dy;
53
 
      void mouseMoveEvent(QMouseEvent* ev);
54
 
      void mousePressEvent(QMouseEvent* ev);
55
 
   public:
56
 
      Handle(QWidget* parent, QWidget* root);
57
 
      };
58
 
 
59
 
class TimeLLabel;
60
 
 
61
 
//---------------------------------------------------------
62
 
//   Transport
63
 
//---------------------------------------------------------
64
 
 
65
 
class Transport : public QWidget
66
 
      {
67
 
      PosEdit* tl1;           // linke Marke
68
 
      PosEdit* tl2;           // rechte Marke
69
 
      PosEdit* time1;         // Tick Time
70
 
      PosEdit* time2;         // SMPTE
71
 
      QSlider* slider;
72
 
      TempoSig* tempo;
73
 
      QHBox* tb;
74
 
      QToolButton* masterButton;
75
 
      QComboBox* recMode;
76
 
      QComboBox* cycleMode;
77
 
      QToolButton* quantizeButton;
78
 
      QToolButton* clickButton;
79
 
      QToolButton* syncButton;
80
 
      QToolButton* buttons[6];      // transport buttons
81
 
 
82
 
      Handle *lefthandle, *righthandle;
83
 
 
84
 
      Q_OBJECT
85
 
 
86
 
   private slots:
87
 
      void cposChanged(const Pos&);
88
 
      void cposChanged(int);
89
 
      void lposChanged(const Pos&);
90
 
      void rposChanged(const Pos&);
91
 
      void setRecMode(int);
92
 
      void setCycleMode(int);
93
 
      void songChanged(int);
94
 
      void syncChanged(bool);
95
 
      void setRecord(bool flag);
96
 
      void stopToggled(bool);
97
 
      void playToggled(bool);
98
 
 
99
 
   public slots:
100
 
      void setTempo(int tempo);
101
 
      void setTimesig(int a, int b);
102
 
      void setPos(int,int, bool);
103
 
      void setMasterFlag(bool);
104
 
      void setClickFlag(bool);
105
 
      void setQuantizeFlag(bool);
106
 
      void setSyncFlag(bool);
107
 
      void setPlay(bool f);
108
 
      void setHandleColor(QColor);
109
 
 
110
 
   public:
111
 
      Transport(QWidget* parent, const char* name = 0);
112
 
      QColor getHandleColor() const { return lefthandle->backgroundColor(); }
113
 
      };
114
 
#endif
115