summaryrefslogtreecommitdiff
path: root/attic/muse_qt4_evolution/midiplugins/metronom/metronomgui.cpp
blob: e6705f7c6e47c82c2b456c6efd2962d367832203 (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
//=========================================================
//  MusE
//  Linux Music Editor
//  $Id: metronomgui.cpp,v 1.2 2005/10/05 17:02:03 lunar_shuttle Exp $
//
//  (C) Copyright 2005 Werner Schweer (ws@seh.de)
//=========================================================

#include "metronomgui.h"
#include "metronom.h"

//---------------------------------------------------------
//   MidiMetronomConfig
//---------------------------------------------------------

MetronomGui::MetronomGui(Metronom* f, QWidget* parent)
  : QDialog(parent)
      {
      setupUi(this);
      metronom = f;
      init();
      connect(beatNote, SIGNAL(valueChanged(int)), SLOT(beatNoteChanged(int)));
      connect(measureVelocity, SIGNAL(valueChanged(int)), SLOT(measureVelocityChanged(int)));
      connect(measureNote, SIGNAL(valueChanged(int)), SLOT(measureNoteChanged(int)));
      connect(beatVelocity, SIGNAL(valueChanged(int)), SLOT(beatVelocityChanged(int)));
      }

//---------------------------------------------------------
//   init
//---------------------------------------------------------

void MetronomGui::init()
      {
      beatNote->setValue(metronom->data.beatNote);
      measureNote->setValue(metronom->data.measureNote);
      beatVelocity->setValue(metronom->data.beatVelo);
      measureVelocity->setValue(metronom->data.measureVelo);
      }

//---------------------------------------------------------
//   beatNoteChanged
//---------------------------------------------------------

void MetronomGui::beatNoteChanged(int val)
      {
      metronom->data.beatNote = val;
      }

//---------------------------------------------------------
//   measureVelocityChanged
//---------------------------------------------------------

void MetronomGui::measureVelocityChanged(int val)
      {
      metronom->data.measureVelo = val;
      }

//---------------------------------------------------------
//   measureNoteChanged
//---------------------------------------------------------

void MetronomGui::measureNoteChanged(int val)
      {
      metronom->data.measureNote = val;
      }

//---------------------------------------------------------
//   beatVelocityChanged
//---------------------------------------------------------

void MetronomGui::beatVelocityChanged(int val)
      {
      metronom->data.beatVelo = val;
      }