|
Canorus
0.7
|
#include <lilypondimport.h>

enum CALilyPondImport::CALilyPondDepth [private] |
| CALilyPondImport::CALilyPondImport | ( | const QString | in | ) |
| CALilyPondImport::CALilyPondImport | ( | QTextStream * | in = 0 | ) |
| CALilyPondImport::~CALilyPondImport | ( | ) | [virtual] |
| void CALilyPondImport::addError | ( | QString | description, |
| int | lineError = 0, |
||
| int | charError = 0 |
||
| ) | [private] |
References _curChar, _curLine, and _errors.
Referenced by importVoiceImpl().

| CABarline::CABarlineType CALilyPondImport::barlineTypeFromLilyPond | ( | const QString | bar | ) | [private] |
Genarates barline type from the LilyPond syntax for the given barline from format "barlineType".
References CABarline::Dotted, CABarline::Double, CABarline::End, CABarline::RepeatClose, CABarline::RepeatCloseOpen, CABarline::RepeatOpen, CABarline::Single, and CAImport::Undefined.
Referenced by importVoiceImpl().

| int CALilyPondImport::clefOffsetFromLilyPond | ( | const QString | constClef | ) | [private] |
Returns the Canorus octava or whichever interval above or below the clef.
Referenced by importVoiceImpl().

| int CALilyPondImport::curChar | ( | ) | [inline, private] |
| CALilyPondDepth CALilyPondImport::curDepth | ( | ) | [inline, private] |
| int CALilyPondImport::curLine | ( | ) | [inline, private] |
| CAVoice* CALilyPondImport::curVoice | ( | ) | [inline, private] |
References _curVoice.
Referenced by findSharedElement(), and importVoiceImpl().

| CADiatonicKey::CAGender CALilyPondImport::diatonicKeyGenderFromLilyPond | ( | QString | gender | ) | [private] |
Returns the key signature gender from format \genderType.
References CADiatonicKey::Major, and CADiatonicKey::Minor.
Referenced by importVoiceImpl().

| CAMusElement * CALilyPondImport::findSharedElement | ( | CAMusElement * | elt | ) | [private] |
Gathers a list of music elements with the given element's start time and returns the first music element in the gathered list with the same attributes.
This method is usually called when voices have "shared" music elements (barlines, clefs etc.). However, in LilyPond syntax the music element can/should be present in all the voices. This function finds this shared music element, if it already exists.
If the music element with the same properties exists, user should delete its own instance and add an already existing instance of the returned shared music element to the voice.
References CAVoice::contains(), curVoice(), CAStaff::getEltByType(), CAMusElement::musElementType(), CAVoice::staff(), and CAMusElement::timeStart().
Referenced by importVoiceImpl().


| CALyricsContext * CALilyPondImport::importLyricsContextImpl | ( | ) | [private, virtual] |
Reimplemented from CAImport.
References CALyricsContext::addSyllable(), in(), parseNextElement(), CALyricsContext::repositSyllables(), CASyllable::setHyphenStart(), and CASyllable::setMelismaStart().

| CAVoice * CALilyPondImport::importVoiceImpl | ( | ) | [private, virtual] |
Reimplemented from CAImport.
References _curPhrasingSlur, _curSlur, addError(), CAVoice::append(), barlineTypeFromLilyPond(), CALilyPondImport::CATime::beat, CALilyPondImport::CATime::beats, Chord, clefOffsetFromLilyPond(), CAVoice::cloneVoiceProperties(), curDepth(), curVoice(), diatonicKeyGenderFromLilyPond(), CANote::diatonicPitch(), findSharedElement(), in(), isNote(), isRest(), CAVoice::lastMusElement(), CAMusElement::musElementType(), CAMusElement::musElementTypeToString(), CAPlayableLength::musicLength(), CAMusElement::Note, parseNextElement(), peekNextElement(), CASlur::PhrasingSlurType, playableLengthFromLilyPond(), popDepth(), predefinedClefTypeFromLilyPond(), pushDepth(), CAPlayableLength::Quarter, relativePitchFromLilyPond(), restTypeFromLilyPond(), setCurVoice(), CASlur::setNoteEnd(), CANote::setPhrasingSlurEnd(), CANote::setPhrasingSlurStart(), CANote::setSlurEnd(), CANote::setSlurStart(), CANote::setTieStart(), CABarline::Single, CASlur::SlurPreferred, CASlur::SlurType, CAPlayable::staff(), templateVoice(), CASlur::TieType, timeSigFromLilyPond(), CABarline::Undefined, CAClef::Undefined, CAImport::Undefined, CANote::updateTies(), and Voice.

| QString& CALilyPondImport::in | ( | ) | [inline, private] |
Reimplemented from CAImport.
References CAFile::stream().
Referenced by importLyricsContextImpl(), importVoiceImpl(), parseNextElement(), and peekNextElement().


| void CALilyPondImport::initLilyPondImport | ( | ) | [private] |
References _curChar, _curLine, _curPhrasingSlur, _curSlur, and _templateVoice.
Referenced by CALilyPondImport().

| bool CALilyPondImport::isNote | ( | const QString | elt | ) | [private] |
Returns true, if the given LilyPond element is a note.
Referenced by importVoiceImpl().

| bool CALilyPondImport::isRest | ( | const QString | elt | ) | [private] |
Returns true, if the given LilyPond element is a rest.
Referenced by importVoiceImpl().

