Canorus 0.0
Public Member Functions | Private Member Functions | Private Attributes | List of all members
CACanorusMLExport Class Reference

#include <canorusmlexport.h>

Inheritance diagram for CACanorusMLExport:
Inheritance graph
[legend]

Public Member Functions

 CACanorusMLExport (QTextStream *stream=0)
 
virtual ~CACanorusMLExport ()
 
void exportDocumentImpl (CADocument *doc)
 
- Public Member Functions inherited from CAExport
 CAExport (QTextStream *stream=0)
 
virtual ~CAExport ()
 
virtual const QString readableStatus ()
 
void exportDocument (CADocument *, bool bStartThread=true)
 
void exportSheet (CASheet *)
 
void exportStaff (CAStaff *)
 
void exportVoice (CAVoice *)
 
void exportLyricsContext (CALyricsContext *)
 
void exportFunctionMarkContext (CAFunctionMarkContext *)
 
CADocumentexportedDocument ()
 
CASheetexportedSheet ()
 
CAStaffexportedStaff ()
 
CAVoiceexportedVoice ()
 
CALyricsContextexportedLyricsContext ()
 
CAFunctionMarkContextexportedFunctionMarkContext ()
 
virtual void setStreamToFile (const QString filename)
 
bool wait (unsigned long time=ULONG_MAX)
 
- Public Member Functions inherited from CAFile
 CAFile ()
 
virtual ~CAFile ()
 
const int status ()
 
const int progress ()
 
virtual const QString readableStatus ()=0
 
void setStreamFromFile (const QString filename)
 
void setStreamToFile (const QString filename)
 
void setStreamFromDevice (QIODevice *device)
 
void setStreamToDevice (QIODevice *device)
 
void setStreamToString ()
 
QString getStreamAsString ()
 

Private Member Functions

void exportVoiceImpl (CAVoice *voice, QDomElement &dVoice)
 
void exportFiguredBass (CAFiguredBassContext *c, QDomElement &domParent)
 
void exportMarks (CAMusElement *associatedElt, QDomElement &domParent)
 
void exportPlayableLength (CAPlayableLength l, QDomElement &domParent)
 
void exportDiatonicPitch (CADiatonicPitch p, QDomElement &domParent)
 
void exportDiatonicKey (CADiatonicKey k, QDomElement &domParent)
 
void exportColor (CAMusElement *elt, QDomElement &domParent)
 
void exportTime (CAMusElement *elt, QDomElement &domParent)
 
void exportResources (CADocument *, QDomElement &)
 

Private Attributes

QDomElement _dTuplet
 
QColor _color
 

Additional Inherited Members

- Signals inherited from CAExport
void documentExported (CADocument *)
 
void sheetExported (CASheet *)
 
void staffExported (CAStaff *)
 
void voiceExported (CAVoice *)
 
void lyricsContextExported (CALyricsContext *)
 
void functionMarkContextExported (CAFunctionMarkContext *)
 
void exportDone (int status)
 
- Protected Member Functions inherited from CAExport
virtual void exportDocumentImpl (CADocument *)
 
virtual void exportSheetImpl (CASheet *)
 
virtual void exportStaffImpl (CAStaff *)
 
virtual void exportVoiceImpl (CAVoice *)
 
virtual void exportLyricsContextImpl (CALyricsContext *)
 
virtual void exportFunctionMarkContextImpl (CAFunctionMarkContext *)
 
QTextStream & out ()
 
void run ()
 
- Protected Member Functions inherited from CAFile
void setStatus (const int status)
 
void setProgress (const int progress)
 
QTextStream * stream ()
 
virtual void setStream (QTextStream *stream)
 
QFile * file ()
 
void setFile (QFile *file)
 

Constructor & Destructor Documentation

◆ CACanorusMLExport()

CACanorusMLExport::CACanorusMLExport ( QTextStream *  stream = 0)

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

◆ ~CACanorusMLExport()

CACanorusMLExport::~CACanorusMLExport ( )
virtual

Member Function Documentation

◆ exportColor()

void CACanorusMLExport::exportColor ( CAMusElement elt,
QDomElement &  domParent 
)
private

References CAMusElement::color().

Referenced by exportFiguredBass(), exportMarks(), and exportVoiceImpl().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ exportDiatonicKey()

void CACanorusMLExport::exportDiatonicKey ( CADiatonicKey  k,
QDomElement &  domParent 
)
private

References CADiatonicKey::diatonicPitch(), exportDiatonicPitch(), CADiatonicKey::gender(), and CADiatonicKey::genderToString().

Referenced by exportDocumentImpl(), and exportVoiceImpl().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ exportDiatonicPitch()

