~ubuntu-branches/ubuntu/feisty/muse/feisty

« back to all changes in this revision

Viewing changes to cobject.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: cobject.h,v 1.3 2002/02/17 20:01:17 bob Exp $
 
5
//
 
6
//  (C) Copyright 1999/2000 Werner Schweer (ws@seh.de)
 
7
//=========================================================
 
8
 
 
9
#ifndef __COBJECT_H__
 
10
#define __COBJECT_H__
 
11
 
 
12
#include "config.h"
 
13
 
 
14
#include <list>
 
15
#include "desk.h"
 
16
 
 
17
class Xml;
 
18
 
 
19
//---------------------------------------------------------
 
20
//   TopWin
 
21
//---------------------------------------------------------
 
22
 
 
23
class TopWin : public MainWindow
 
24
      {
 
25
      Q_OBJECT
 
26
 
 
27
   public:
 
28
      virtual void readStatus(Xml&);
 
29
      virtual void writeStatus(int, Xml&) const;
 
30
      TopWin(QWidget* parent=0, const char* name=0,
 
31
         WFlags f = WType_TopLevel|WDestructiveClose);
 
32
      };
 
33
 
 
34
//---------------------------------------------------------
 
35
//   Toplevel
 
36
//---------------------------------------------------------
 
37
 
 
38
class Toplevel {
 
39
   public:
 
40
      enum ToplevelType { PIANO_ROLL, NOTEN, LISTE, DRUM,
 
41
         M_MIXER, MASTER, WAVE, LMASTER, A_MIXER,
 
42
         CLIPLIST, MIXDOWN, MARKER
 
43
#ifdef PATCHBAY
 
44
         , M_PATCHBAY
 
45
#endif /* PATCHBAY */
 
46
         };
 
47
      Toplevel(ToplevelType t, int obj, TopWin* cobj) {
 
48
            _type = t;
 
49
            _object = obj;
 
50
            _cobject = cobj;
 
51
            }
 
52
      ToplevelType type() const { return _type; }
 
53
      int object()        const { return _object; }
 
54
      TopWin* cobject()   const { return _cobject; }
 
55
 
 
56
   private:
 
57
      ToplevelType _type;
 
58
      int _object;
 
59
      TopWin* _cobject;
 
60
      };
 
61
 
 
62
typedef std::list <Toplevel> ToplevelList;
 
63
typedef ToplevelList::iterator iToplevel;
 
64
typedef ToplevelList::const_iterator ciToplevel;
 
65
 
 
66
#endif
 
67