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
import
canorusmlimport.h
Go to the documentation of this file.
1
8
#ifndef CANORUSMLIMPORT_H_
9
#define CANORUSMLIMPORT_H_
10
11
#include <QStack>
12
#include <QHash>
13
#include <QXmlDefaultHandler>
14
#include <QColor>
15
16
#include "
import/import.h
"
17
18
#include "
core/diatonicpitch.h
"
19
#include "
core/playablelength.h
"
20
#include "
core/diatonickey.h
"
21
22
class
CAContext
;
23
class
CAKeySignature
;
24
class
CATimeSignature
;
25
class
CAClef
;
26
class
CABarline
;
27
class
CANote
;
28
class
CARest
;
29
class
CASlur
;
30
class
CASyllable
;
31
class
CAMusElement
;
32
class
CAMark
;
33
class
CATuplet
;
34
35
class
CACanorusMLImport
:
public
CAImport
,
public
QXmlDefaultHandler
{
36
public
:
37
CACanorusMLImport
( QTextStream *
stream
=0 );
38
CACanorusMLImport
(
const
QString
stream
);
39
virtual
~CACanorusMLImport
();
40
41
void
initCanorusMLImport
();
42
43
CADocument
*
importDocumentImpl
();
44
45
bool
startElement
(
const
QString& namespaceURI,
const
QString& localName,
const
QString& qName,
46
const
QXmlAttributes& attributes);
47
bool
endElement
(
const
QString& namespaceURI,
const
QString& localName,
48
const
QString& qName);
49
bool
fatalError
(
const
QXmlParseException& exception);
50
bool
characters
(
const
QString& ch);
51
52
private
:
53
void
importMark
(
const
QXmlAttributes& attributes );
54
void
importResource
(
const
QXmlAttributes& attributes );
55
56
inline
CADocument
*
document
() {
return
_document
; }
57
CADocument
*
_document
;
58
59
QString
_version
;
60
QString
_errorMsg
;
61
QStack<QString>
_depth
;
62
63
// Pointers to the current elements when reading the XML file
64
CASheet
*
_curSheet
;
65
CAContext
*
_curContext
;
66
CAVoice
*
_curVoice
;
67
CAKeySignature
*
_curKeySig
;
68
CATimeSignature
*
_curTimeSig
;
69
CAClef
*
_curClef
;
70
CABarline
*
_curBarline
;
71
CANote
*
_curNote
;
72
CARest
*
_curRest
;
73
CAMusElement
*
_curMusElt
;
74
CAMark
*
_curMark
;
75
CASlur
*
_curTie
;
76
CASlur
*
_curSlur
;
77
CATuplet
*
_curTuplet
;
78
CASlur
*
_curPhrasingSlur
;
79
CADiatonicPitch
_curDiatonicPitch
;
80
CADiatonicKey
_curDiatonicKey
;
81
CAPlayableLength
_curPlayableLength
;
82
CAPlayableLength
_curTempoPlayableLength
;
83
QHash<CALyricsContext*, int>
_lcMap
;
// lyrics context associated voice indices
84
QHash<CASyllable*, int>
_syllableMap
;
// syllable associated voice indices
85
QColor
_color
;
// foreground color of elements
86
88
// Temporary properties for each XML stanza //
90
QString
_cha
;
91
};
92
93
#endif
/* CANORUSMLIMPORT_H_ */
Generated on Fri Jan 11 2013 14:40:12 for Canorus by
1.8.3