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

« back to all changes in this revision

Viewing changes to master/master.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: master.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 __MASTER_H__
 
9
#define __MASTER_H__
 
10
 
 
11
#include <qpoint.h>
 
12
 
 
13
#include "view.h"
 
14
#include "song.h"
 
15
#include "tools.h"
 
16
 
 
17
class ScrollScale;
 
18
class QPainter;
 
19
class QRect;
 
20
class MidiEditor;
 
21
 
 
22
//---------------------------------------------------------
 
23
//   Master
 
24
//---------------------------------------------------------
 
25
 
 
26
class Master : public View {
 
27
      enum DragMode { DRAG_OFF, DRAG_NEW, DRAG_MOVE_START, DRAG_MOVE,
 
28
            DRAG_DELETE, DRAG_COPY_START, DRAG_COPY,
 
29
            DRAG_RESIZE, DRAG_LASSO_START, DRAG_LASSO
 
30
            };
 
31
      ScrollScale* vscroll;
 
32
      int pos[3];
 
33
      QPoint start;
 
34
      Tool tool;
 
35
      DragMode drag;
 
36
      MidiEditor* editor;
 
37
 
 
38
      Q_OBJECT
 
39
      virtual void pdraw(QPainter&, const QRect&);
 
40
      virtual void viewMouseMoveEvent(QMouseEvent* event);
 
41
      virtual void leaveEvent(QEvent*e);
 
42
      virtual void viewMousePressEvent(QMouseEvent* event);
 
43
      virtual void viewMouseReleaseEvent(QMouseEvent*);
 
44
 
 
45
      void draw(QPainter&, const QRect&);
 
46
      void newVal(int x1, int x2, int y);
 
47
      bool deleteVal1(int x1, int x2);
 
48
      void deleteVal(int x1, int x2);
 
49
 
 
50
   signals:
 
51
      void followEvent(int);
 
52
      void xposChanged(int);
 
53
      void yposChanged(int);
 
54
      void timeChanged(int);
 
55
      void tempoChanged(int);
 
56
 
 
57
   public slots:
 
58
      void setPos(int, int, bool adjustScrollbar);
 
59
      void setTool(int t);
 
60
 
 
61
   public:
 
62
      Master(MidiEditor*, QWidget* parent, int xmag, int ymag);
 
63
      };
 
64
 
 
65
#endif
 
66