Canorus  0.7
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
import.h
Go to the documentation of this file.
1 
8 #ifndef IMPORT_H_
9 #define IMPORT_H_
10 
11 #include "core/file.h"
12 
13 class CADocument;
14 class CASheet;
15 class CAStaff;
16 class CAVoice;
17 class CALyricsContext;
19 
20 class CAImport : public CAFile {
21 #ifndef SWIG
22  Q_OBJECT
23 #endif
24 public:
25  CAImport( QTextStream *stream=0 );
26  CAImport( const QString stream );
27  virtual ~CAImport();
28 
29  virtual const QString readableStatus();
30  void importDocument();
31  void importSheet();
32  void importStaff();
33  void importVoice();
34  void importLyricsContext();
36 
38  inline CASheet *importedSheet() { return _importedSheet; }
39  inline CAStaff *importedStaff() { return _importedStaff; }
40  inline CAVoice *importedVoice() { return _importedVoice; }
43 
44 #ifndef SWIG
45 signals:
47  void sheetImported( CASheet* );
48  void staffImported( CAStaff* );
49  void voiceImported( CAVoice* );
52 
53  void importDone( int status );
54 #endif
55 
56 protected:
57  virtual CADocument *importDocumentImpl() { setStatus(0); return 0; }
58  virtual CASheet *importSheetImpl() { setStatus(0); return 0; }
59  virtual CAStaff *importStaffImpl() { setStatus(0); return 0; }
60  virtual CAVoice *importVoiceImpl() { setStatus(0); return 0; }
61  virtual CALyricsContext *importLyricsContextImpl() { setStatus(0); return 0; }
63 #ifndef SWIG
64  QTextStream& in() { return *stream(); }
65 #else
66  QTextStream& _in() { return *stream(); }
67 #endif
68 
69 private:
70  inline void setImportedDocument( CADocument *doc ) { _importedDocument = doc; }
71  inline void setImportedSheet( CASheet *sheet ) { _importedSheet = sheet; }
72  inline void setImportedStaff( CAStaff *staff ) { _importedStaff = staff; }
73  inline void setImportedVoice( CAVoice *voice ) { _importedVoice = voice; }
76 
83 
84  enum CAImportPart {
92  };
93 
94  void run();
95  inline void setImportPart( CAImportPart part ) { _importPart = part; }
96  inline CAImportPart importPart() { return _importPart; }
97 
99 };
100 
101 #endif /* IMPORT_H_ */