#include <import.h>

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 import filter, he should: 1) Create a new class with the base class CAImport 2) Implement CAImport constructors and at least importDocumentImpl() function which returns the new CADocument. 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 import class:
CAMyImportFilter import(); import.setStreamFromFile("jingle bells.xml"); import.importDocument(); import.wait(); setDocument( import.importedDocument() ); CACanorus::rebuildUI();
In Python the example is even more direct using the string as an input method:
lilyString = '\\relative c { \\clef "treble" \\time 4/4 c4 d e f | f e d c | c1 \\bar "|." }'
myImport = CALilyPondImport( lilyString )
myImport.importVoice()
myImport.wait()
voice = myImport.importedVoice()
Definition at line 20 of file import.h.
enum CAImport::CAImportPart [private] |
| CAImport::CAImport | ( | QTextStream * | stream = 0 |
) |
Definition at line 53 of file import.cpp.
References setImportedDocument(), setImportedFunctionMarkingContext(), setImportedLyricsContext(), setImportedSheet(), setImportedStaff(), setImportedVoice(), setImportPart(), CAFile::setStream(), and Undefined.

| CAImport::CAImport | ( | const QString | stream | ) |
Definition at line 66 of file import.cpp.
References setImportedDocument(), setImportedFunctionMarkingContext(), setImportedLyricsContext(), setImportedSheet(), setImportedStaff(), setImportedVoice(), setImportPart(), CAFile::setStream(), and Undefined.

| CAImport::~CAImport | ( | ) | [virtual] |
Definition at line 79 of file import.cpp.
References CAFile::stream().

| const QString CAImport::readableStatus | ( | ) | [virtual] |
Implements CAFile.
Reimplemented in CALilyPondImport.
Definition at line 179 of file import.cpp.
References CAFile::status().
Referenced by CAMainWin::openDocument().


| void CAImport::importDocument | ( | ) |
Definition at line 143 of file import.cpp.
References Document, setImportPart(), and CAFile::setStatus().
Referenced by CACanImport::importDocumentImpl(), CAMainWin::openDocument(), CAAutoRecovery::openRecovery(), and CAMainWin::sourceViewPortCommit().


| void CAImport::importSheet | ( | ) |
Definition at line 149 of file import.cpp.
References setImportPart(), CAFile::setStatus(), and Sheet.

| void CAImport::importStaff | ( | ) |
Definition at line 155 of file import.cpp.
References setImportPart(), CAFile::setStatus(), and Staff.

| void CAImport::importVoice | ( | ) |
Definition at line 161 of file import.cpp.
References setImportPart(), CAFile::setStatus(), and Voice.
Referenced by CAMainWin::sourceViewPortCommit().

| void CAImport::importLyricsContext | ( | ) |
Definition at line 167 of file import.cpp.
References LyricsContext, setImportPart(), and CAFile::setStatus().
Referenced by CAMainWin::sourceViewPortCommit().

| void CAImport::importFunctionMarkingContext | ( | ) |
Definition at line 173 of file import.cpp.
References FunctionMarkingContext, setImportPart(), and CAFile::setStatus().

| CADocument* CAImport::importedDocument | ( | ) | [inline] |
Definition at line 37 of file import.h.
References _importedDocument.
Referenced by CACanImport::importDocumentImpl(), CAMainWin::openDocument(), CAAutoRecovery::openRecovery(), and CAMainWin::sourceViewPortCommit().

| CASheet* CAImport::importedSheet | ( | ) | [inline] |
| CAStaff* CAImport::importedStaff | ( | ) | [inline] |
| CAVoice* CAImport::importedVoice | ( | ) | [inline] |
Definition at line 40 of file import.h.
References _importedVoice.
Referenced by CAMainWin::sourceViewPortCommit().
| CALyricsContext* CAImport::importedLyricsContext | ( | ) | [inline] |
Definition at line 41 of file import.h.
References _importedLyricsContext.
Referenced by CAMainWin::sourceViewPortCommit().
| CAFunctionMarkingContext* CAImport::importedFunctionMarkingContext | ( | ) | [inline] |
| void CAImport::documentImported | ( | CADocument * | ) | [signal] |
Referenced by run().
| void CAImport::lyricsContextImported | ( | CALyricsContext * | ) | [signal] |
Referenced by run().
| void CAImport::functionMarkingContextImported | ( | CAFunctionMarkingContext * | ) | [signal] |
Referenced by run().
| void CAImport::importDone | ( | int | status | ) | [signal] |
Referenced by run().
| virtual CADocument* CAImport::importDocumentImpl | ( | ) | [inline, protected, virtual] |
Reimplemented in CACanImport, and CACanorusMLImport.
Definition at line 57 of file import.h.
References CAFile::setStatus().
Referenced by run().


