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

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

| CAExport::~CAExport | ( | ) | [virtual] |
| void CAExport::documentExported | ( | CADocument * | ) | [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(), CAMainWin::on_uiExportDocument_triggered(), CAPreviewCtl::on_uiPrintPreview_triggered(), CAPrintCtl::printDocument(), CASourceViewPort::rebuild(), CAMainWin::saveDocument(), and CAAutoRecovery::saveRecovery().


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


| void CAExport::exportDone | ( | int | status | ) | [signal] |
| CADocument* CAExport::exportedDocument | ( | ) | [inline] |
References _exportedDocument.
Referenced by exportDocument(), run(), CAMainWin::saveDocument(), and CALilyPondExport::writeDocumentHeader().

| CAFunctionMarkContext* CAExport::exportedFunctionMarkContext | ( | ) | [inline] |
References _exportedFunctionMarkContext.
Referenced by run().

| CALyricsContext* CAExport::exportedLyricsContext | ( | ) | [inline] |
| CASheet* CAExport::exportedSheet | ( | ) | [inline] |
| CAStaff* CAExport::exportedStaff | ( | ) | [inline] |
| CAVoice* CAExport::exportedVoice | ( | ) | [inline] |
| void CAExport::exportFunctionMarkContext | ( | CAFunctionMarkContext * | fmc | ) |
References setExportedFunctionMarkContext(), and CAFile::setStatus().

| virtual void CAExport::exportFunctionMarkContextImpl | ( | CAFunctionMarkContext * | ) | [inline, protected, virtual] |
References CAFile::setStatus().
Referenced by run().


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


| virtual void CAExport::exportLyricsContextImpl | ( | CALyricsContext * | ) | [inline, protected, virtual] |
Reimplemented in CALilyPondExport.
References CAFile::setStatus().
Referenced by run().


| void CAExport::exportSheet | ( | CASheet * | sheet | ) |
| virtual void CAExport::exportSheetImpl | ( | CASheet * | ) | [inline, protected, virtual] |
Reimplemented in CALilyPondExport.
References CAFile::setStatus().
Referenced by run().


| void CAExport::exportStaff | ( | CAStaff * | staff | ) |
| virtual void CAExport::exportStaffImpl | ( | CAStaff * | ) | [inline, protected, virtual] |
References CAFile::setStatus().
Referenced by run().


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


| virtual void CAExport::exportVoiceImpl | ( | CAVoice * | ) | [inline, protected, virtual] |
Reimplemented in CALilyPondExport.
References CAFile::setStatus().
Referenced by run().


| void CAExport::functionMarkContextExported | ( | CAFunctionMarkContext * | ) | [signal] |
| void CAExport::lyricsContextExported | ( | CALyricsContext * | ) | [signal] |
| QTextStream& CAExport::out | ( | ) | [inline, protected] |
References CAFile::stream().
Referenced by CALilyPondExport::doAnacrusisCheck(), CAMusicXmlExport::exportDocumentImpl(), CACanorusMLExport::exportDocumentImpl(), CALilyPondExport::exportDocumentImpl(), CALilyPondExport::exportLyricsContextBlock(), CALilyPondExport::exportLyricsContextImpl(), CALilyPondExport::exportMarks(), CALilyPondExport::exportPlayable(), CALilyPondExport::exportScoreBlock(), CALilyPondExport::exportStaffVoices(), CALilyPondExport::exportVoiceImpl(), CALilyPondExport::indent(), CALilyPondExport::writeDocumentHeader(), CAMidiExport::writeFile(), and CALilyPondExport::writeRelativeIntro().


| const QString CAExport::readableStatus | ( | ) | [virtual] |
| 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().

| void CAExport::setExportedDocument | ( | CADocument * | doc | ) | [inline, private] |
References _exportedDocument.
Referenced by CAExport(), and exportDocument().

| void CAExport::setExportedFunctionMarkContext | ( | CAFunctionMarkContext * | fmc | ) | [inline, private] |
References _exportedFunctionMarkContext.
Referenced by CAExport(), and exportFunctionMarkContext().

| void CAExport::setExportedLyricsContext | ( | CALyricsContext * | lc | ) | [inline, private] |
References _exportedLyricsContext.
Referenced by CAExport(), and exportLyricsContext().

| void CAExport::setExportedSheet | ( | CASheet * | sheet | ) | [inline, private] |
References _exportedSheet.
Referenced by CAExport(), and exportSheet().

| void CAExport::setExportedStaff | ( | CAStaff * | staff | ) | [inline, private] |
References _exportedStaff.
Referenced by CAExport(), and exportStaff().

| void CAExport::setExportedVoice | ( | CAVoice * | voice | ) | [inline, private] |
References _exportedVoice.
Referenced by CAExport(), and exportVoice().

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

| void CAExport::sheetExported | ( | CASheet * | ) | [signal] |
| void CAExport::staffExported | ( | CAStaff * | ) | [signal] |
| void CAExport::voiceExported | ( | CAVoice * | ) | [signal] |
| bool CAExport::wait | ( | unsigned long | time = ULONG_MAX | ) | [inline] |
Referenced by CATypesetCtl::exportDocument(), CACanExport::exportDocumentImpl(), CAMainWin::on_uiExportDocument_triggered(), CAPreviewCtl::on_uiPrintPreview_triggered(), CAPrintCtl::printDocument(), CASourceViewPort::rebuild(), CAMainWin::saveDocument(), and CAAutoRecovery::saveRecovery().

CADocument* CAExport::_exportedDocument [private] |
Referenced by exportedDocument(), and setExportedDocument().
Referenced by exportedFunctionMarkContext(), and setExportedFunctionMarkContext().
CALyricsContext* CAExport::_exportedLyricsContext [private] |
Referenced by exportedLyricsContext(), and setExportedLyricsContext().
CASheet* CAExport::_exportedSheet [private] |
Referenced by exportedSheet(), and setExportedSheet().
CAStaff* CAExport::_exportedStaff [private] |
Referenced by exportedStaff(), and setExportedStaff().
CAVoice* CAExport::_exportedVoice [private] |
Referenced by exportedVoice(), and setExportedVoice().
1.8.0