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

« back to all changes in this revision

Viewing changes to master/masteredit.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: masteredit.cpp,v 1.1 2002/01/30 14:10:08 muse Exp $
 
4
//    $Id: masteredit.cpp,v 1.1.1.1 2003/10/29 10:06:14 wschweer Exp $
5
5
//  (C) Copyright 1999 Werner Schweer (ws@seh.de)
6
6
//=========================================================
7
7
 
20
20
#include "xml.h"
21
21
#include "lcombo.h"
22
22
#include "doublelabel.h"
23
 
#include "siglabel.h"
 
23
#include "sigedit.h"
24
24
#include "globals.h"
25
25
 
26
26
#include <qtoolbar.h>
59
59
 
60
60
void MasterEdit::songChanged(int type)
61
61
      {
62
 
//      if (type & SC_SIG) {
63
 
//            printf("songChanged SC_SIG\n");
64
 
//            }
65
62
      if (type & SC_TEMPO) {
66
63
            int tempo = tempomap.tempo(song->cpos());
67
64
            curTempo->setValue(double(60000000.0/tempo));
75
72
MasterEdit::MasterEdit()
76
73
   : MidiEditor(0, _rasterInit, 0)
77
74
      {
78
 
      setCaption("MusE: Mastertrack");
 
75
      setCaption(tr("MusE: Mastertrack"));
79
76
      _raster = 0;      // measure
80
 
      setMinimumSize(500, 200);
 
77
      setMinimumSize(400, 300);
 
78
      resize(500, 350);
81
79
 
82
80
      //---------Pulldown Menu----------------------------
83
81
//      QPopupMenu* file = new QPopupMenu(this);
84
82
//      menuBar()->insertItem("&File", file);
85
83
 
86
84
      //---------ToolBar----------------------------------
87
 
      tools = new QToolBar("edit tools", this);
 
85
      tools = new QToolBar(tr("edit tools"), this);
88
86
      undoRedo->addTo(tools);
89
87
 
90
88
      EditToolBar* tools2 = new EditToolBar(this,
91
89
         PointerTool | PencilTool | RubberTool);
92
90
 
93
 
      QToolBar* info = new QToolBar("Info", this);
 
91
      QToolBar* enableMaster = new QToolBar(tr("EnableMaster"), this);
 
92
      QToolButton* enableButton = new QToolButton(enableMaster);
 
93
      enableButton->setToggleButton(true);
 
94
      enableButton->setText(tr("Master"));
 
95
      QToolTip::add(enableButton, tr("use master track"));
 
96
      enableButton->setOn(song->masterFlag());
 
97
      connect(enableButton, SIGNAL(toggled(bool)), song, SLOT(setMasterFlag(bool)));
 
98
 
 
99
      QToolBar* info = new QToolBar(tr("Info"), this);
94
100
      QLabel* label = new QLabel(tr("Cursor"), info);
95
101
      label->setAlignment(AlignRight|AlignVCenter);
96
102
      label->setIndent(3);
99
105
      TempoLabel* tempo = new TempoLabel(info);
100
106
 
101
107
      const char* rastval[] = {
102
 
            "Off", "Bar", "1/2", "1/4", "1/8", "1/16"
 
108
            QT_TR_NOOP("Off"), "Bar", "1/2", "1/4", "1/8", "1/16"
103
109
            };
104
110
      rasterLabel = new LabelCombo(tr("Snap"), info);
105
111
      for (int i = 0; i < 6; i++)
106
 
            rasterLabel->insertItem(rastval[i], i);
 
112
            rasterLabel->insertItem(tr(rastval[i]), i);
107
113
      rasterLabel->setCurrentItem(1);
108
114
      connect(rasterLabel, SIGNAL(activated(int)), SLOT(_setRaster(int)));
109
115
 
110
116
      QToolTip::add(pos, tr("time at cursor position"));
111
117
      QToolTip::add(tempo, tr("tempo at cursor position"));
112
 
//      pos->setFrame(true);
113
 
//      pos->setDark();
114
118
 
115
119
      //---------values for current position---------------
116
120
      new QLabel(tr("CurPos "), info);
117
 
      curTempo = new TempoSpinBox(info);
118
 
      curSig   = new SigLabel(4, 4, info);
119
 
      curSig->setFixedSize(40, 19);
120
 
      curSig->setFrame(true);
 
121
      curTempo = new TempoEdit(info);
 
122
      curSig   = new SigEdit(info);
 
123
      curSig->setValue(Sig(4, 4));
121
124
      QToolTip::add(curTempo, tr("tempo at current position"));
122
125
      QToolTip::add(curSig, tr("time signature at current position"));
123
126
      connect(curSig, SIGNAL(valueChanged(int,int)), song, SLOT(setSig(int,int)));
337
340
            int z, n;
338
341
            int tempo = tempomap.tempo(val);
339
342
            sigmap.timesig(val, z, n);
 
343
            curTempo->blockSignals(true);
 
344
            curSig->blockSignals(true);
340
345
            curTempo->setValue(double(60000000.0/tempo));
341
 
            curSig->setValue(z, n);
 
346
            curSig->setValue(Sig(z, n));
 
347
            curTempo->blockSignals(false);
 
348
            curSig->blockSignals(false);
342
349
            }
343
350
      }