summaryrefslogtreecommitdiff
path: root/muse2/muse/mplugins/mrconfig.cpp
blob: 1a55c826e4ece175b803b6152817a1bb65855f35 (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
76
77
78
//=========================================================
//  MusE
//  Linux Music Editor
//  $Id: mrconfig.cpp,v 1.1.1.1 2003/10/27 18:52:43 wschweer Exp $
//
//  (C) Copyright 2001 Werner Schweer (ws@seh.de)
//=========================================================

#include "pitchedit.h"
#include "mrconfig.h"
#include "globals.h"

#include <QCloseEvent>

//---------------------------------------------------------
//   MRConfig
//    Midi Remote Control Config
//---------------------------------------------------------

MRConfig::MRConfig(QWidget* parent, Qt::WFlags fl)
   : QWidget(parent, fl)
      {
      setupUi(this);
      b1->setChecked(rcEnable);
      sb1->setValue(rcStopNote);
      sb2->setValue(rcRecordNote);
      sb3->setValue(rcGotoLeftMarkNote);
      sb4->setValue(rcPlayNote);
      steprec_box->setValue(rcSteprecNote);

      connect(b1,  SIGNAL(toggled(bool)), SLOT(setRcEnable(bool)));
      connect(sb1, SIGNAL(valueChanged(int)), SLOT(setRcStopNote(int)));
      connect(sb2, SIGNAL(valueChanged(int)), SLOT(setRcRecordNote(int)));
      connect(sb3, SIGNAL(valueChanged(int)), SLOT(setRcGotoLeftMarkNote(int)));
      connect(sb4, SIGNAL(valueChanged(int)), SLOT(setRcPlayNote(int)));
      connect(steprec_box, SIGNAL(valueChanged(int)), SLOT(setRcSteprecNote(int)));
      }

//---------------------------------------------------------
//   closeEvent
//---------------------------------------------------------

void MRConfig::closeEvent(QCloseEvent* ev)
      {
      emit hideWindow();
      QWidget::closeEvent(ev);
      }

void MRConfig::setRcEnable(bool f)
      {
      rcEnable = f;
      }

void MRConfig::setRcStopNote(int val)
      {
      rcStopNote = val;
      }

void MRConfig::setRcRecordNote(int val)
      {
      rcRecordNote = val;
      }

void MRConfig::setRcGotoLeftMarkNote(int val)
      {
      rcGotoLeftMarkNote = val;
      }

void MRConfig::setRcPlayNote(int val)
      {
      rcPlayNote = val;
      }

void MRConfig::setRcSteprecNote(int val)
      {
      rcSteprecNote = val;
      }