1 //=========================================================
2 //  MusE
3 //  Linux Music Editor
4 //    $Id: sclif.h,v 1.1.1.1 2003/10/27 18:54:33 wschweer Exp $
5 
6 //    Copyright (C) 1997  Josef Wilgen
7 //    (C) Copyright 2000 Werner Schweer (ws@seh.de)
8 //
9 //  This program is free software; you can redistribute it and/or
10 //  modify it under the terms of the GNU General Public License
11 //  as published by the Free Software Foundation; version 2 of
12 //  the License, or (at your option) any later version.
13 //
14 //  This program is distributed in the hope that it will be useful,
15 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
16 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 //  GNU General Public License for more details.
18 //
19 //  You should have received a copy of the GNU General Public License
20 //  along with this program; if not, write to the Free Software
21 //  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
22 //
23 //=========================================================
24 
25 #ifndef __SCALE_IF_H__
26 #define __SCALE_IF_H__
27 
28 #include "scldraw.h"
29 
30 namespace MusEGui {
31 
32 //---------------------------------------------------------
33 //   ScaleIf
34 //---------------------------------------------------------
35 
36 class ScaleIf
37       {
38 	bool d_userScale;
39 
40   protected:
41 	ScaleDraw d_scale;
42 	int d_maxMajor;
43 	int d_maxMinor;
44         double d_scaleStep;
hasUserScale()45 	bool hasUserScale() {return d_userScale;}
46 	virtual void scaleChange() = 0;
47 
48   public:
49 	ScaleIf();
~ScaleIf()50       virtual ~ScaleIf() {};
51 
52 	void setScale (double vmin, double vmax, int logarithmic = 0);
53 	void setScale (double vmin, double vmax, double step, int logarithmic = 0);
54 	void setScale(const ScaleDiv &s);
55 	void setScaleMaxMajor( int ticks);
56 	void setScaleMaxMinor( int ticks);
setScaleBackBone(bool v)57         void setScaleBackBone(bool v) { d_scale.setBackBone(v); }
specialText()58         QString specialText() const           { return d_scale.specialText(); }
setSpecialText(const QString & s)59         void setSpecialText(const QString& s) { d_scale.setSpecialText(s); }
60 	void autoScale();
61 
scaleMaxMinor()62 	int scaleMaxMinor() const {return d_maxMinor;}
scaleMaxMajor()63 	int scaleMaxMajor() const {return d_maxMinor;}
scaleStep()64         double scaleStep() const { return d_scaleStep; }
65       };
66 
67 } // namespace MusEGui
68 
69 #endif
70 
71