|
Canorus
0.7
|
00001 00008 #ifndef TIMESIGNATURE_H_ 00009 #define TIMESIGNATURE_H_ 00010 00011 #include <QString> 00012 00013 #include "core/muselement.h" 00014 #include "core/staff.h" 00015 00016 class CAContext; 00017 00018 class CATimeSignature : public CAMusElement { 00019 public: 00020 enum CATimeSignatureType { 00021 Classical, // Ordinary numbers, C for 4/4, C| for 2/2 00022 Number, // Force to always show numbers! 00023 Mensural, 00024 Neomensural, 00025 Baroque 00026 }; 00027 00028 CATimeSignature(int beats, int beat, CAStaff *staff, int startTime, CATimeSignatureType type = Classical); 00029 00030 CATimeSignature *clone(CAContext* context=0); 00031 ~CATimeSignature(); 00032 CAStaff *staff() { return static_cast<CAStaff*>(context()); } 00033 00034 int beats() { return _beats; } 00035 void setBeats(int beats) { _beats = beats; } 00036 00037 int beat() { return _beat; } 00038 void setBeat(int beat) { _beat = beat; } 00039 00040 CATimeSignatureType timeSignatureType() { return _timeSignatureType; } 00041 00042 const QString timeSignatureML(); // Deprecated 00043 const QString timeSignatureTypeML(); // Deprecated 00044 00045 static const QString timeSignatureTypeToString(CATimeSignatureType); 00046 static CATimeSignatureType timeSignatureTypeFromString(const QString); 00047 00048 int compare(CAMusElement *elt); 00049 00050 private: 00051 int _beats; 00052 int _beat; 00053 CATimeSignatureType _timeSignatureType; 00054 }; 00055 #endif /*TIMESIGNATURE_H_*/
1.8.0