|
Canorus
0.7
|
Lyrics under the note. More...
#include <syllable.h>

Public Member Functions | |
| CASyllable (QString text, bool hyphen, bool melisma, CALyricsContext *context, int timeStart, int timeLength, CAVoice *voice=0) | |
| ~CASyllable () | |
| void | clear () |
| bool | hyphenStart () |
| void | setHyphenStart (bool h) |
| bool | melismaStart () |
| void | setMelismaStart (bool m) |
| QString | text () |
| void | setText (QString text) |
| CAVoice * | associatedVoice () |
| void | setAssociatedVoice (CAVoice *v) |
| CALyricsContext * | lyricsContext () |
| CASyllable * | clone (CAContext *context) |
| int | compare (CAMusElement *) |
Private Attributes | |
| bool | _hyphenStart |
| bool | _melismaStart |
| QString | _text |
| CAVoice * | _associatedVoice |
Lyrics under the note.
Copyright (c) 2007-2008, Matevž Jekovec, Canorus development team All Rights Reserved. See AUTHORS for a complete list of authors.
Licensed under the GNU GENERAL PUBLIC LICENSE. See LICENSE.GPL for details.
This class represents one lyrics element above or below the note. It doesn't neccessarily consist of one
syllable or even a word, but can contain multiple syllables and words (using an underscore _ or a dash -).
Syllables are usually stored inside CALyricsContext.
Every lyrics element can finish with a hyphen (a horizontal middle line), with melisma (a horizontal
underscore line) or without line at the end of the word.
Each syllable can have a custom associated voice, if set. Usually parent's (lyrics context) voice is taken.| CASyllable::CASyllable | ( | QString | text, |
| bool | hyphen, | ||
| bool | melisma, | ||
| CALyricsContext * | context, | ||
| int | timeStart, | ||
| int | timeLength, | ||
| CAVoice * | voice = 0 |
||
| ) |
Creates a new lyrics element with the given text, hyphenation hyphen and melisma properties, parent context, timeStart and timeLength. voice is a special per-syllable associated voice (default 0 - takes parent's voice).
References setAssociatedVoice(), setHyphenStart(), setMelismaStart(), CAMusElement::setMusElementType(), setText(), and CAMusElement::Syllable.
Referenced by clone().


| CAVoice* CASyllable::associatedVoice | ( | ) | [inline] |
References _associatedVoice.
Referenced by clone(), and CAMainWin::onTextEditKeyPressEvent().

| void CASyllable::clear | ( | ) |
Clears the text and sets the default hyphen and melisma settings. This function is usually called when directly deleting the syllable - it shouldn't be actually removed, but only its text set to empty.
References setHyphenStart(), setMelismaStart(), and setText().
Referenced by CAMainWin::deleteSelection().


| CASyllable * CASyllable::clone | ( | CAContext * | context | ) | [virtual] |
Clone the syllable using the given new context. If the given context is not a lyrics context, 0 is used instead.
Implements CAMusElement.
References CAMusElement::addMark(), associatedVoice(), CASyllable(), CAContext::contextType(), hyphenStart(), CAContext::LyricsContext, CAMusElement::markList(), melismaStart(), text(), CAMusElement::timeLength(), and CAMusElement::timeStart().
Referenced by CAMainWin::pasteAt().


| int CASyllable::compare | ( | CAMusElement * | elt | ) | [virtual] |
Compares the music element with the given elt and returns number of differences in their properties. Returns 0, if the music elements are exact; -1 if the music element type differs; otherwise number greater than 0.
This method is usually used when opening a score document where music elements are written in various voices (eg. barlines), but are eventually merged and written only once per staff.
Implements CAMusElement.
References CAMusElement::musElementType(), and CAMusElement::Syllable.

| bool CASyllable::hyphenStart | ( | ) | [inline] |
References _hyphenStart.
Referenced by clone(), CAScoreViewPort::createTextEdit(), and CALilyPondExport::syllableToLilyPond().

| CALyricsContext* CASyllable::lyricsContext | ( | ) | [inline] |
References CAMusElement::_context.
Referenced by CAMainWin::onTextEditKeyPressEvent().

| bool CASyllable::melismaStart | ( | ) | [inline] |
References _melismaStart.
Referenced by clone(), CAScoreViewPort::createTextEdit(), and CALilyPondExport::syllableToLilyPond().

| void CASyllable::setAssociatedVoice | ( | CAVoice * | v | ) | [inline] |
References _associatedVoice.
Referenced by CASyllable().

| void CASyllable::setHyphenStart | ( | bool | h | ) | [inline] |
References _hyphenStart.
Referenced by CASyllable(), clear(), CALilyPondImport::importLyricsContextImpl(), and CAMainWin::onTextEditKeyPressEvent().

| void CASyllable::setMelismaStart | ( | bool | m | ) | [inline] |
References _melismaStart.
Referenced by CASyllable(), clear(), CALilyPondImport::importLyricsContextImpl(), and CAMainWin::onTextEditKeyPressEvent().

| void CASyllable::setText | ( | QString | text | ) | [inline] |
Referenced by CASyllable(), clear(), and CAMainWin::onTextEditKeyPressEvent().


| QString CASyllable::text | ( | ) | [inline] |
References _text.
Referenced by CADrawableSyllable::CADrawableSyllable(), clone(), CAScoreViewPort::createTextEdit(), setText(), and CALilyPondExport::syllableToLilyPond().

CAVoice* CASyllable::_associatedVoice [private] |
Referenced by associatedVoice(), and setAssociatedVoice().
bool CASyllable::_hyphenStart [private] |
Referenced by hyphenStart(), and setHyphenStart().
bool CASyllable::_melismaStart [private] |
Referenced by melismaStart(), and setMelismaStart().
QString CASyllable::_text [private] |
1.8.0