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

#include <musicxmlimport.h>

Inheritance diagram for CAMusicXmlImport:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 CAMusicXmlImport (QTextStream *stream=0)
 CAMusicXmlImport (const QString stream)
virtual ~CAMusicXmlImport ()
const QString readableStatus ()

Private Member Functions

void initMusicXmlImport ()
CADocumentimportDocumentImpl ()
void readHeader ()
void readScorePartwise ()
void readScoreTimewise ()
void readWork ()
void readIdentification ()
void readDefaults ()
void readPartList ()
void readPart ()
void readMeasure (QString partId)
void readAttributes (QString partId)
void readNote (QString partId, int)
void readForward (QString partId, int)
CAVoiceaddVoiceIfNeeded (QString partId, int staff, int voice)

Private Attributes

QString _musicXmlVersion
CADocument_document
QHash< QString, QHash< int,
CAVoice * > > 
_partMapVoice
QHash< QString, QList< CAStaff * > > _partMapStaff
QHash< QString, QHash< int,
CAClef * > > 
_partMapClef
QHash< QString, QHash< int,
CAKeySignature * > > 
_partMapKeySig
QHash< QString, QHash< int,
CATimeSignature * > > 
_partMapTimeSig
QHash< QString, int > _midiChannel
QHash< QString, int > _midiProgram
QHash< QString, QString > _partName
QHash< QString, int > _divisions

Constructor & Destructor Documentation

CAMusicXmlImport::CAMusicXmlImport ( QTextStream *  stream = 0)

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

References initMusicXmlImport().

Here is the call graph for this function:

References initMusicXmlImport().

Here is the call graph for this function:


Member Function Documentation

CAVoice * CAMusicXmlImport::addVoiceIfNeeded ( QString  partId,
int  staff,
int  voice 
) [private]

References _partMapClef, _partMapKeySig, _partMapStaff, _partMapTimeSig, _partMapVoice, CAStaff::addVoice(), CAVoice::append(), CAVoice::staff(), CAStaff::synchronizeVoices(), and CAStaff::voiceCount().

Referenced by readForward(), and readNote().

Here is the call graph for this function:

Here is the caller graph for this function:

Opens a MusicXML source in and creates a document out of it. CAMusicXmlImport uses SAX model for reading.

Reimplemented from CAImport.

References _document, _musicXmlVersion, readHeader(), readScorePartwise(), readScoreTimewise(), CAFile::setStatus(), and CAFile::stream().

Here is the call graph for this function:

References _document.

Referenced by CAMusicXmlImport().

Here is the caller graph for this function:

const QString CAMusicXmlImport::readableStatus ( ) [virtual]

Reimplemented from CAImport.

References CAFile::status().

Here is the call graph for this function:

void CAMusicXmlImport::readAttributes ( QString  partId) [private]
void CAMusicXmlImport::readDefaults ( ) [private]

Referenced by readScorePartwise().

Here is the caller graph for this function:

void CAMusicXmlImport::readForward ( QString  partId,
int  divisions 
) [private]

References addVoiceIfNeeded(), CAVoice::append(), CARest::composeRests(), and CAVoice::lastTimeEnd().

Referenced by readMeasure().

Here is the call graph for this function:

Here is the caller graph for this function:

void CAMusicXmlImport::readHeader ( ) [private]

Referenced by importDocumentImpl().

Here is the caller graph for this function:

References _document, CADocument::setComposer(), CADocument::setCopyright(), and CADocument::setPoet().

Referenced by readScorePartwise().

Here is the call graph for this function:

Here is the caller graph for this function:

void CAMusicXmlImport::readMeasure ( QString  partId) [private]

References _divisions, _partMapStaff, CAVoice::append(), CAVoice::lastTimeEnd(), readAttributes(), readForward(), readNote(), CABarline::Single, CAStaff::synchronizeVoices(), CAStaff::voiceAt(), and CAStaff::voiceCount().

Referenced by readPart().

Here is the call graph for this function:

Here is the caller graph for this function:

void CAMusicXmlImport::readNote ( QString  partId,
int  divisions 
) [private]
void CAMusicXmlImport::readPart ( ) [private]

References _partMapClef, _partMapKeySig, _partMapStaff, _partMapTimeSig, and readMeasure().

Referenced by readScorePartwise().

Here is the call graph for this function:

Here is the caller graph for this function:

void CAMusicXmlImport::readPartList ( ) [private]

References _document, _midiChannel, _midiProgram, _partName, and CADocument::addSheet().

Referenced by readScorePartwise().

Here is the call graph for this function:

Here is the caller graph for this function:

References _document.

Referenced by importDocumentImpl().

Here is the caller graph for this function:

void CAMusicXmlImport::readWork ( ) [private]

References _document, and CADocument::setTitle().

Referenced by readScorePartwise().

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

QHash<QString, int> CAMusicXmlImport::_divisions [private]

Referenced by readAttributes(), and readMeasure().

QHash<QString, int> CAMusicXmlImport::_midiChannel [private]

Referenced by readPartList(), and readScorePartwise().

QHash<QString, int> CAMusicXmlImport::_midiProgram [private]

Referenced by readPartList(), and readScorePartwise().

Referenced by importDocumentImpl().

QHash<QString, QHash<int, CAClef*> > CAMusicXmlImport::_partMapClef [private]
QHash<QString, QHash<int, CAKeySignature*> > CAMusicXmlImport::_partMapKeySig [private]
QHash<QString, QList<CAStaff*> > CAMusicXmlImport::_partMapStaff [private]
QHash<QString, QHash<int, CATimeSignature*> > CAMusicXmlImport::_partMapTimeSig [private]
QHash<QString, QHash<int, CAVoice*> > CAMusicXmlImport::_partMapVoice [private]

Referenced by addVoiceIfNeeded().

QHash<QString, QString> CAMusicXmlImport::_partName [private]

Referenced by readPartList().


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