Canorus  0.7
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
keysignature.h
Go to the documentation of this file.
1 
8 #ifndef KEYSIGNATURE_H_
9 #define KEYSIGNATURE_H_
10 
11 #include <QString>
12 
13 #include "core/muselement.h"
14 #include "core/diatonickey.h"
15 #include "core/staff.h"
16 
17 class CAContext;
18 
19 class CAKeySignature : public CAMusElement {
20 public:
22  MajorMinor, // Marks the standard 7-level Major/Minor
25  };
26 
27  enum CAModus {
39  };
40 
45  CAStaff *staff() { return static_cast<CAStaff*>(context()); }
46 
49 
51  CAModus modus() { return _modus; }
52 
55 
56  signed char *accidentals() { return _accidentals; }
57 
58  int compare(CAMusElement* elt);
59 
60  static const QString keySignatureTypeToString(CAKeySignatureType);
61  static CAKeySignatureType keySignatureTypeFromString(const QString);
62  static const QString modusToString(CAModus);
63  static CAModus modusFromString(const QString);
64 
65 private:
66  void updateAccidentals();
67 
71 
72  signed char _accidentals[7]; // Accidentals configuration for each level
73 };
74 #endif /* KEYSIGNATURE_H_ */