| virtual CASheet* CAImport::importSheetImpl | ( | ) | [inline, protected, virtual] |
Definition at line 58 of file import.h.
References CAFile::setStatus().
Referenced by run().


| virtual CAStaff* CAImport::importStaffImpl | ( | ) | [inline, protected, virtual] |
Definition at line 59 of file import.h.
References CAFile::setStatus().
Referenced by run().


| virtual CAVoice* CAImport::importVoiceImpl | ( | ) | [inline, protected, virtual] |
Reimplemented in CALilyPondImport.
Definition at line 60 of file import.h.
References CAFile::setStatus().
Referenced by run().


| virtual CALyricsContext* CAImport::importLyricsContextImpl | ( | ) | [inline, protected, virtual] |
Reimplemented in CALilyPondImport.
Definition at line 61 of file import.h.
References CAFile::setStatus().
Referenced by run().


| virtual CAFunctionMarkingContext* CAImport::importFunctionMarkingContextImpl | ( | ) | [inline, protected, virtual] |
Definition at line 62 of file import.h.
References CAFile::setStatus().
Referenced by run().


| QTextStream& CAImport::in | ( | ) | [inline, protected] |
Reimplemented in CALilyPondImport.
Definition at line 64 of file import.h.
References CAFile::stream().

| void CAImport::setImportedDocument | ( | CADocument * | doc | ) | [inline, private] |
Definition at line 70 of file import.h.
References _importedDocument.
Referenced by CAImport(), and run().

| void CAImport::setImportedSheet | ( | CASheet * | sheet | ) | [inline, private] |
Definition at line 71 of file import.h.
References _importedSheet.
Referenced by CAImport(), and run().

| void CAImport::setImportedStaff | ( | CAStaff * | staff | ) | [inline, private] |
Definition at line 72 of file import.h.
References _importedStaff.
Referenced by CAImport(), and run().

| void CAImport::setImportedVoice | ( | CAVoice * | voice | ) | [inline, private] |
Definition at line 73 of file import.h.
References _importedVoice.
Referenced by CAImport(), and run().

| void CAImport::setImportedLyricsContext | ( | CALyricsContext * | lc | ) | [inline, private] |
Definition at line 74 of file import.h.
References _importedLyricsContext.
Referenced by CAImport(), and run().

| void CAImport::setImportedFunctionMarkingContext | ( | CAFunctionMarkingContext * | fmc | ) | [inline, private] |
Definition at line 75 of file import.h.
References _importedFunctionMarkingContext.
Referenced by CAImport(), and run().

| void CAImport::run | ( | ) | [private] |
Executed when a new thread is dispatched. It looks which part of the document should be imported and starts the procedure. It emits the appropriate signal when the procedure is finished.
Definition at line 91 of file import.cpp.
References Document, documentImported(), FunctionMarkingContext, functionMarkingContextImported(), importDocumentImpl(), importDone(), importFunctionMarkingContextImpl(), importLyricsContextImpl(), importPart(), importSheetImpl(), importStaffImpl(), importVoiceImpl(), LyricsContext, lyricsContextImported(), setImportedDocument(), setImportedFunctionMarkingContext(), setImportedLyricsContext(), setImportedSheet(), setImportedStaff(), setImportedVoice(), CAFile::setStatus(), Sheet, sheetImported(), Staff, staffImported(), CAFile::status(), CAFile::stream(), Voice, and voiceImported().

| void CAImport::setImportPart | ( | CAImportPart | part | ) | [inline, private] |
Definition at line 95 of file import.h.
References _importPart.
Referenced by CAImport(), importDocument(), importFunctionMarkingContext(), importLyricsContext(), importSheet(), importStaff(), and importVoice().

| CAImportPart CAImport::importPart | ( | ) | [inline, private] |
Definition at line 96 of file import.h.
References _importPart.
Referenced by run().

CADocument* CAImport::_importedDocument [private] |
Definition at line 77 of file import.h.
Referenced by importedDocument(), and setImportedDocument().
CASheet* CAImport::_importedSheet [private] |
CAStaff* CAImport::_importedStaff [private] |
CAVoice* CAImport::_importedVoice [private] |
CALyricsContext* CAImport::_importedLyricsContext [private] |
Definition at line 81 of file import.h.
Referenced by importedLyricsContext(), and setImportedLyricsContext().
Definition at line 82 of file import.h.
Referenced by importedFunctionMarkingContext(), and setImportedFunctionMarkingContext().
CAImportPart CAImport::_importPart [private] |
1.5.3