void CACanorusMLExport::exportDiatonicPitch ( CADiatonicPitch  p,
QDomElement &  domParent 
)
private

References CADiatonicPitch::accs(), and CADiatonicPitch::noteName().

Referenced by exportDiatonicKey(), and exportVoiceImpl().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ exportDocumentImpl()

void CACanorusMLExport::exportDocumentImpl ( CADocument doc)
virtual

◆ exportFiguredBass()

void CACanorusMLExport::exportFiguredBass ( CAFiguredBassContext c,
QDomElement &  domParent 
)
private

References exportColor(), CAFiguredBassContext::figuredBassMarkList(), and CAContext::name().

Referenced by exportDocumentImpl().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ exportMarks()

void CACanorusMLExport::exportMarks ( CAMusElement associatedElt,
QDomElement &  domParent 
)
private

◆ exportPlayableLength()

void CACanorusMLExport::exportPlayableLength ( CAPlayableLength  l,
QDomElement &  domParent 
)
private

References CAPlayableLength::dotted(), CAPlayableLength::musicLength(), and CAPlayableLength::musicLengthToString().

Referenced by exportMarks(), and exportVoiceImpl().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ exportResources()

void CACanorusMLExport::exportResources ( CADocument doc,
QDomElement &  dCanorusDocument 
)
private

Exports the resources to exported filename files/ directory.

There are 4 possible scenarios: 1) Linked resource, resource is remote (eg. http, https resource on the web): Only resource url is stored inside the xml file. 2) Linked resource, resource is local (eg. large video on the disk): Relative path to the resource is calculated from the directory where the document is being saved. 3) Attached resource: Resource is copied from the tmp/ directory to the directory where the document is being saved + "filename files/". eg. "content.xml files/myImageXXXX.png"

References CAResource::copy(), CAResource::description(), CAFile::file(), CAResource::isLinked(), CAResource::name(), CADocument::resourceList(), CAResource::resourceType(), CAResource::resourceTypeToString(), and CAResource::url().

Referenced by exportDocumentImpl().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ exportTime()

void CACanorusMLExport::exportTime ( CAMusElement elt,
QDomElement &  domParent 
)
private

References CAMusElement::isPlayable(), CAMusElement::timeLength(), and CAMusElement::timeStart().

Referenced by exportVoiceImpl().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ exportVoiceImpl()

void CACanorusMLExport::exportVoiceImpl ( CAVoice voice,
QDomElement &  dVoice 
)
private

Used for writing the voice node in XML output. It uses DOM object internally for writing the XML output. This method is usually called by saveDocument().

See also
exportDocumentImpl()
Todo:
Custom accidentals in key signature saving -Matevz

References _dTuplet, CATuplet::actualNumber(), CAMusElement::Barline, CABarline::barlineType(), CABarline::barlineTypeToString(), CATimeSignature::beat(), CATimeSignature::beats(), CAClef::c1(), CAMusElement::Clef, CAClef::clefType(), CAClef::clefTypeToString(), CAKeySignature::diatonicKey(), CANote::diatonicPitch(), exportColor(), exportDiatonicKey(), exportDiatonicPitch(), exportMarks(), exportPlayableLength(), exportTime(), CAMusElement::FiguredBassMark, CAMusElement::FunctionMark, CAPlayable::isFirstInTuplet(), CAMusElement::KeySignature, CAKeySignature::keySignatureType(), CAKeySignature::keySignatureTypeToString(), CAKeySignature::MajorMinor, CAMusElement::Mark, CAMusElement::MidiNote, CAKeySignature::Modus, CAKeySignature::modus(), CAKeySignature::modusToString(), CAVoice::musElementList(), CAMusElement::musElementType(), CAMusElement::Note, CATuplet::number(), CAClef::offset(), CANote::phrasingSlurEnd(), CANote::phrasingSlurStart(), CAPlayable::playableLength(), CAMusElement::Rest, CARest::restType(), CARest::restTypeToString(), CAMusElement::Slur, CASlur::slurDirection(), CASlur::slurDirectionToString(), CANote::slurEnd(), CANote::slurStart(), CASlur::slurStyle(), CASlur::slurStyleToString(), CANote::stemDirection(), CANote::stemDirectionToString(), CANote::StemPreferred, CAMusElement::Syllable, CANote::tieStart(), CAMusElement::TimeSignature, CATimeSignature::timeSignatureType(), CATimeSignature::timeSignatureTypeToString(), CAMusElement::Tuplet, CAPlayable::tuplet(), and CAMusElement::Undefined.

Referenced by exportDocumentImpl().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ _color

QColor CACanorusMLExport::_color
private

◆ _dTuplet

QDomElement CACanorusMLExport::_dTuplet
private

Referenced by exportVoiceImpl().


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