~ubuntu-branches/ubuntu/breezy/muse/breezy

« back to all changes in this revision

Viewing changes to widgets/noteinfo.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Kobras
  • Date: 2004-02-07 15:18:22 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20040207151822-es27xxkzbcxkebjm
Tags: 0.6.3-1
* New upstream version.
* Added patches:
  + [10_alsa_init_fix] New, from upstream CVS.
    Initialize direction variable when setting Alsa parameters.
  + [10_canvas_translation_fix] New, from upstream CVS.
    Do not translate tooltips twice in canvas popup.
  + [10_checkbox_fix] New, from upstream CVS.
    Use proper set/test methods on metronome checkboxes.
  + [10_html_doc_cleanup] New.
    Fix links and HTML errors in documentation.
  + [20_allow_system_timer] New.
    The new upstream version fails by default if the real-time clock
    could not be accessed (usually the case when not running suid-root).
    This patch reverts the old behaviour of falling back to the more
    inaccurate system timer.
* Updated patches:
  + [11_PIC_fixes_fixup] Rediffed.
* Removed patches:
  + [20_no_atomic_asm] Merged upstream.
* debian/compat: Splice out debhelper compatibility level from rules file.
* debian/control: Build-depend on latest jack release by default.
  Closes: #228788
* debian/control: Bump standards version.
* debian/control: Use auto-generated debconf dependency via misc:Depends.
* debian/control: Minor tweaks to the long description.
* debian/control: Tighten fluidsynth build dependency to sane version.
* debian/muse.doc-base: New. Register HTML documentation with doc-base.
* debian/templates: Tiny rewording, and typo fix.
* debian/templates, debian/po/*: Switch to po-debconf for translations.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
//=========================================================
2
2
//  MusE
3
3
//  Linux Music Editor
4
 
//    $Id: noteinfo.cpp,v 1.1 2002/01/30 14:54:03 muse Exp $
 
4
//    $Id: noteinfo.cpp,v 1.1.1.1 2003/10/29 10:06:26 wschweer Exp $
5
5
//  (C) Copyright 1999 Werner Schweer (ws@seh.de)
6
6
//=========================================================
7
7
 
22
22
//    Start, L�nge, Note, Velo an, Velo aus, Kanal
23
23
//---------------------------------------------------
24
24
 
25
 
NoteInfo::NoteInfo(MainWindow* parent)
26
 
   : ToolBar("Note Info", parent)
 
25
NoteInfo::NoteInfo(QMainWindow* parent)
 
26
   : QToolBar(tr("Note Info"), parent)
27
27
      {
28
28
      QLabel* label = new QLabel(tr("Start"), this, "Start");
29
29
      label->setAlignment(AlignRight|AlignVCenter);
50
50
      label->setIndent(3);
51
51
      selVelOff = new QSpinBox(0, 127, 1, this);
52
52
 
53
 
      label = new QLabel(tr("Channel"), this, "Channel");
54
 
      label->setAlignment(AlignRight|AlignVCenter);
55
 
      label->setIndent(3);
56
 
      selChannel = new QSpinBox(1, 16, 1, this);
57
 
 
58
53
      connect(selLen,     SIGNAL(valueChanged(int)), SLOT(lenChanged(int)));
59
54
      connect(selPitch,   SIGNAL(valueChanged(int)), SLOT(pitchChanged(int)));
60
55
      connect(selVelOn,   SIGNAL(valueChanged(int)), SLOT(velOnChanged(int)));
61
56
      connect(selVelOff,  SIGNAL(valueChanged(int)), SLOT(velOffChanged(int)));
62
 
      connect(selChannel, SIGNAL(valueChanged(int)), SLOT(channelChanged(int)));
 
57
      connect(selTime,    SIGNAL(valueChanged(const Pos&)), SLOT(timeChanged(const Pos&)));
63
58
      }
64
59
 
65
60
//---------------------------------------------------------
68
63
 
69
64
void NoteInfo::lenChanged(int val)
70
65
      {
71
 
      emit valueChanged(VAL_LEN, val);
 
66
      if (!signalsBlocked())
 
67
            emit valueChanged(VAL_LEN, val);
72
68
      }
73
69
 
74
70
//---------------------------------------------------------
77
73
 
78
74
void NoteInfo::velOnChanged(int val)
79
75
      {
80
 
      emit valueChanged(VAL_VELON, val);
 
76
      if (!signalsBlocked())
 
77
            emit valueChanged(VAL_VELON, val);
81
78
      }
82
79
 
83
80
//---------------------------------------------------------
86
83
 
87
84
void NoteInfo::velOffChanged(int val)
88
85
      {
89
 
      emit valueChanged(VAL_VELOFF, val);
90
 
      }
91
 
 
92
 
//---------------------------------------------------------
93
 
//   channelChanged
94
 
//---------------------------------------------------------
95
 
 
96
 
void NoteInfo::channelChanged(int val)
97
 
      {
98
 
      emit valueChanged(VAL_CHANNEL, val);
 
86
      if (!signalsBlocked())
 
87
            emit valueChanged(VAL_VELOFF, val);
99
88
      }
100
89
 
101
90
//---------------------------------------------------------
104
93
 
105
94
void NoteInfo::pitchChanged(int val)
106
95
      {
107
 
      emit valueChanged(VAL_PITCH, val);
 
96
      if (!signalsBlocked())
 
97
            emit valueChanged(VAL_PITCH, val);
108
98
      }
109
99
 
110
100
//---------------------------------------------------------
127
117
            case VAL_VELOFF:
128
118
                  selVelOff->setValue(val);
129
119
                  break;
130
 
            case VAL_CHANNEL:
131
 
                  selChannel->setValue(val);
132
 
                  break;
133
120
            case VAL_PITCH:
134
121
                  selPitch->setValue(val);
135
122
                  break;
142
129
//---------------------------------------------------------
143
130
 
144
131
void NoteInfo::setValues(int val1, int val2, int val3, int val4,
145
 
   int val5, int val6)
 
132
   int val5)
146
133
      {
147
134
      blockSignals(true);
148
135
      if (selTime->pos().posTick() != val1)
155
142
            selVelOn->setValue(val4);
156
143
      if (selVelOff->value() != val5)
157
144
            selVelOff->setValue(val5);
158
 
      if (selChannel->value() != val6)
159
 
            selChannel->setValue(val6);
160
145
      blockSignals(false);
161
146
      }
162
147
 
 
148
//---------------------------------------------------------
 
149
//   timeChanged
 
150
//---------------------------------------------------------
 
151
 
 
152
void NoteInfo::timeChanged(const Pos& pos)
 
153
      {
 
154
      if (!signalsBlocked())
 
155
            emit valueChanged(VAL_TIME, pos.posTick());
 
156
      }
 
157