Canorus  0.7
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
CAMusicXmlImport Class Reference

#include <musicxmlimport.h>

Inheritance diagram for CAMusicXmlImport:
Inheritance graph
[legend]

Public Member Functions

 CAMusicXmlImport (QTextStream *stream=0)
 
 CAMusicXmlImport (const QString stream)
 
virtual ~CAMusicXmlImport ()
 
const QString readableStatus ()
 
- Public Member Functions inherited from CAImport
 CAImport (QTextStream *stream=0)
 
 CAImport (const QString stream)
 
virtual ~CAImport ()
 
void importDocument ()
 
void importSheet ()
 
void importStaff ()
 
void importVoice ()
 
void importLyricsContext ()
 
void importFunctionMarkContext ()
 
CADocumentimportedDocument ()
 
CASheetimportedSheet ()
 
CAStaffimportedStaff ()
 
CAVoiceimportedVoice ()
 
CALyricsContextimportedLyricsContext ()
 
CAFunctionMarkContextimportedFunctionMarkContext ()
 
- Public Member Functions inherited from CAFile
 CAFile ()
 
virtual ~CAFile ()
 
const int status ()
 
const int progress ()
 
void setStreamFromFile (const QString filename)
 
void setStreamToFile (const QString filename)
 
void setStreamFromDevice (QIODevice *device)
 
void setStreamToDevice (QIODevice *device)
 

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
 

Additional Inherited Members

- Signals inherited from CAImport
void documentImported (CADocument *)
 
void sheetImported (CASheet *)
 
void staffImported (CAStaff *)
 
void voiceImported (CAVoice *)
 
void lyricsContextImported (CALyricsContext *)
 
void functionMarkContextImported (CAFunctionMarkContext *)
 
void importDone (int status)
 
- Protected Member Functions inherited from CAImport
virtual CASheetimportSheetImpl ()
 
virtual CAStaffimportStaffImpl ()
 
virtual CAVoiceimportVoiceImpl ()
 
virtual CALyricsContextimportLyricsContextImpl ()
 
virtual CAFunctionMarkContextimportFunctionMarkContextImpl ()
 
QTextStream & in ()
 

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:

CAMusicXmlImport::CAMusicXmlImport ( const QString  stream)

References initMusicXmlImport().

Here is the call graph for this function:

CAMusicXmlImport::~CAMusicXmlImport ( )
virtual

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:

CADocument * CAMusicXmlImport::importDocumentImpl ( )
privatevirtual

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:

void CAMusicXmlImport::initMusicXmlImport ( )
private

References _document.

Referenced by CAMusicXmlImport().

Here is the caller graph for this function:

const QString CAMusicXmlImport::readableStatus ( )
virtual

Reimplemented from CAImport.

References CAImport::readableStatus(), and 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:

void CAMusicXmlImport::readIdentification ( )
private

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:

void CAMusicXmlImport::readScorePartwise ( )
private
void CAMusicXmlImport::readScoreTimewise ( )
private

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

CADocument* CAMusicXmlImport::_document
private
QHash<QString, int> CAMusicXmlImport::_midiChannel
private

Referenced by readPartList(), and readScorePartwise().

QHash<QString, int> CAMusicXmlImport::_midiProgram
private

Referenced by readPartList(), and readScorePartwise().

QString CAMusicXmlImport::_musicXmlVersion
private

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: