Skip to content
Permalink
Browse files

rename Xml() -> XmlWriter()

  • Loading branch information...
wschweer committed Nov 19, 2016
1 parent bb7d535 commit c5f46bb208f27d9179fa0817335d838128979da2
Showing with 894 additions and 864 deletions.
  1. +1 −1 libmscore/CMakeLists.txt
  2. +1 −1 libmscore/accidental.cpp
  3. +2 −2 libmscore/accidental.h
  4. +1 −1 libmscore/ambitus.cpp
  5. +1 −1 libmscore/ambitus.h
  6. +1 −1 libmscore/arpeggio.cpp
  7. +1 −1 libmscore/arpeggio.h
  8. +1 −1 libmscore/articulation.cpp
  9. +1 −1 libmscore/articulation.h
  10. +1 −1 libmscore/audio.cpp
  11. +2 −2 libmscore/audio.h
  12. +2 −2 libmscore/bagpembell.cpp
  13. +1 −1 libmscore/bagpembell.h
  14. +1 −1 libmscore/barline.cpp
  15. +1 −1 libmscore/barline.h
  16. +1 −1 libmscore/beam.cpp
  17. +1 −1 libmscore/beam.h
  18. +1 −1 libmscore/bend.cpp
  19. +1 −1 libmscore/bend.h
  20. +2 −2 libmscore/box.cpp
  21. +3 −3 libmscore/box.h
  22. +1 −1 libmscore/bracket.cpp
  23. +1 −1 libmscore/bracket.h
  24. +1 −1 libmscore/breath.cpp
  25. +1 −1 libmscore/breath.h
  26. +1 −1 libmscore/bsymbol.cpp
  27. +1 −1 libmscore/bsymbol.h
  28. +1 −1 libmscore/chord.cpp
  29. +1 −1 libmscore/chord.h
  30. +1 −1 libmscore/chordline.cpp
  31. +1 −1 libmscore/chordline.h
  32. +5 −5 libmscore/chordlist.cpp
  33. +4 −4 libmscore/chordlist.h
  34. +2 −2 libmscore/chordrest.cpp
  35. +2 −2 libmscore/chordrest.h
  36. +1 −1 libmscore/clef.cpp
  37. +2 −2 libmscore/clef.h
  38. +1 −1 libmscore/drumset.cpp
  39. +2 −2 libmscore/drumset.h
  40. +2 −2 libmscore/duration.cpp
  41. +2 −2 libmscore/duration.h
  42. +1 −1 libmscore/dynamic.cpp
  43. +1 −1 libmscore/dynamic.h
  44. +5 −5 libmscore/element.cpp
  45. +6 −6 libmscore/element.h
  46. +2 −2 libmscore/elementlayout.cpp
  47. +3 −3 libmscore/elementlayout.h
  48. +1 −1 libmscore/excerpt.h
  49. +4 −4 libmscore/figuredbass.cpp
  50. +4 −4 libmscore/figuredbass.h
  51. +1 −1 libmscore/fingering.cpp
  52. +1 −1 libmscore/fingering.h
  53. +2 −2 libmscore/fret.cpp
  54. +2 −2 libmscore/fret.h
  55. +1 −1 libmscore/glissando.cpp
  56. +1 −1 libmscore/glissando.h
  57. +1 −1 libmscore/groups.cpp
  58. +2 −2 libmscore/groups.h
  59. +1 −1 libmscore/hairpin.cpp
  60. +1 −1 libmscore/hairpin.h
  61. +1 −1 libmscore/harmony.cpp
  62. +1 −1 libmscore/harmony.h
  63. +1 −1 libmscore/icon.cpp
  64. +1 −1 libmscore/icon.h
  65. +1 −1 libmscore/image.cpp
  66. +1 −1 libmscore/image.h
  67. +1 −1 libmscore/instrchange.cpp
  68. +1 −1 libmscore/instrchange.h
  69. +6 −6 libmscore/instrtemplate.cpp
  70. +5 −5 libmscore/instrtemplate.h
  71. +7 −7 libmscore/instrument.cpp
  72. +7 −7 libmscore/instrument.h
  73. +1 −1 libmscore/jump.cpp
  74. +1 −1 libmscore/jump.h
  75. +1 −1 libmscore/key.h
  76. +1 −1 libmscore/keysig.cpp
  77. +1 −1 libmscore/keysig.h
  78. +1 −1 libmscore/layoutbreak.cpp
  79. +1 −1 libmscore/layoutbreak.h
  80. +2 −2 libmscore/line.cpp
  81. +2 −2 libmscore/line.h
  82. +1 −1 libmscore/lyrics.cpp
  83. +1 −1 libmscore/lyrics.h
  84. +1 −1 libmscore/marker.cpp
  85. +1 −1 libmscore/marker.h
  86. +1 −1 libmscore/measure.cpp
  87. +4 −4 libmscore/measure.h
  88. +1 −1 libmscore/measurebase.cpp
  89. +3 −3 libmscore/measurebase.h
  90. +18 −18 libmscore/note.cpp
  91. +1 −1 libmscore/note.h
  92. +1 −1 libmscore/noteevent.cpp
  93. +2 −2 libmscore/noteevent.h
  94. +1 −1 libmscore/ottava.cpp
  95. +1 −1 libmscore/ottava.h
  96. +2 −2 libmscore/page.cpp
  97. +3 −3 libmscore/page.h
  98. +3 −3 libmscore/part.cpp
  99. +2 −2 libmscore/part.h
  100. +2 −2 libmscore/pos.cpp
  101. +3 −3 libmscore/pos.h
  102. +1 −1 libmscore/rest.cpp
  103. +1 −1 libmscore/rest.h
  104. +3 −3 libmscore/revisions.cpp
  105. +4 −4 libmscore/revisions.h
  106. +1 −1 libmscore/score.cpp
  107. +3 −3 libmscore/score.h
  108. +1 −1 libmscore/scoreElement.cpp
  109. +2 −2 libmscore/scoreElement.h
  110. +7 −7 libmscore/scorefile.cpp
  111. +1 −1 libmscore/segment.cpp
  112. +1 −1 libmscore/segment.h
  113. +2 −2 libmscore/select.cpp
  114. +2 −2 libmscore/sig.cpp
  115. +3 −3 libmscore/sig.h
  116. +1 −1 libmscore/slur.cpp
  117. +1 −1 libmscore/slur.h
  118. +2 −2 libmscore/slurtie.cpp
  119. +2 −2 libmscore/slurtie.h
  120. +1 −1 libmscore/spacer.cpp
  121. +1 −1 libmscore/spacer.h
  122. +1 −1 libmscore/staff.cpp
  123. +2 −3 libmscore/staff.h
  124. +1 −1 libmscore/staffstate.cpp
  125. +1 −1 libmscore/staffstate.h
  126. +1 −1 libmscore/stafftext.cpp
  127. +1 −1 libmscore/stafftext.h
  128. +1 −1 libmscore/stafftype.cpp
  129. +2 −2 libmscore/stafftype.h
  130. +1 −1 libmscore/stem.cpp
  131. +1 −1 libmscore/stem.h
  132. +2 −2 libmscore/stringdata.cpp
  133. +2 −3 libmscore/stringdata.h
  134. +1 −1 libmscore/style.cpp
  135. +2 −2 libmscore/style.h
  136. +2 −2 libmscore/symbol.cpp
  137. +2 −2 libmscore/symbol.h
  138. +1 −1 libmscore/synthesizerstate.cpp
  139. +2 −2 libmscore/synthesizerstate.h
  140. +1 −1 libmscore/system.cpp
  141. +1 −1 libmscore/system.h
  142. +1 −1 libmscore/systemdivider.cpp
  143. +1 −1 libmscore/systemdivider.h
  144. +1 −1 libmscore/tempo.h
  145. +1 −1 libmscore/tempotext.cpp
  146. +1 −1 libmscore/tempotext.h
  147. +5 −5 libmscore/text.cpp
  148. +4 −4 libmscore/text.h
  149. +1 −1 libmscore/textframe.cpp
  150. +1 −1 libmscore/textframe.h
  151. +2 −2 libmscore/textlinebase.cpp
  152. +2 −2 libmscore/textlinebase.h
  153. +6 −6 libmscore/textstyle.cpp
  154. +4 −4 libmscore/textstyle.h
  155. +4 −4 libmscore/textstyle_p.h
  156. +1 −1 libmscore/tie.cpp
  157. +1 −1 libmscore/tie.h
  158. +1 −1 libmscore/timesig.cpp
  159. +1 −1 libmscore/timesig.h
  160. +1 −1 libmscore/tremolo.cpp
  161. +1 −1 libmscore/tremolo.h
  162. +1 −1 libmscore/tremolobar.cpp
  163. +1 −1 libmscore/tremolobar.h
  164. +1 −1 libmscore/trill.cpp
  165. +1 −1 libmscore/trill.h
  166. +1 −1 libmscore/tuplet.cpp
  167. +1 −1 libmscore/tuplet.h
  168. +1 −1 libmscore/utils.cpp
  169. +1 −1 libmscore/volta.cpp
  170. +2 −2 libmscore/volta.h
  171. +5 −8 libmscore/xml.h
  172. +419 −0 libmscore/xmlreader.cpp
  173. +28 −412 libmscore/{xml.cpp → xmlwriter.cpp}
  174. +2 −2 mscore/album.cpp
  175. +3 −3 mscore/album.h
  176. +1 −1 mscore/albummanager.cpp
  177. +1 −1 mscore/editdrumset.cpp
  178. +63 −63 mscore/exportxml.cpp
  179. +1 −1 mscore/importgtp.cpp
  180. +1 −1 mscore/importmidi/importmidi.cpp
  181. +1 −1 mscore/instrdialog.cpp
  182. +1 −1 mscore/musescore.cpp
  183. +1 −1 mscore/musescore.h
  184. +3 −3 mscore/musicxmlfonthandler.cpp
  185. +1 −1 mscore/musicxmlfonthandler.h
  186. +6 −6 mscore/palette.cpp
  187. +2 −2 mscore/palette.h
  188. +1 −1 mscore/palettebox.cpp
  189. +2 −2 mscore/palettebox.h
  190. +1 −1 mscore/preferences.cpp
  191. +2 −2 mscore/savePositions.cpp
  192. +2 −2 mscore/scoreview.h
  193. +2 −2 mscore/shortcut.cpp
  194. +2 −2 mscore/shortcut.h
  195. +1 −1 mscore/synthcontrol.cpp
  196. +3 −3 mscore/workspace.cpp
  197. +1 −1 mtest/libmscore/text/tst_text.cpp
  198. +1 −1 mtest/testutils.cpp
  199. +1 −1 omr/omr.cpp
  200. +3 −3 omr/omr.h
  201. +11 −11 omr/omrpage.cpp
  202. +3 −3 omr/omrpage.h
  203. +2 −2 synthesizer/event.cpp
  204. +3 −3 synthesizer/event.h
