|
Canorus
0.0
|
Base class for export filters. More...
#include <export.h>

Signals | |
| 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 | |
| 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) |
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) |
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:
| CAExport::CAExport | ( | QTextStream * | stream = 0 | ) |
References setExportedDocument(), setExportedFunctionMarkContext(), setExportedLyricsContext(), setExportedSheet(), setExportedStaff(), setExportedVoice(), CAFile::setStream(), and CAFile::stream().

|
virtual |
|
signal |
| void CAExport::exportDocument | ( | CADocument * | doc, |
| bool | bStartThread = true |
||
| ) |
References documentExported(), exportDocumentImpl(), exportDone(), exportedDocument(), setExportedDocument(), CAFile::setStatus(), CAFile::status(), and CAFile::stream().
Referenced by CATypesetCtl::exportDocument(), CACanExport::exportDocumentImpl(), CASourceView::rebuild(), CAMainWin::saveDocument(), and CAAutoRecovery::saveRecovery().


|
inlineprotectedvirtual |
Reimplemented in CASVGExport, CAPDFExport, CAMidiExport, CACanorusMLExport, and CACanExport.
References CAFile::setStatus().
Referenced by exportDocument(), and run().


|
signal |
|
inline |
References _exportedDocument.
Referenced by exportDocument(), and run().

|
inline |
References _exportedFunctionMarkContext.
Referenced by run().

|
inline |
|
inline |
|
inline |
|
inline |
| void CAExport::exportFunctionMarkContext | ( | CAFunctionMarkContext * | fmc | ) |
References setExportedFunctionMarkContext(), and CAFile::setStatus().

|
inlineprotectedvirtual |
References CAFile::setStatus().
Referenced by run().


| void CAExport::exportLyricsContext | ( | CALyricsContext * | lc | ) |
References setExportedLyricsContext(), and CAFile::setStatus().
Referenced by CASourceView::rebuild().


|
inlineprotectedvirtual |
Reimplemented in CALilyPondExport.
References CAFile::setStatus().
Referenced by run().


| void CAExport::exportSheet | ( | CASheet * | sheet | ) |
References setExportedSheet(), and CAFile::setStatus().
Referenced by CATypesetCtl::exportSheet(), CAMainWin::on_uiExportDocument_triggered(), CAPreviewCtl::on_uiPrintPreview_triggered(), and CAPrintCtl::printDocument().


|
inlineprotectedvirtual |
Reimplemented in CAMidiExport, CALilyPondExport, CAMusicXmlExport, CASVGExport, and CAPDFExport.
References CAFile::setStatus().
Referenced by run().


| void CAExport::exportStaff | ( | CAStaff * | staff | ) |
|
inlineprotectedvirtual |
References CAFile::setStatus().
Referenced by run().


| void CAExport::exportVoice | ( | CAVoice * | voice | ) |
References setExportedVoice(), and CAFile::setStatus().
Referenced by CASourceView::rebuild().


|
inlineprotectedvirtual |
Reimplemented in CALilyPondExport.
References CAFile::setStatus().
Referenced by run().


|
signal |
|
signal |
|
inlineprotected |
References CAFile::stream().
Referenced by CALilyPondExport::doAnacrusisCheck(), CACanorusMLExport::exportDocumentImpl(), CALilyPondExport::exportLyricsContextBlock(), CALilyPondExport::exportLyricsContextImpl(), CALilyPondExport::exportMarksAfterElement(), CALilyPondExport::exportMarksBeforeElement(), CALilyPondExport::exportNoteMarks(), CALilyPondExport::exportPlayable(), CALilyPondExport::exportScoreBlock(), CAMusicXmlExport::exportSheetImpl(), CALilyPondExport::exportSheetImpl(), CALilyPondExport::exportStaffVoices(), CALilyPondExport::exportVoiceImpl(), CALilyPondExport::indent(), CALilyPondExport::scanForRepeats(), CAMidiExport::streamQByteArray(), CALilyPondExport::voltaFunction(), CALilyPondExport::writeDocumentHeader(), and CALilyPondExport::writeRelativeIntro().


|
virtual |
Implements CAFile.
References CAFile::status().
Referenced by CAMainWin::saveDocument().


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

|
inlineprivate |
References _exportedDocument.
Referenced by CAExport(), and exportDocument().

|
inlineprivate |
References _exportedFunctionMarkContext.
Referenced by CAExport(), and exportFunctionMarkContext().

|
inlineprivate |
References _exportedLyricsContext.
Referenced by CAExport(), and exportLyricsContext().

|
inlineprivate |
References _exportedSheet.
Referenced by CAExport(), and exportSheet().

|
inlineprivate |
References _exportedStaff.
Referenced by CAExport(), and exportStaff().

|
inlineprivate |
References _exportedVoice.
Referenced by CAExport(), and exportVoice().

|
inlinevirtual |
References CAFile::setStreamToFile().
Referenced by CAMainWin::on_uiExportDocument_triggered(), CAPreviewCtl::on_uiPrintPreview_triggered(), CAPrintCtl::printDocument(), CAMainWin::saveDocument(), CAAutoRecovery::saveRecovery(), and CAMidiRecorder::startRecording().


|
signal |
|
signal |
|
signal |
|
inline |
Referenced by CATypesetCtl::exportDocument(), CACanExport::exportDocumentImpl(), CATypesetCtl::exportSheet(), CAMainWin::on_uiExportDocument_triggered(), CAPreviewCtl::on_uiPrintPreview_triggered(), CAPrintCtl::printDocument(), CASourceView::rebuild(), CAMainWin::saveDocument(), and CAAutoRecovery::saveRecovery().

|
private |
Referenced by exportedDocument(), and setExportedDocument().
|
private |
Referenced by exportedFunctionMarkContext(), and setExportedFunctionMarkContext().
|
private |
Referenced by exportedLyricsContext(), and setExportedLyricsContext().
|
private |
Referenced by exportedSheet(), and setExportedSheet().
|
private |
Referenced by exportedStaff(), and setExportedStaff().
|
private |
Referenced by exportedVoice(), and setExportedVoice().