Canorus  0.0
musicxmlexport.h
Go to the documentation of this file.
1 
8 #ifndef MUSICXMLEXPORT_H_
9 #define MUSICXMLEXPORT_H_
10 
11 #include "export/export.h"
12 
13 class CAContext;
14 class CADocument;
15 class CAVoice;
16 class CASheet;
17 class CAClef;
18 class CAKeySignature;
19 class CATimeSignature;
20 class CANote;
21 class CARest;
22 
23 class CAMusicXmlExport : public CAExport {
24 public:
25  CAMusicXmlExport( QTextStream *stream=0 );
26  virtual ~CAMusicXmlExport();
27 
28  inline CAVoice *curVoice() { return _curVoice; }
29  inline CASheet *curSheet() { return _curSheet; }
30  inline CADocument *curDocument() { return _curDocument; }
31  inline CAContext *curContext() { return _curContext; }
32  inline int curContextIndex() { return _curContextIndex; }
33 
34 private:
35  void exportSheetImpl(CASheet *s);
36  void exportStaffImpl( CAStaff*, QDomElement& );
37  void exportMeasure( QList<CAVoice*>&, int*, QDomElement& );
38 
39  void exportClef(CAClef*, QDomElement&);
40  void exportTimeSig(CATimeSignature*, QDomElement&);
41  void exportKeySig(CAKeySignature*, QDomElement&);
42  void exportNote(CANote*, QDomElement&);
43  void exportRest(CARest*, QDomElement&);
44 
45  inline void setCurVoice(CAVoice *voice) { _curVoice = voice; }
46  inline void setCurSheet(CASheet *sheet) { _curSheet = sheet; }
47  inline void setCurContext(CAContext *context) { _curContext = context; }
48  inline void setCurContextIndex(int c) { _curContextIndex = c; }
49  inline void setCurDocument(CADocument *document) { _curDocument = document; }
50 
56 
57  QDomDocument *_xmlDoc;
58 };
59 
60 #endif /* MUSICXMLEXPORT_H_ */
CAClef::PercussionHigh
@ PercussionHigh
Definition: clef.h:40
rest.h
CAMusicXmlExport::curContext
CAContext * curContext()
Definition: musicxmlexport.h:31
CAMusElement::CAMusElementType
CAMusElementType
Definition: muselement.h:23
CAStaff::voiceList
const QList< CAVoice * > & voiceList()
Definition: staff.h:35
CARest
Represents a rest in the score.
Definition: rest.h:15
CAMusicXmlExport::exportTimeSig
void exportTimeSig(CATimeSignature *, QDomElement &)
Definition: musicxmlexport.cpp:288
CAMusicXmlExport::exportRest
void exportRest(CARest *, QDomElement &)
Definition: musicxmlexport.cpp:381
note.h
CAPlayableLength::Sixteenth
@ Sixteenth
Definition: playablelength.h:25
CAClef
Definition: clef.h:18
CANote
Represents a note in the score.
Definition: note.h:18
CAPlayableLength::Eighth
@ Eighth
Definition: playablelength.h:24
CADocument
Class which represents the current document.
Definition: document.h:19
CAMusElement::Clef
@ Clef
Definition: muselement.h:29
CAVoice
Class which represents a voice in the staff.
Definition: voice.h:23
musicxmlexport.h
document.h
CAMusElement::Barline
@ Barline
Definition: muselement.h:28
CATimeSignature
Represents a time signature in the staff.
Definition: timesignature.h:18
CAPlayableLength::Breve
@ Breve
Definition: playablelength.h:20
CANote::stemDirection
CAStemDirection stemDirection()
Definition: note.h:42
CAMusicXmlExport::_curContextIndex
int _curContextIndex
Definition: musicxmlexport.h:55
CAPlayable
Playable instances of music elements.
Definition: playable.h:18
CAPlayableLength::SixtyFourth
@ SixtyFourth
Definition: playablelength.h:27
functionmarkcontext.h
CAMusicXmlExport::~CAMusicXmlExport
virtual ~CAMusicXmlExport()
Definition: musicxmlexport.cpp:53
CAClef::F
@ F
Definition: clef.h:37
CAMusicXmlExport::exportNote
void exportNote(CANote *, QDomElement &)
Definition: musicxmlexport.cpp:321
CAMusicXmlExport
Definition: musicxmlexport.h:23
CANote::StemDown
@ StemDown
Definition: note.h:24
CAMusicXmlExport::_curSheet
CASheet * _curSheet
Definition: musicxmlexport.h:52
CAMusicXmlExport::curSheet
CASheet * curSheet()
Definition: musicxmlexport.h:29
CAClef::offset
int offset()
Definition: clef.h:59
CAMusicXmlExport::curDocument
CADocument * curDocument()
Definition: musicxmlexport.h:30
CANote::StemUp
@ StemUp
Definition: note.h:23
repeatmark.h
CANote::StemPreferred
@ StemPreferred
Definition: note.h:25
crescendo.h
CAFile::stream
QTextStream * stream()
Definition: file.h:36
CAVoice::stemDirection
CANote::CAStemDirection stemDirection()
Definition: voice.h:98
CAMusElement::TimeSignature
@ TimeSignature
Definition: muselement.h:30
ritardando.h
functionmark.h
CAPlayableLength::musicLength
const CAMusicLength musicLength()
Definition: playablelength.h:34
instrumentchange.h
keysignature.h
dynamic.h
fingering.h
CAPlayableLength::Quarter
@ Quarter
Definition: playablelength.h:23
syllable.h
CAPlayableLength::HundredTwentyEighth
@ HundredTwentyEighth
Definition: playablelength.h:28
CADiatonicKey::numberOfAccs
int numberOfAccs()
Definition: diatonickey.cpp:79
CADiatonicPitch::noteName
const int noteName() const
Definition: diatonicpitch.h:50
CAClef::clefType
CAClefType clefType()
Definition: clef.h:51
CAPlayableLength::ThirtySecond
@ ThirtySecond
Definition: playablelength.h:26
fermata.h
text.h
CAMusElement::KeySignature
@ KeySignature
Definition: muselement.h:31
CADiatonicKey::Minor
@ Minor
Definition: diatonickey.h:19
CANote::isPartOfChord
bool isPartOfChord()
Definition: note.cpp:149
CAClef::C
@ C
Definition: clef.h:39
CAMusicXmlExport::exportStaffImpl
void exportStaffImpl(CAStaff *, QDomElement &)
Definition: musicxmlexport.cpp:118
CAVoice::musElementList
const QList< CAMusElement * > & musElementList()
Definition: voice.h:47
CAMusicXmlExport::curVoice
CAVoice * curVoice()
Definition: musicxmlexport.h:28
CANote::isFirstInChord
bool isFirstInChord()
Definition: note.cpp:166
CAMusicXmlExport::_curDocument
CADocument * _curDocument
Definition: musicxmlexport.h:54
CAStaff
Represents a staff in the sheet.
Definition: staff.h:25
CAMusElement
An abstract class which represents every music element in the score.
Definition: muselement.h:21
articulation.h
CADiatonicKey::gender
const CAGender gender()
Definition: diatonickey.h:43
CAMusElement::Rest
@ Rest
Definition: muselement.h:26
CAClef::c1
const int c1()
Definition: clef.h:52
CADiatonicPitch::accs
const int accs() const
Definition: diatonicpitch.h:51
CAPlayableLength::Half
@ Half
Definition: playablelength.h:22
CAMusicXmlExport::exportClef
void exportClef(CAClef *, QDomElement &)
Definition: musicxmlexport.cpp:254
CAPlayableLength::playableLengthToTimeLength
static const int playableLengthToTimeLength(CAPlayableLength length)
Definition: playablelength.cpp:107
CAClef::G
@ G
Definition: clef.h:38
CAKeySignature
Represents a key signature sign in the staff.
Definition: keysignature.h:19
CASheet::staffList
QList< CAStaff * > staffList()
Definition: sheet.cpp:157
CAClef::PercussionLow
@ PercussionLow
Definition: clef.h:41
CAMusicXmlExport::_xmlDoc
QDomDocument * _xmlDoc
Definition: musicxmlexport.h:57
CAMusElement::Note
@ Note
Definition: muselement.h:25
sheet.h
CATimeSignature::beats
int beats()
Definition: timesignature.h:34
CAMusicXmlExport::setCurDocument
void setCurDocument(CADocument *document)
Definition: musicxmlexport.h:49
timesignature.h
context.h
barline.h
CAMusicXmlExport::exportKeySig
void exportKeySig(CAKeySignature *, QDomElement &)
Definition: musicxmlexport.cpp:300
muselement.h
bookmark.h
CAKeySignature::diatonicKey
CADiatonicKey diatonicKey()
Definition: keysignature.h:50
CANote::diatonicPitch
CADiatonicPitch & diatonicPitch()
Definition: note.h:35
CADiatonicKey::Major
@ Major
Definition: diatonickey.h:18
CAContext
Line of music elements in the sheet.
Definition: context.h:16
CAMusicXmlExport::setCurContext
void setCurContext(CAContext *context)
Definition: musicxmlexport.h:47
CAMusicXmlExport::setCurSheet
void setCurSheet(CASheet *sheet)
Definition: musicxmlexport.h:46
tempo.h
CABarline
Music element which represents a barline in the score.
Definition: barline.h:17
CAMusicXmlExport::curContextIndex
int curContextIndex()
Definition: musicxmlexport.h:32
voice.h
CAPlayableLength::Whole
@ Whole
Definition: playablelength.h:21
clef.h
CAMusicXmlExport::exportMeasure
void exportMeasure(QList< CAVoice * > &, int *, QDomElement &)
Definition: musicxmlexport.cpp:153
CASheet
Represents a single sheet of paper in the document.
Definition: sheet.h:22
CAClef::Tab
@ Tab
Definition: clef.h:42
CAMusicXmlExport::setCurContextIndex
void setCurContextIndex(int c)
Definition: musicxmlexport.h:48
CASheet::document
CADocument * document()
Definition: sheet.h:43
CATimeSignature::beat
int beat()
Definition: timesignature.h:37
CAMusicXmlExport::_curContext
CAContext * _curContext
Definition: musicxmlexport.h:53
CAVoice::voiceNumber
int voiceNumber()
Definition: voice.h:95
staff.h
CAExport::out
QTextStream & out()
Definition: export.h:71
lyricscontext.h
CAExport
Base class for export filters.
Definition: export.h:22
CAMusicXmlExport::setCurVoice
void setCurVoice(CAVoice *voice)
Definition: musicxmlexport.h:45
CAMusicXmlExport::_curVoice
CAVoice * _curVoice
Definition: musicxmlexport.h:51
CAMusElement::musElementType
CAMusElementType musElementType()
Definition: muselement.h:46
mark.h
CAPlayable::voice
CAVoice * voice()
Definition: playable.h:31
CAPlayable::playableLength
CAPlayableLength & playableLength()
Definition: playable.h:23
CAMusicXmlExport::exportSheetImpl
void exportSheetImpl(CASheet *s)
Definition: musicxmlexport.cpp:62
CAMusicXmlExport::CAMusicXmlExport
CAMusicXmlExport(QTextStream *stream=0)
Definition: musicxmlexport.cpp:48
export.h