1
//=========================================================
4
// $Id: key.h,v 1.2 2001/11/20 15:19:31 muse Exp $
6
// (C) Copyright 1999/2000 Werner Schweer (ws@seh.de)
7
//=========================================================
17
//---------------------------------------------------------
19
//---------------------------------------------------------
22
static int offsets[14];
26
NKey(int k) { val = k; }
27
void draw(QPainter& p, const QPoint& pt) const;
28
int idx() const { return val; }
29
int offset() const { return offsets[val]; }
31
void write(int, Xml&) const;
32
void set(int n) { val = n; }
36
//---------------------------------------------------------
38
//---------------------------------------------------------
41
int val; // 1 = 1 sharp, -1 1 flat
44
Scale() { val = 0; minor = false; }
45
Scale(int s, bool m = false) { val = s; minor = m; }
46
void draw(NKey&, QPainter&, const QPoint&) const;
47
void print(NKey& key, FILE* f, const QPoint& pto) const;
48
int idx() const { return val; }
50
void write(int, Xml&) const;
51
void set(int n) { val = n; }
52
void setMajorMinor(bool f) { minor = f; } // true == minor