|
Canorus
0.7
|
00001 00008 #ifndef MARK_H_ 00009 #define MARK_H_ 00010 00011 #include "core/muselement.h" 00012 00013 class CAContext; 00014 00015 class CAMark : public CAMusElement { 00016 public: 00017 enum CAMarkType { 00018 Undefined = -1, 00019 Text, 00020 Tempo, 00021 Ritardando, 00022 Dynamic, 00023 Crescendo, 00024 Pedal, 00025 InstrumentChange, 00026 BookMark, 00027 RehersalMark, 00028 Fermata, 00029 RepeatMark, 00030 Articulation, 00031 Fingering 00032 }; 00033 00034 CAMark( CAMarkType type, CAMusElement *associatedElt, int timeStart=-1, int timeLength=-1 ); 00035 CAMark( CAMarkType type, CAContext *context, int timeStart, int timeLength ); 00036 virtual ~CAMark(); 00037 00038 virtual CAMark *clone(CAContext* context) { CAMark* c = clone(); c->setContext(context); } 00039 virtual CAMark *clone(CAMusElement* elt=0); 00040 virtual int compare( CAMusElement* elt ); 00041 00042 inline CAMusElement *associatedElement() { return _associatedElt; } 00043 inline void setAssociatedElement( CAMusElement* elt ) { _associatedElt = elt; if(elt) _context = elt->context(); } 00044 00045 inline CAMarkType markType() { return _markType; } 00046 inline void setMarkType( CAMarkType type ) { _markType = type; } 00047 00048 inline bool isCommon() { return _common; } 00049 00050 static const QString markTypeToString( CAMarkType t ); 00051 static CAMarkType markTypeFromString( const QString s ); 00052 00053 protected: 00054 inline void setCommon( bool c ) { _common=c; } 00055 00056 private: 00057 CAMusElement *_associatedElt; 00058 CAMarkType _markType; 00059 bool _common; // is mark assigned to a single element only or the whole chord - depends who deletes it! 00060 }; 00061 00062 #endif /* MARK_H_ */
1.8.0