Canorus  0.7
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Private Attributes
CASyllable Class Reference

Lyrics under the note. More...

#include <syllable.h>

Inheritance diagram for CASyllable:
Inheritance graph
[legend]

List of all members.

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)
CAVoiceassociatedVoice ()
void setAssociatedVoice (CAVoice *v)
CALyricsContextlyricsContext ()
CASyllableclone (CAContext *context)
int compare (CAMusElement *)

Private Attributes

bool _hyphenStart
bool _melismaStart
QString _text
CAVoice_associatedVoice

Detailed Description

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.

Constructor & Destructor Documentation

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().

Here is the call graph for this function:

Here is the caller graph for this function:


Member Function Documentation

References _associatedVoice.

Referenced by clone(), and CAMainWin::onTextEditKeyPressEvent().

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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.

Here is the call graph for this function:

bool CASyllable::hyphenStart ( ) [inline]

References _hyphenStart.

Referenced by clone(), CAScoreViewPort::createTextEdit(), and CALilyPondExport::syllableToLilyPond().

Here is the caller graph for this function:

References CAMusElement::_context.

Referenced by CAMainWin::onTextEditKeyPressEvent().

Here is the caller graph for this function:

bool CASyllable::melismaStart ( ) [inline]

References _melismaStart.

Referenced by clone(), CAScoreViewPort::createTextEdit(), and CALilyPondExport::syllableToLilyPond().

Here is the caller graph for this function:

void CASyllable::setAssociatedVoice ( CAVoice v) [inline]

References _associatedVoice.

Referenced by CASyllable().

Here is the caller graph for this function:

void CASyllable::setHyphenStart ( bool  h) [inline]

References _hyphenStart.

Referenced by CASyllable(), clear(), CALilyPondImport::importLyricsContextImpl(), and CAMainWin::onTextEditKeyPressEvent().

Here is the caller graph for this function:

void CASyllable::setMelismaStart ( bool  m) [inline]

References _melismaStart.

Referenced by CASyllable(), clear(), CALilyPondImport::importLyricsContextImpl(), and CAMainWin::onTextEditKeyPressEvent().

Here is the caller graph for this function:

void CASyllable::setText ( QString  text) [inline]

References _text, and text().

Referenced by CASyllable(), clear(), and CAMainWin::onTextEditKeyPressEvent().

Here is the call graph for this function:

Here is the caller graph for this function:

QString CASyllable::text ( ) [inline]

Member Data Documentation

bool CASyllable::_hyphenStart [private]

Referenced by hyphenStart(), and setHyphenStart().

bool CASyllable::_melismaStart [private]

Referenced by melismaStart(), and setMelismaStart().

QString CASyllable::_text [private]

Referenced by setText(), and text().


The documentation for this class was generated from the following files: