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

Base class for export filters. More...

#include <export.h>

Inheritance diagram for CAExport:
Inheritance graph
[legend]

List of all members.

Signals

void documentExported (CADocument *)
void sheetExported (CASheet *)
void staffExported (CAStaff *)
void voiceExported (CAVoice *)
void lyricsContextExported (CALyricsContext *)
void functionMarkContextExported (CAFunctionMarkContext *)
void exportDone (int status)

Public Member Functions

 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)

Protected Member Functions

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

Private Member Functions

void setExportedDocument (CADocument *doc)
void setExportedSheet (CASheet *sheet)
void setExportedStaff (CAStaff *staff)
void setExportedVoice (CAVoice *voice)
void setExportedLyricsContext (CALyricsContext *lc)
void setExportedFunctionMarkContext (CAFunctionMarkContext *fmc)

Private Attributes

CADocument_exportedDocument
CASheet_exportedSheet
CAStaff_exportedStaff
CAVoice_exportedVoice
CALyricsContext_exportedLyricsContext
CAFunctionMarkContext_exportedFunctionMarkContext

Detailed Description

Base class for export filters.

   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.



   This class inherits CAFile and is the base class for any specific import filter (eg. LilyPond,
   CanorusML, MusicXML etc.).

   If a developer wants to write a new export filter, he should:
   1) Create a new class with the base class CAExport
   2) Implement CAExport constructors and at least exportDocumentImpl() function
   3) Register the filter (put a new fileformat to CAFileFormats and add the filter to open/save
      dialogs in CACanorus)

   Optionally:
   Developer should change the current status and progress while operations are in progress. He should
   also rewrite the readableStatus() function.

   The following example illustrates the usage of export class:
          CAMyExportFilter export();
          export.setStreamToFile("jingle bells.xml");
          export.exportDocument( curDocument );

          export.wait();

Constructor & Destructor Documentation

CAExport::CAExport ( QTextStream *  stream = 0)
CAExport::~CAExport ( ) [virtual]

Member Function Documentation

void CAExport::documentExported ( CADocument ) [signal]

Referenced by exportDocument(), and run().

Here is the caller graph for this function:

void CAExport::exportDocument ( CADocument doc,
bool  bStartThread = true 
)
virtual void CAExport::exportDocumentImpl ( CADocument ) [inline, protected, virtual]

Reimplemented in CAMidiExport, CALilyPondExport, CASVGExport, CAPDFExport, CACanorusMLExport, CACanExport, and CAMusicXmlExport.

References CAFile::setStatus().

Referenced by exportDocument(), and run().

Here is the call graph for this function:

Here is the caller graph for this function:

void CAExport::exportDone ( int  status) [signal]

Referenced by exportDocument(), and run().

Here is the caller graph for this function:

References _exportedDocument.

Referenced by exportDocument(), run(), CAMainWin::saveDocument(), and CALilyPondExport::writeDocumentHeader().

Here is the caller graph for this function:

References _exportedFunctionMarkContext.

Referenced by run().

Here is the caller graph for this function:

References _exportedLyricsContext.

Referenced by run().

Here is the caller graph for this function:

References _exportedSheet.

Referenced by run().

Here is the caller graph for this function:

References _exportedStaff.

Referenced by run().

Here is the caller graph for this function:

References _exportedVoice.

Referenced by run().

Here is the caller graph for this function:

References setExportedFunctionMarkContext(), and CAFile::setStatus().

Here is the call graph for this function:

virtual void CAExport::exportFunctionMarkContextImpl ( CAFunctionMarkContext ) [inline, protected, virtual]

References CAFile::setStatus().

Referenced by run().

Here is the call graph for this function:

Here is the caller graph for this function:

References setExportedLyricsContext(), and CAFile::setStatus().

Referenced by CASourceViewPort::rebuild().

Here is the call graph for this function:

Here is the caller graph for this function:

virtual void CAExport::exportLyricsContextImpl ( CALyricsContext ) [inline, protected, virtual]

Reimplemented in CALilyPondExport.

References CAFile::setStatus().

Referenced by run().

Here is the call graph for this function:

Here is the caller graph for this function:

void CAExport::exportSheet ( CASheet sheet)

References setExportedSheet(), and CAFile::setStatus().

Here is the call graph for this function:

virtual void CAExport::exportSheetImpl ( CASheet ) [inline, protected, virtual]

