|
Canorus
0.7
|
00001 00008 #ifndef SYLLABLE_H_ 00009 #define SYLLABLE_H_ 00010 00011 #include "core/muselement.h" 00012 #include "core/lyricscontext.h" 00013 00014 #include <QString> 00015 00016 class CAVoice; 00017 class CAContext; 00018 00019 class CASyllable : public CAMusElement { 00020 public: 00021 CASyllable(QString text, bool hyphen, bool melisma, CALyricsContext *context, int timeStart, int timeLength, CAVoice *voice=0); 00022 ~CASyllable(); 00023 void clear(); 00024 00025 inline bool hyphenStart() { return _hyphenStart; } 00026 inline void setHyphenStart(bool h) { _hyphenStart = h; } 00027 inline bool melismaStart() { return _melismaStart; } 00028 inline void setMelismaStart(bool m) { _melismaStart = m; } 00029 inline QString text() { return _text; } 00030 inline void setText(QString text) { _text = text; } 00031 inline CAVoice *associatedVoice() { return _associatedVoice; } 00032 inline void setAssociatedVoice(CAVoice* v) { _associatedVoice = v; } 00033 00034 inline CALyricsContext *lyricsContext() { return static_cast<CALyricsContext*>(_context); } 00035 00036 CASyllable* clone(CAContext* context); 00037 int compare(CAMusElement*); 00038 00039 private: 00040 bool _hyphenStart, _melismaStart; 00041 QString _text; 00042 CAVoice *_associatedVoice; // per-syllable associated voice, 0 if preferred (parent's voice) 00043 }; 00044 00045 #endif /* SYLLABLE_H_ */
1.8.0