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

« back to all changes in this revision

Viewing changes to widgets/sigedit.h

  • 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
//=========================================================
 
2
//  MusE
 
3
//  Linux Music Editor
 
4
//    $Id: sigedit.h,v 1.1.1.1 2003/10/29 10:06:32 wschweer Exp $
 
5
//  (C) Copyright 2002 Werner Schweer (ws@seh.de)
 
6
//=========================================================
 
7
 
 
8
#ifndef __SIGEDIT_H__
 
9
#define __SIGEDIT_H__
 
10
 
 
11
#include <qwidget.h>
 
12
#include <qstring.h>
 
13
 
 
14
class SigEditor;
 
15
class QSpinWidget;
 
16
 
 
17
struct Sig {
 
18
      int z;
 
19
      int n;
 
20
   public:
 
21
      Sig(int _z, int _n) : z(_z), n(_n) {}
 
22
      };
 
23
 
 
24
#include "section.h"
 
25
 
 
26
//---------------------------------------------------------
 
27
//   SigEdit
 
28
//---------------------------------------------------------
 
29
 
 
30
class SigEdit : public QWidget
 
31
      {
 
32
      Q_OBJECT
 
33
      void init();
 
34
 
 
35
      QString sectionText(int sec);
 
36
      Section sec[2];
 
37
 
 
38
      bool adv;
 
39
      bool overwrite;
 
40
      int timerId;
 
41
      bool typing;
 
42
      bool changed;
 
43
      SigEditor *ed;
 
44
      QSpinWidget* controls;
 
45
 
 
46
   private slots:
 
47
      void stepUp();
 
48
      void stepDown();
 
49
 
 
50
   signals:
 
51
      void valueChanged(int, int);
 
52
 
 
53
   protected:
 
54
      bool event(QEvent *e );
 
55
      void timerEvent(QTimerEvent* e);
 
56
      void resizeEvent(QResizeEvent*);
 
57
      QString sectionFormattedText(int sec);
 
58
      void addNumber(int sec, int num);
 
59
      void removeLastNumber(int sec);
 
60
      bool setFocusSection(int s);
 
61
 
 
62
      virtual bool outOfRange(int, int) const;
 
63
      virtual void setSec(int, int);
 
64
      friend class SigEditor;
 
65
 
 
66
   protected slots:
 
67
      void updateButtons();
 
68
 
 
69
   public slots:
 
70
      virtual void setValue(const Sig& sig);
 
71
      void setValue(const QString& s);
 
72
 
 
73
   public:
 
74
      SigEdit(QWidget*,  const char* = 0);
 
75
      ~SigEdit();
 
76
 
 
77
      QSize sizeHint() const;
 
78
      Sig sig() const;
 
79
      virtual void setAutoAdvance(bool advance) { adv = advance; }
 
80
      bool autoAdvance() const                  { return adv; }
 
81
      };
 
82
 
 
83
#endif