Reimplemented in CALilyPondExport.

References CAFile::setStatus().

Referenced by run().

Here is the call graph for this function:

Here is the caller graph for this function:

void CAExport::exportStaff ( CAStaff staff)

References setExportedStaff(), and CAFile::setStatus().

Here is the call graph for this function:

virtual void CAExport::exportStaffImpl ( CAStaff ) [inline, protected, virtual]

References CAFile::setStatus().

Referenced by run().

Here is the call graph for this function:

Here is the caller graph for this function:

void CAExport::exportVoice ( CAVoice voice)

References setExportedVoice(), and CAFile::setStatus().

Referenced by CASourceViewPort::rebuild().

Here is the call graph for this function:

Here is the caller graph for this function:

virtual void CAExport::exportVoiceImpl ( CAVoice ) [inline, protected, virtual]

Reimplemented in CALilyPondExport.

References CAFile::setStatus().

Referenced by run().

Here is the call graph for this function:

Here is the caller graph for this function:

Referenced by run().

Here is the caller graph for this function:

Referenced by run().

Here is the caller graph for this function:

QTextStream& CAExport::out ( ) [inline, protected]
const QString CAExport::readableStatus ( ) [virtual]

Implements CAFile.

References CAFile::status().

Here is the call graph for this function:

void CAExport::run ( ) [protected]

Executed when a new thread is dispatched. It looks which part of the document should be exported and starts the procedure. It emits the appropriate signal when the procedure is finished.

References documentExported(), exportDocumentImpl(), exportDone(), exportedDocument(), exportedFunctionMarkContext(), exportedLyricsContext(), exportedSheet(), exportedStaff(), exportedVoice(), exportFunctionMarkContextImpl(), exportLyricsContextImpl(), exportSheetImpl(), exportStaffImpl(), exportVoiceImpl(), functionMarkContextExported(), lyricsContextExported(), CAFile::setStatus(), sheetExported(), staffExported(), CAFile::status(), CAFile::stream(), and voiceExported().

Here is the call graph for this function:

void CAExport::setExportedDocument ( CADocument doc) [inline, private]

References _exportedDocument.

Referenced by CAExport(), and exportDocument().

Here is the caller graph for this function:

References _exportedFunctionMarkContext.

Referenced by CAExport(), and exportFunctionMarkContext().

Here is the caller graph for this function:

void CAExport::setExportedLyricsContext ( CALyricsContext lc) [inline, private]

References _exportedLyricsContext.

Referenced by CAExport(), and exportLyricsContext().

Here is the caller graph for this function:

void CAExport::setExportedSheet ( CASheet sheet) [inline, private]

References _exportedSheet.

Referenced by CAExport(), and exportSheet().

Here is the caller graph for this function:

void CAExport::setExportedStaff ( CAStaff staff) [inline, private]

References _exportedStaff.

Referenced by CAExport(), and exportStaff().

Here is the caller graph for this function:

void CAExport::setExportedVoice ( CAVoice voice) [inline, private]

References _exportedVoice.

Referenced by CAExport(), and exportVoice().

Here is the caller graph for this function:

virtual void CAExport::setStreamToFile ( const QString  filename) [inline, virtual]

Creates and sets the stream from the file named filename. Stream is Read-Write. This method is usually called from the main window when saving the document. This method is also very important for python developers as they cannot directly access QTextStream class, so they call this wrapper instead with a simple string as parameter.

Reimplemented from CAFile.

Referenced by CAMainWin::on_uiExportDocument_triggered(), CAPreviewCtl::on_uiPrintPreview_triggered(), CAPrintCtl::printDocument(), CAMainWin::saveDocument(), CAAutoRecovery::saveRecovery(), and CAMidiRecorder::startRecording().

Here is the caller graph for this function:

void CAExport::sheetExported ( CASheet ) [signal]

Referenced by run().

Here is the caller graph for this function:

void CAExport::staffExported ( CAStaff ) [signal]

Referenced by run().

Here is the caller graph for this function:

void CAExport::voiceExported ( CAVoice ) [signal]

Referenced by run().

Here is the caller graph for this function:

bool CAExport::wait ( unsigned long  time = ULONG_MAX) [inline]

Member Data Documentation

Referenced by exportedSheet(), and setExportedSheet().

Referenced by exportedStaff(), and setExportedStaff().

Referenced by exportedVoice(), and setExportedVoice().


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