@@ -54,7 +54,7 @@ add_library (
sym.cpp system.cpp stringdata.cpp tempotext.cpp text.cpp
textframe.cpp textline.cpp textlinebase.cpp timesig.cpp
tremolobar.cpp tremolo.cpp trill.cpp tuplet.cpp
utils.cpp velo.cpp volta.cpp xml.cpp mscore.cpp
utils.cpp velo.cpp volta.cpp xmlreader.cpp xmlwriter.cpp mscore.cpp
undo.cpp cmd.cpp scorefile.cpp revisions.cpp
check.cpp input.cpp icon.cpp ossia.cpp
tempo.cpp sig.cpp pos.cpp fraction.cpp duration.cpp
@@ -177,7 +177,7 @@ void Accidental::read(XmlReader& e)
// write
//---------------------------------------------------------

void Accidental::write(Xml& xml) const
void Accidental::write(XmlWriter& xml) const
{
xml.stag(name());
writeProperty(xml, P_ID::ACCIDENTAL_BRACKET);
@@ -201,7 +201,7 @@ class Accidental : public Element {
FLAT_SLASH,
SHARP_SLASH3,
SHARP_SLASH2,

// Extended Helmholtz-Ellis accidentals (just intonation)
DOUBLE_FLAT_ONE_ARROW_DOWN,
FLAT_ONE_ARROW_DOWN,
@@ -310,7 +310,7 @@ class Accidental : public Element {
void undoSetSmall(bool val);

virtual void read(XmlReader&) override;
virtual void write(Xml& xml) const override;
virtual void write(XmlWriter& xml) const override;

virtual QVariant getProperty(P_ID propertyId) const override;
virtual bool setProperty(P_ID propertyId, const QVariant&) override;
@@ -180,7 +180,7 @@ void Ambitus::setBottomTpc(int val)
// write
//---------------------------------------------------------

void Ambitus::write(Xml& xml) const
void Ambitus::write(XmlWriter& xml) const
{
xml.stag("Ambitus");
xml.tag(P_ID::HEAD_GROUP, int(_noteHeadGroup), int(NOTEHEADGROUP_DEFAULT));
@@ -88,7 +88,7 @@ class Ambitus : public Element {
virtual void read(XmlReader&) override;
virtual void scanElements(void* data, void (*func)(void*, Element*), bool all=true) override;
virtual void setTrack(int val) override;
virtual void write(Xml&) const override;
virtual void write(XmlWriter&) const override;
virtual bool readProperties(XmlReader&) override;
virtual QString accessibleInfo() const override;
virtual QString screenReaderInfo() const override;
@@ -52,7 +52,7 @@ void Arpeggio::setHeight(qreal h)
// write
//---------------------------------------------------------

void Arpeggio::write(Xml& xml) const
void Arpeggio::write(XmlWriter& xml) const
{
if (!xml.canWrite(this))
return;
@@ -69,7 +69,7 @@ class Arpeggio : public Element {
virtual bool edit(MuseScoreView*, Grip, int key, Qt::KeyboardModifiers, const QString&) override;

virtual void read(XmlReader& e) override;
virtual void write(Xml& xml) const override;
virtual void write(XmlWriter& xml) const override;

int span() const { return _span; }
void setSpan(int val) { _span = val; }
@@ -134,7 +134,7 @@ bool Articulation::readProperties(XmlReader& e)
// write
//---------------------------------------------------------

void Articulation::write(Xml& xml) const
void Articulation::write(XmlWriter& xml) const
{
if (!xml.canWrite(this))
return;
@@ -91,7 +91,7 @@ class Articulation : public Element {
virtual void layout() override;

virtual void read(XmlReader&) override;
virtual void write(Xml& xml) const override;
virtual void write(XmlWriter& xml) const override;
virtual bool readProperties(XmlReader&) override;

virtual void reset() override;
@@ -41,7 +41,7 @@ void Audio::read(XmlReader& e)
// write
//---------------------------------------------------------

void Audio::write(Xml& xml) const
void Audio::write(XmlWriter& xml) const
{
xml.stag("Audio");
xml.tag("path", _path);
@@ -15,7 +15,7 @@

namespace Ms {

class Xml;
class XmlWriter;
class XmlReader;

//---------------------------------------------------------
@@ -35,7 +35,7 @@ class Audio {
void setData(const QByteArray& ba) { _data = ba; }

void read(XmlReader&);
void write(Xml&) const;
void write(XmlWriter&) const;
};


@@ -355,7 +355,7 @@ noteList BagpipeEmbellishment::getNoteList() const
// write
//---------------------------------------------------------

void BagpipeEmbellishment::write(Xml& xml) const
void BagpipeEmbellishment::write(XmlWriter& xml) const
{
xml.stag(name());
xml.tag("subtype", _embelType);
@@ -458,7 +458,7 @@ static void symMetrics(const char* name, const Sym& headsym)
headsym.getAttach().y());
}
*/

//---------------------------------------------------------
// mag
// return fixed magnification
@@ -62,7 +62,7 @@ class BagpipeEmbellishment : public Element {
int embelType() const { return _embelType; }
void setEmbelType(int val) { _embelType = val; }
virtual qreal mag() const override;
virtual void write(Xml&) const override;
virtual void write(XmlWriter&) const override;
virtual void read(XmlReader&) override;
virtual void layout() override;
virtual void draw(QPainter*) const override;
@@ -503,7 +503,7 @@ void BarLine::draw(QPainter* painter) const
// write
//---------------------------------------------------------

void BarLine::write(Xml& xml) const
void BarLine::write(XmlWriter& xml) const
{
xml.stag("BarLine");
xml.tag("subtype", barLineTypeName());
@@ -90,7 +90,7 @@ class BarLine : public Element {

virtual BarLine* clone() const override { return new BarLine(*this); }
virtual Element::Type type() const override { return Element::Type::BAR_LINE; }
virtual void write(Xml& xml) const override;
virtual void write(XmlWriter& xml) const override;
virtual void read(XmlReader&) override;
virtual void draw(QPainter*) const override;
virtual QPointF pagePos() const override; ///< position in canvas coordinates
@@ -2012,7 +2012,7 @@ void Beam::spatiumChanged(qreal oldValue, qreal newValue)
// write
//---------------------------------------------------------

void Beam::write(Xml& xml) const
void Beam::write(XmlWriter& xml) const
{
if (_elements.empty())
return;
@@ -92,7 +92,7 @@ class Beam : public Element {
virtual void updateGrips(Grip*, QVector<QRectF>&) const override;
virtual int grips() const override { return 2; }

virtual void write(Xml& xml) const override;
virtual void write(XmlWriter& xml) const override;
virtual void read(XmlReader&) override;
virtual void spatiumChanged(qreal /*oldValue*/, qreal /*newValue*/) override;

@@ -255,7 +255,7 @@ void Bend::draw(QPainter* painter) const
// write
//---------------------------------------------------------

void Bend::write(Xml& xml) const
void Bend::write(XmlWriter& xml) const
{
xml.stag("Bend");
foreach(const PitchValue& v, _points) {
@@ -39,7 +39,7 @@ class Bend : public Element {
virtual Element::Type type() const override { return Element::Type::BEND; }
virtual void layout() override;
virtual void draw(QPainter*) const override;
virtual void write(Xml&) const override;
virtual void write(XmlWriter&) const override;
virtual void read(XmlReader& e) override;
QList<PitchValue>& points() { return _points; }
const QList<PitchValue>& points() const { return _points; }
@@ -169,7 +169,7 @@ void Box::updateGrips(Grip* defaultGrip, QVector<QRectF>& grip) const
// write
//---------------------------------------------------------

void Box::write(Xml& xml) const
void Box::write(XmlWriter& xml) const
{
xml.stag(name());
writeProperties(xml);
@@ -180,7 +180,7 @@ void Box::write(Xml& xml) const
// writeProperties
//---------------------------------------------------------

void Box::writeProperties(Xml& xml) const
void Box::writeProperties(XmlWriter& xml) const
{
writeProperty(xml, P_ID::BOX_HEIGHT);
writeProperty(xml, P_ID::BOX_WIDTH);
@@ -59,9 +59,9 @@ class Box : public MeasureBase {
virtual void updateGrips(Grip*, QVector<QRectF>&) const override;
virtual int grips() const override { return 1; }
virtual void layout() override;
virtual void write(Xml&) const override;
virtual void write(Xml& xml, int, bool) const override { write(xml); }
virtual void writeProperties(Xml&) const override;
virtual void write(XmlWriter&) const override;
virtual void write(XmlWriter& xml, int, bool) const override { write(xml); }
virtual void writeProperties(XmlWriter&) const override;
virtual bool readProperties(XmlReader&) override;
virtual void read(XmlReader&) override;
virtual bool acceptDrop(const DropData&) const override;
@@ -257,7 +257,7 @@ void Bracket::draw(QPainter* painter) const
// Bracket::write
//---------------------------------------------------------

void Bracket::write(Xml& xml) const
void Bracket::write(XmlWriter& xml) const
{
switch (bracketType()) {
case BracketType::BRACE:
@@ -69,7 +69,7 @@ class Bracket : public Element {
virtual qreal width() const override;

virtual void draw(QPainter*) const override;
virtual void write(Xml& xml) const override;
virtual void write(XmlWriter& xml) const override;
virtual void read(XmlReader&) override;
virtual void layout() override;

@@ -73,7 +73,7 @@ void Breath::layout()
// write
//---------------------------------------------------------

void Breath::write(Xml& xml) const
void Breath::write(XmlWriter& xml) const
{
if (!xml.canWrite(this))
return;
@@ -56,7 +56,7 @@ class Breath : public Element {

virtual void draw(QPainter*) const override;
virtual void layout() override;
virtual void write(Xml&) const override;
virtual void write(XmlWriter&) const override;
virtual void read(XmlReader&) override;
virtual QPointF pagePos() const override; ///< position in page coordinates

@@ -43,7 +43,7 @@ BSymbol::BSymbol(const BSymbol& s)
// writeProperties
//---------------------------------------------------------

void BSymbol::writeProperties(Xml& xml) const
void BSymbol::writeProperties(XmlWriter& xml) const
{
if (_systemFlag)
xml.tag("systemFlag", _systemFlag);
@@ -43,7 +43,7 @@ class BSymbol : public Element, public ElementLayout {
virtual void layout() override;
virtual QRectF drag(EditData*) override;

void writeProperties(Xml& xml) const;
void writeProperties(XmlWriter& xml) const;
bool readProperties(XmlReader&);

const QList<Element*>& leafs() const { return _leafs; }
@@ -896,7 +896,7 @@ Note* Chord::selectedNote() const
// Chord::write
//---------------------------------------------------------

void Chord::write(Xml& xml) const
void Chord::write(XmlWriter& xml) const
{
for (Chord* c : _graceNotes) {
c->writeBeam(xml);
@@ -118,7 +118,7 @@ class Chord : public ChordRest {
virtual Element::Type type() const { return Element::Type::CHORD; }
virtual qreal mag() const;

virtual void write(Xml& xml) const override;
virtual void write(XmlWriter& xml) const override;
virtual void read(XmlReader&) override;
virtual bool readProperties(XmlReader&) override;
virtual void setSelected(bool f) override;
@@ -208,7 +208,7 @@ void ChordLine::read(XmlReader& e)
// write
//---------------------------------------------------------

void ChordLine::write(Xml& xml) const
void ChordLine::write(XmlWriter& xml) const
{
xml.stag(name());
xml.tag("subtype", int(_chordLineType));
@@ -59,7 +59,7 @@ class ChordLine : public Element {
virtual void setLengthY(float length) { _lengthY = length; }

virtual void read(XmlReader&);
virtual void write(Xml& xml) const;
virtual void write(XmlWriter& xml) const;
virtual void layout();
virtual void draw(QPainter*) const;

@@ -326,7 +326,7 @@ static void readRenderList(QString val, QList<RenderAction>& renderList)
// writeRenderList
//---------------------------------------------------------

static void writeRenderList(Xml& xml, const QList<RenderAction>* al, const QString& name)
static void writeRenderList(XmlWriter& xml, const QList<RenderAction>* al, const QString& name)
{
QString s;

@@ -388,7 +388,7 @@ void ChordToken::read(XmlReader& e)
// write
//---------------------------------------------------------

void ChordToken::write(Xml& xml) const
void ChordToken::write(XmlWriter& xml) const
{
QString t = "token";
switch (tokenClass) {
@@ -1534,7 +1534,7 @@ void ChordDescription::read(XmlReader& e)
// write
//---------------------------------------------------------

void ChordDescription::write(Xml& xml) const
void ChordDescription::write(XmlWriter& xml) const
{
if (generated && !exportOk)
return;
@@ -1654,7 +1654,7 @@ void ChordList::read(XmlReader& e)
// write
//---------------------------------------------------------

void ChordList::write(Xml& xml) const
void ChordList::write(XmlWriter& xml) const
{
int fontIdx = 0;
foreach (ChordFont f, fonts) {
@@ -1757,7 +1757,7 @@ bool ChordList::write(const QString& name) const
return false;
}

Xml xml(0, &f);
XmlWriter xml(0, &f);
xml.header();
xml.stag("museScore version=\"" MSC_VERSION "\"");

@@ -15,7 +15,7 @@

namespace Ms {

class Xml;
class XmlWriter;
class XmlReader;
class ChordList;

@@ -114,7 +114,7 @@ class ChordToken {
QStringList names;
QList<RenderAction> renderList;
void read(XmlReader&);
void write(Xml&) const;
void write(XmlWriter&) const;
};

//---------------------------------------------------------
@@ -195,7 +195,7 @@ struct ChordDescription {
QString quality() const { return _quality; }
void complete(ParsedChord* pc, const ChordList*);
void read(XmlReader&);
void write(Xml&) const;
void write(XmlWriter&) const;
};

//---------------------------------------------------------
@@ -235,7 +235,7 @@ class ChordList : public QMap<int, ChordDescription> {
QList<ChordToken> chordTokenList;
static int privateID;

void write(Xml& xml) const;
void write(XmlWriter& xml) const;
void read(XmlReader&);
bool read(const QString&);
bool write(const QString&) const;
Oops, something went wrong.

0 comments on commit c5f46bb

Please sign in to comment.
You can’t perform that action at this time.