Canorus  0.7
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
timesignature.h
Go to the documentation of this file.
1 
8 #ifndef TIMESIGNATURE_H_
9 #define TIMESIGNATURE_H_
10 
11 #include <QString>
12 
13 #include "core/muselement.h"
14 #include "core/staff.h"
15 
16 class CAContext;
17 
18 class CATimeSignature : public CAMusElement {
19  public:
21  Classical, // Ordinary numbers, C for 4/4, C| for 2/2
22  Number, // Force to always show numbers!
26  };
27 
28  CATimeSignature(int beats, int beat, CAStaff *staff, int startTime, CATimeSignatureType type = Classical);
29 
32  CAStaff *staff() { return static_cast<CAStaff*>(context()); }
33 
34  int beats() { return _beats; }
35  void setBeats(int beats) { _beats = beats; }
36 
37  int beat() { return _beat; }
38  void setBeat(int beat) { _beat = beat; }
39 
41 
42  const QString timeSignatureML(); // Deprecated
43  const QString timeSignatureTypeML(); // Deprecated
44 
45  static const QString timeSignatureTypeToString(CATimeSignatureType);
47 
48  int compare(CAMusElement *elt);
49 
50  private:
51  int _beats;
52  int _beat;
54 };
55 #endif /*TIMESIGNATURE_H_*/