Canorus
0.7
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
src
export
export.h
Go to the documentation of this file.
1
8
#ifndef EXPORT_H_
9
#define EXPORT_H_
10
11
#include "
core/file.h
"
12
#include <QString>
13
14
class
QTextStream;
15
class
CADocument
;
16
class
CASheet
;
17
class
CAStaff
;
18
class
CAVoice
;
19
class
CALyricsContext
;
20
class
CAFunctionMarkContext
;
21
22
class
CAExport
:
public
CAFile
{
23
#ifndef SWIG
24
Q_OBJECT
25
#endif
26
public
:
27
CAExport
( QTextStream *
stream
=0 );
28
virtual
~CAExport
();
29
30
virtual
const
QString
readableStatus
();
31
void
exportDocument
(
CADocument
*,
bool
bStartThread =
true
);
32
void
exportSheet
(
CASheet
* );
33
void
exportStaff
(
CAStaff
* );
34
void
exportVoice
(
CAVoice
* );
35
void
exportLyricsContext
(
CALyricsContext
* );
36
void
exportFunctionMarkContext
(
CAFunctionMarkContext
* );
37
38
inline
CADocument
*
exportedDocument
() {
return
_exportedDocument
; }
39
inline
CASheet
*
exportedSheet
() {
return
_exportedSheet
; }
40
inline
CAStaff
*
exportedStaff
() {
return
_exportedStaff
; }
41
inline
CAVoice
*
exportedVoice
() {
return
_exportedVoice
; }
42
inline
CALyricsContext
*
exportedLyricsContext
() {
return
_exportedLyricsContext
; }
43
inline
CAFunctionMarkContext
*
exportedFunctionMarkContext
() {
return
_exportedFunctionMarkContext
; }
44
45
// Methods from CAFile to be called via abstract class CAAbsExport
46
virtual
void
setStreamToFile
(
const
QString filename )
47
{
CAFile::setStreamToFile
( filename); }
48
bool
wait
(
unsigned
long
time = ULONG_MAX )
49
{
return
CAFile::wait( time ); }
50
51
#ifndef SWIG
52
signals:
53
void
documentExported
(
CADocument
* );
54
void
sheetExported
(
CASheet
* );
55
void
staffExported
(
CAStaff
* );
56
void
voiceExported
(
CAVoice
* );
57
void
lyricsContextExported
(
CALyricsContext
* );
58
void
functionMarkContextExported
(
CAFunctionMarkContext
* );
59
60
void
exportDone
(
int
status
);
61
#endif
62
63
protected
:
64
virtual
void
exportDocumentImpl
(
CADocument
* ) {
setStatus
(0);
return
; }
65
virtual
void
exportSheetImpl
(
CASheet
* ) {
setStatus
(0);
return
; }
66
virtual
void
exportStaffImpl
(
CAStaff
* ) {
setStatus
(0);
return
; }
67
virtual
void
exportVoiceImpl
(
CAVoice
* ) {
setStatus
(0);
return
; }
68
virtual
void
exportLyricsContextImpl
(
CALyricsContext
* ) {
setStatus
(0);
return
; }
69
virtual
void
exportFunctionMarkContextImpl
(
CAFunctionMarkContext
* ) {
setStatus
(0);
return
; }
70
71
inline
QTextStream&
out
() {
return
*
stream
(); }
72
73
void
run
();
74
75
private
:
76
inline
void
setExportedDocument
(
CADocument
*doc ) {
_exportedDocument
= doc; }
77
inline
void
setExportedSheet
(
CASheet
*sheet ) {
_exportedSheet
= sheet; }
78
inline
void
setExportedStaff
(
CAStaff
*staff ) {
_exportedStaff
= staff; }
79
inline
void
setExportedVoice
(
CAVoice
*voice ) {
_exportedVoice
= voice; }
80
inline
void
setExportedLyricsContext
(
CALyricsContext
*lc ) {
_exportedLyricsContext
= lc; }
81
inline
void
setExportedFunctionMarkContext
(
CAFunctionMarkContext
*fmc ) {
_exportedFunctionMarkContext
= fmc; }
82
83
CADocument
*
_exportedDocument
;
84
CASheet
*
_exportedSheet
;
85
CAStaff
*
_exportedStaff
;
86
CAVoice
*
_exportedVoice
;
87
CALyricsContext
*
_exportedLyricsContext
;
88
CAFunctionMarkContext
*
_exportedFunctionMarkContext
;
89
90
};
91
92
#endif
/* EXPORT_H_ */
Generated on Fri Jan 11 2013 14:40:12 for Canorus by
1.8.3