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

« back to all changes in this revision

Viewing changes to mplugins/midifilterimpl.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: midifilterimpl.h,v 1.1 2001/11/29 11:19:34 muse Exp $
 
5
//
 
6
//  (C) Copyright 1999/2000 Werner Schweer (ws@seh.de)
 
7
//=========================================================
 
8
 
 
9
#ifndef __MIDIFILTERIMP_H__
 
10
#define __MIDIFILTERIMP_H__
 
11
 
 
12
#include "globals.h"
 
13
#include "midifilter.h"
 
14
 
 
15
//---------------------------------------------------------
 
16
//   MidiFilterConfig
 
17
//---------------------------------------------------------
 
18
 
 
19
class MidiFilterConfig : public MidiFilterConfigBase {
 
20
      Q_OBJECT
 
21
 
 
22
      void rChanged(bool f, int val) {
 
23
            if (f)
 
24
                  midiRecordType |= val;
 
25
            else
 
26
                  midiRecordType &= ~val;
 
27
            }
 
28
      void tChanged(bool f, int val) {
 
29
            if (f)
 
30
                  midiThruType |= val;
 
31
            else
 
32
                  midiThruType &= ~val;
 
33
            }
 
34
      void chChanged(bool f, int val) {
 
35
            if (f)
 
36
                  midiInputChannel |= val;
 
37
            else
 
38
                  midiInputChannel &= ~val;
 
39
            }
 
40
      virtual void closeEvent(QCloseEvent*);
 
41
 
 
42
   signals:
 
43
      void hideWindow();
 
44
 
 
45
   private slots:
 
46
      void channelChanged1(bool f)  { chChanged(f, 0x01);   }
 
47
      void channelChanged2(bool f)  { chChanged(f, 0x02);   }
 
48
      void channelChanged3(bool f)  { chChanged(f, 0x04);   }
 
49
      void channelChanged4(bool f)  { chChanged(f, 0x08);   }
 
50
      void channelChanged5(bool f)  { chChanged(f, 0x10);   }
 
51
      void channelChanged6(bool f)  { chChanged(f, 0x20);   }
 
52
      void channelChanged7(bool f)  { chChanged(f, 0x40);   }
 
53
      void channelChanged8(bool f)  { chChanged(f, 0x80);   }
 
54
      void channelChanged9(bool f)  { chChanged(f, 0x100);  }
 
55
      void channelChanged10(bool f) { chChanged(f, 0x200);  }
 
56
      void channelChanged11(bool f) { chChanged(f, 0x400);  }
 
57
      void channelChanged12(bool f) { chChanged(f, 0x800);  }
 
58
      void channelChanged13(bool f) { chChanged(f, 0x1000); }
 
59
      void channelChanged14(bool f) { chChanged(f, 0x2000); }
 
60
      void channelChanged15(bool f) { chChanged(f, 0x4000); }
 
61
      void channelChanged16(bool f) { chChanged(f, 0x8000); }
 
62
 
 
63
      void recordChanged1(bool f)   { rChanged(f, 1);  }
 
64
      void recordChanged2(bool f)   { rChanged(f, 2);  }
 
65
      void recordChanged3(bool f)   { rChanged(f, 4);  }
 
66
      void recordChanged4(bool f)   { rChanged(f, 8);  }
 
67
      void recordChanged5(bool f)   { rChanged(f, 16); }
 
68
      void recordChanged6(bool f)   { rChanged(f, 32); }
 
69
      void recordChanged7(bool f)   { rChanged(f, 64); }
 
70
 
 
71
      void thruChanged1(bool f)     { tChanged(f, 1);  }
 
72
      void thruChanged2(bool f)     { tChanged(f, 2);  }
 
73
      void thruChanged3(bool f)     { tChanged(f, 4);  }
 
74
      void thruChanged4(bool f)     { tChanged(f, 8);  }
 
75
      void thruChanged5(bool f)     { tChanged(f, 16); }
 
76
      void thruChanged6(bool f)     { tChanged(f, 32); }
 
77
      void thruChanged7(bool f)     { tChanged(f, 64); }
 
78
 
 
79
      void setCtrl1(int);
 
80
      void setCtrl2(int);
 
81
      void setCtrl3(int);
 
82
      void setCtrl4(int);
 
83
 
 
84
   public:
 
85
      MidiFilterConfig(QWidget* parent=0, const char* name=0);
 
86
      };
 
87
 
 
88
#endif
 
89
 
 
90