~ubuntu-branches/ubuntu/oneiric/muse/oneiric

« back to all changes in this revision

Viewing changes to value.h

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Kobras
  • Date: 2002-04-23 17:28:23 UTC
  • Revision ID: james.westby@ubuntu.com-20020423172823-w8yplzr81a759xa3
Tags: upstream-0.5.2
ImportĀ upstreamĀ versionĀ 0.5.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
//=========================================================
 
2
//  MusE
 
3
//  Linux Music Editor
 
4
//  $Id: value.h,v 1.2 2001/11/20 15:19:32 muse Exp $
 
5
//
 
6
//  (C) Copyright 2000 Werner Schweer (ws@seh.de)
 
7
//=========================================================
 
8
 
 
9
#ifndef __VALUE_H__
 
10
#define __VALUE_H__
 
11
 
 
12
#include <qobject.h>
 
13
 
 
14
class Xml;
 
15
 
 
16
//---------------------------------------------------------
 
17
//   IValue
 
18
//---------------------------------------------------------
 
19
 
 
20
class IValue : public QObject {
 
21
      int val;
 
22
 
 
23
      Q_OBJECT
 
24
 
 
25
   signals:
 
26
      void valueChanged(int);
 
27
 
 
28
   public slots:
 
29
      void setValue(int v);
 
30
 
 
31
   public:
 
32
      IValue(QObject* parent=0, const char* name=0);
 
33
      int value() const    { return val; }
 
34
      void save(int level, Xml& xml);
 
35
      };
 
36
 
 
37
//---------------------------------------------------------
 
38
//   BValue
 
39
//---------------------------------------------------------
 
40
 
 
41
class BValue : public QObject {
 
42
      bool val;
 
43
 
 
44
      Q_OBJECT
 
45
 
 
46
   signals:
 
47
      void valueChanged(bool);
 
48
      void valueChanged(int);
 
49
 
 
50
   public slots:
 
51
      void setValue(bool v);
 
52
      void setValue(int v) { setValue(bool(v)); }
 
53
 
 
54
   public:
 
55
      BValue(QObject* parent=0, const char* name=0);
 
56
      bool value() const    { return val; }
 
57
      void save(int level, Xml& xml);
 
58
      };
 
59
 
 
60
#endif
 
61