| const QString CALilyPondImport::parseNextElement | ( | ) | [private] |
Returns the first element in input stream ended with one of the delimiters and shorten input stream for the element.
References DELIMITERS, and in().
Referenced by importLyricsContextImpl(), and importVoiceImpl().


| const QString CALilyPondImport::peekNextElement | ( | ) | [private] |
Returns the first element in input stream ended with one of the delimiters but don't shorten the stream.
References DELIMITERS, and in().
Referenced by importVoiceImpl().


| CAPlayableLength CALilyPondImport::playableLengthFromLilyPond | ( | QString & | elt, |
| bool | parse = false |
||
| ) | [private] |
Generates playable lentgth and number of dots from the note/rest string in LilyPond syntax. If the playable element doesn't include length, { CAPlayable::CAPlayableLength::Undefined, 0 } is returned. This function also shortens the given string for the playable length, if parse is True.
References CAPlayableLength::dotted(), CAPlayableLength::setDotted(), and CAPlayableLength::setMusicLength().
Referenced by importVoiceImpl().


| CALilyPondDepth CALilyPondImport::popDepth | ( | ) | [inline, private] |
| CAClef::CAPredefinedClefType CALilyPondImport::predefinedClefTypeFromLilyPond | ( | const QString | constClef | ) | [private] |
Genarates clef type from the LilyPond syntax for the given clef from format "clefType".
References CAClef::Alto, CAClef::Baritone, CAClef::Bass, CAClef::French, CAClef::Mezzosoprano, CAClef::Percussion, CAClef::Soprano, CAClef::Subbass, CAClef::Tablature, CAClef::Tenor, CAClef::Treble, and CAClef::Varbaritone.
Referenced by importVoiceImpl().

| void CALilyPondImport::pushDepth | ( | CALilyPondDepth | depth | ) | [inline, private] |
| const QString CALilyPondImport::readableStatus | ( | ) | [virtual] |
Reimplemented from CAImport.
References curChar(), curLine(), and CAFile::status().

| CADiatonicPitch CALilyPondImport::relativePitchFromLilyPond | ( | QString & | constNName, |
| CADiatonicPitch | prevPitch, | ||
| bool | parse = false |
||
| ) | [private] |
Generates the note pitch and number of accidentals from the note written in LilyPond syntax.
References CADiatonicPitch::noteName().
Referenced by importVoiceImpl().


| CARest::CARestType CALilyPondImport::restTypeFromLilyPond | ( | QString & | elt, |
| bool | parse = false |
||
| ) | [private] |
Genarates rest type from the LilyPond syntax for the given rest. This function also shortens the given string for the rest type, if parse is True.
References CARest::Hidden, and CARest::Normal.
Referenced by importVoiceImpl().

| void CALilyPondImport::setCurVoice | ( | CAVoice * | voice | ) | [inline, private] |
| void CALilyPondImport::setTemplateVoice | ( | CAVoice * | voice | ) | [inline] |
References _templateVoice.
Referenced by CAMainWin::sourceViewPortCommit().

| CAVoice* CALilyPondImport::templateVoice | ( | ) | [inline, private] |
References _templateVoice.
Referenced by importVoiceImpl().

| CALilyPondImport::CATime CALilyPondImport::timeSigFromLilyPond | ( | QString | timeSig | ) | [private] |
Returns the time signature beat and beats in beats/beat format.
Referenced by importVoiceImpl().

int CALilyPondImport::_curChar [private] |
Referenced by addError(), curChar(), and initLilyPondImport().
int CALilyPondImport::_curLine [private] |
Referenced by addError(), curLine(), and initLilyPondImport().
CASlur* CALilyPondImport::_curPhrasingSlur [private] |
Referenced by importVoiceImpl(), and initLilyPondImport().
CASlur* CALilyPondImport::_curSlur [private] |
Referenced by importVoiceImpl(), and initLilyPondImport().
CAVoice* CALilyPondImport::_curVoice [private] |
Referenced by curVoice(), and setCurVoice().
QStack<CALilyPondDepth> CALilyPondImport::_depth [private] |
Referenced by curDepth(), popDepth(), and pushDepth().
QList<QString> CALilyPondImport::_errors [private] |
Referenced by addError().
CAVoice* CALilyPondImport::_templateVoice [private] |
Referenced by initLilyPondImport(), setTemplateVoice(), and templateVoice().
QList<QString> CALilyPondImport::_warnings [private] |
const QRegExp CALilyPondImport::DELIMITERS [static, private] |
QRegExp(
CALilyPondImport::WHITESPACE_DELIMITERS.pattern().left(CALilyPondImport::WHITESPACE_DELIMITERS.pattern().size()-1) +
CALilyPondImport::SYNTAX_DELIMITERS.pattern().mid(1)
)
Combined WHITESPACE_DELIMITERS and SYNTAX_DELIMITERS.
Referenced by parseNextElement(), and peekNextElement().
const QRegExp CALilyPondImport::SYNTAX_DELIMITERS = QRegExp("[<>{}]") [static, private] |
Delimiters which separate various music elements in LilyPond syntax, but are specific for LilyPond syntax. They are reported as its own element when parsing the next element.
const QRegExp CALilyPondImport::WHITESPACE_DELIMITERS = QRegExp("[\\s]") [static, private] |
Copyright (c) 2007, 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.
Delimiters which separate various music elements in LilyPond syntax. These are new lines, tabs, blanks etc.
\sa nextElement(), parseNextElement()
1.8.0