From 776dc95b628074122e7a71d493e2993e9c8686fd Mon Sep 17 00:00:00 2001 From: Werner Schweer Date: Mon, 27 Nov 2006 11:24:14 +0000 Subject: class Xml update --- muse/al/sig.cpp | 10 +- muse/al/tempo.cpp | 10 +- muse/al/xml.cpp | 136 ++++++++++++---------- muse/al/xml.h | 34 +++--- muse/muse/arranger/arranger.cpp | 20 ++-- muse/muse/audiogroup.cpp | 2 +- muse/muse/audioinput.cpp | 2 +- muse/muse/audiooutput.cpp | 2 +- muse/muse/cobject.cpp | 2 +- muse/muse/conf.cpp | 190 +++++++++++++++---------------- muse/muse/ctrl.cpp | 4 +- muse/muse/event.h | 1 - muse/muse/liste/listedit.cpp | 6 +- muse/muse/master/masteredit.cpp | 2 +- muse/muse/midiedit/drumedit.cpp | 8 +- muse/muse/midiedit/drummap.cpp | 24 ++-- muse/muse/midiedit/ecanvas.cpp | 2 +- muse/muse/midiedit/midieditor.cpp | 4 +- muse/muse/midiedit/pianoroll.cpp | 10 +- muse/muse/midieventbase.cpp | 2 +- muse/muse/midiinport.cpp | 2 +- muse/muse/midioutport.cpp | 8 +- muse/muse/midiplugin.cpp | 10 +- muse/muse/midirc.cpp | 8 +- muse/muse/midisynti.cpp | 10 +- muse/muse/miditrack.cpp | 14 +-- muse/muse/mixer/mixer.cpp | 22 ++-- muse/muse/mixer/rack.cpp | 2 +- muse/muse/part.cpp | 25 ++-- muse/muse/plugin.cpp | 10 +- muse/muse/plugingui.cpp | 2 +- muse/muse/shortcuts.cpp | 4 +- muse/muse/songfile.cpp | 40 +++---- muse/muse/synth.cpp | 12 +- muse/muse/track.cpp | 36 +++--- muse/muse/waveevent.cpp | 6 +- muse/muse/wavetrack.cpp | 2 +- muse/muse/widgets/splitter.cpp | 4 +- muse/synti/deicsonze/deicsonze.cpp | 26 ++--- muse/synti/deicsonze/deicsonzepreset.cpp | 156 ++++++++++++------------- muse/synti/vam/vamgui.cpp | 4 +- 41 files changed, 444 insertions(+), 430 deletions(-) diff --git a/muse/al/sig.cpp b/muse/al/sig.cpp index 3da44eb2..449cc624 100644 --- a/muse/al/sig.cpp +++ b/muse/al/sig.cpp @@ -337,7 +337,7 @@ int SigList::rasterStep(unsigned t, int raster) const void SigList::write(Xml& xml) const { - xml.tag("siglist"); + xml.stag("siglist"); for (ciSigEvent i = begin(); i != end(); ++i) i->second->write(xml, i->first); xml.etag("siglist"); @@ -372,10 +372,10 @@ void SigList::read(QDomNode node) void SigEvent::write(Xml& xml, int at) const { - xml.tag("sig at=\"%d\"", at); - xml.intTag("tick", tick); - xml.intTag("nom", sig.z); - xml.intTag("denom", sig.n); + xml.stag("sig at=\"%d\"", at); + xml.tag("tick", tick); + xml.tag("nom", sig.z); + xml.tag("denom", sig.n); xml.etag("sig"); } diff --git a/muse/al/tempo.cpp b/muse/al/tempo.cpp index 9a64f3e8..2d607db0 100644 --- a/muse/al/tempo.cpp +++ b/muse/al/tempo.cpp @@ -318,9 +318,9 @@ unsigned TempoList::frame2tick(unsigned frame, int* sn) const void TempoList::write(Xml& xml) const { - xml.tag("tempolist fix=\"%d\"", _tempo); + xml.stag("tempolist fix=\"%d\"", _tempo); if (_globalTempo != 100) - xml.intTag("globalTempo", _globalTempo); + xml.tag("globalTempo", _globalTempo); for (ciTEvent i = begin(); i != end(); ++i) i->second->write(xml, i->first); xml.etag("tempolist"); @@ -362,9 +362,9 @@ void TempoList::read(QDomNode node) void TEvent::write(Xml& xml, int at) const { - xml.tag("tempo at=\"%d\"", at); - xml.intTag("tick", tick); - xml.intTag("val", tempo); + xml.stag("tempo at=\"%d\"", at); + xml.tag("tick", tick); + xml.tag("val", tempo); xml.etag("tempo"); } diff --git a/muse/al/xml.cpp b/muse/al/xml.cpp index 616b474c..a117a5e7 100644 --- a/muse/al/xml.cpp +++ b/muse/al/xml.cpp @@ -27,19 +27,35 @@ namespace AL { // Xml //--------------------------------------------------------- +Xml::Xml() + { + level = 0; + } + Xml::Xml(QIODevice* device) : QTextStream(device) { + setCodec("utf8"); level = 0; } +//--------------------------------------------------------- +// putLevel +//--------------------------------------------------------- + +void Xml::putLevel() + { + for (int i = 0; i < level*2; ++i) + *this << ' '; + } + //--------------------------------------------------------- // header //--------------------------------------------------------- void Xml::header() { - *this << "\n"; + *this << "\n"; } //--------------------------------------------------------- @@ -51,6 +67,7 @@ void Xml::put(const char* format, ...) va_list args; va_start(args, format); putLevel(); + char buffer[BS]; vsnprintf(buffer, BS, format, args); va_end(args); *this << buffer; @@ -65,6 +82,7 @@ void Xml::nput(const char* format, ...) { va_list args; va_start(args, format); + char buffer[BS]; vsnprintf(buffer, BS, format, args); *this << buffer; va_end(args); @@ -81,15 +99,17 @@ void Xml::tdata(const QString& s) } //--------------------------------------------------------- -// tag +// stag +// //--------------------------------------------------------- -void Xml::tag(const char* format, ...) +void Xml::stag(const char* format, ...) { va_list args; va_start(args, format); putLevel(); *this << '<'; + char buffer[BS]; vsnprintf(buffer, BS, format, args); *this << buffer; va_end(args); @@ -97,99 +117,73 @@ void Xml::tag(const char* format, ...) ++level; } -void Xml::tagE(const char* format, ...) +//--------------------------------------------------------- +// etag +//--------------------------------------------------------- + +void Xml::etag(const char* s) { - va_list args; - va_start(args, format); putLevel(); - *this << '<'; - vsnprintf(buffer, BS, format, args); - *this << buffer; - va_end(args); - *this << "/>" << endl; + *this << "' << endl; + --level; } //--------------------------------------------------------- -// etag +// tagE +// //--------------------------------------------------------- -void Xml::etag(const char* format, ...) +void Xml::tagE(const char* format, ...) { va_list args; va_start(args, format); putLevel(); - *this << "' << endl; - --level; + *this << "/>" << endl; } -void Xml::putLevel() +void Xml::tag(const char* name, int val) { - for (int i = 0; i < level*2; ++i) - *this << ' '; + putLevel(); + *this << "<" << name << ">" << val << "\n"; } -void Xml::intTag(const char* name, int val) +void Xml::tag(const char* name, unsigned val) { putLevel(); *this << "<" << name << ">" << val << "\n"; } -void Xml::floatTag(const char* name, float val) +void Xml::tag(const char* name, float val) { putLevel(); *this << QString("<%1>%2\n").arg(name).arg(val).arg(name); } -void Xml::doubleTag(const char* name, double val) +void Xml::tag(const char* name, const double& val) { putLevel(); QString s("<%1>%2\n"); *this << s.arg(name).arg(val).arg(name); } -void Xml::strTag(const char* name, const char* val) +void Xml::tag(const char* name, const char* s) { - putLevel(); - *this << "<" << name << ">"; - if (val) { - while (*val) { - switch(*val) { - case '&': - *this << "&"; - break; - case '<': - *this << "<"; - break; - case '>': - *this << ">"; - break; - case '"': - *this << """; - break; - case '\'': - *this << "'"; - break; - default: - *this << *val; - break; - } - ++val; - } - } - *this << "\n"; + tag(name, QString(s)); } //--------------------------------------------------------- // colorTag //--------------------------------------------------------- -void Xml::colorTag(const char* name, const QColor& color) +void Xml::tag(const char* name, const QColor& color) { putLevel(); + char buffer[BS]; snprintf(buffer, BS, "<%s r=\"%d\" g=\"%d\" b=\"%d\" />\n", name, color.red(), color.green(), color.blue()); *this << buffer; @@ -199,33 +193,52 @@ void Xml::colorTag(const char* name, const QColor& color) // geometryTag //--------------------------------------------------------- -void Xml::geometryTag(const char* name, const QWidget* g) +void Xml::tag(const char* name, const QWidget* g) { - qrectTag(name, QRect(g->pos(), g->size())); + tag(name, QRect(g->pos(), g->size())); } //--------------------------------------------------------- // qrectTag //--------------------------------------------------------- -void Xml::qrectTag(const char* name, const QRect& r) +void Xml::tag(const char* name, const QRect& r) { putLevel(); *this << "<" << name; + char buffer[BS]; snprintf(buffer, BS, " x=\"%d\" y=\"%d\" w=\"%d\" h=\"%d\" />\n", r.x(), r.y(), r.width(), r.height()); *this << buffer; } +//--------------------------------------------------------- +// xmlString +//--------------------------------------------------------- + +QString Xml::xmlString(const QString& ss) + { + QString s(ss); + s.replace('&', "&"); + s.replace('<', "<"); + s.replace('>', ">"); + s.replace('\'', "'"); + s.replace('"', """); + return s; + } + //--------------------------------------------------------- // strTag //--------------------------------------------------------- -void Xml::strTag(const char* name, const QString& val) +void Xml::tag(const char* name, const QString& val) { - strTag(name, val.toLatin1().data()); + putLevel(); + *this << "<" << name << ">"; + *this << xmlString(val) << "\n"; } + //--------------------------------------------------------- // readGeometry //--------------------------------------------------------- @@ -263,22 +276,23 @@ void Xml::writeProperties(const QObject* o) switch(v.type()) { case QVariant::Bool: case QVariant::Int: - intTag(name, v.toInt()); + tag(name, v.toInt()); break; case QVariant::Double: - doubleTag(name, v.toDouble()); + tag(name, v.toDouble()); break; case QVariant::String: - strTag(name, v.toString()); + tag(name, v.toString()); break; case QVariant::Rect: - qrectTag(name, v.toRect()); + tag(name, v.toRect()); break; case QVariant::Point: { QPoint p = v.toPoint(); putLevel(); *this << "<" << name; + char buffer[BS]; snprintf(buffer, BS, " x=\"%d\" y=\"%d\" />\n", p.x(), p.y()); *this << buffer; diff --git a/muse/al/xml.h b/muse/al/xml.h index 4c438c3b..e71b57a8 100644 --- a/muse/al/xml.h +++ b/muse/al/xml.h @@ -23,35 +23,43 @@ namespace AL { -static const int BS = 2048; - //--------------------------------------------------------- // Xml //--------------------------------------------------------- class Xml : public QTextStream { - char buffer[BS]; + static const int BS = 2048; int level; public: + Xml(); Xml(QIODevice*); + void header(); void putLevel(); + void put(const char* format, ...); void nput(const char* format, ...); - void tag(const char* format, ...); - void etag(const char* format, ...); + + void stag(const char* format, ...); + void etag(const char* format); + void tagE(const char* format, ...); void tdata(const QString&); - void intTag(const char* const name, int val); - void doubleTag(const char* const name, double val); - void floatTag(const char* const name, float val); - void strTag(const char* const name, const char* val); - void strTag(const char* const name, const QString& s); - void colorTag(const char* name, const QColor& color); - void geometryTag(const char* name, const QWidget* g); - void qrectTag(const char* name, const QRect& r); + + void tag(const char* name, int); + void tag(const char* name, unsigned); + void tag(const char* name, const double& val); + void tag(const char* name, float val); + void tag(const char* name, const char* val); + void tag(const char* name, const QString& s); + void tag(const char* name, const QColor& color); + void tag(const char* name, const QWidget* g); + void tag(const char* name, const QRect& r); + void writeProperties(const QObject*); + + static QString xmlString(const QString&); }; extern QRect readGeometry(QDomNode); diff --git a/muse/muse/arranger/arranger.cpp b/muse/muse/arranger/arranger.cpp index aa3309ac..cf8bbb14 100644 --- a/muse/muse/arranger/arranger.cpp +++ b/muse/muse/arranger/arranger.cpp @@ -1022,27 +1022,27 @@ void Arranger::readStatus(QDomNode node) void Arranger::writeStatus(Xml& xml) { - xml.tag("arranger"); + xml.stag("arranger"); for (int i = 0; i < Track::TRACK_TYPES; ++i) { TrGroupList* gl = &glist[i]; - xml.tag("TrackConf type=\"%d\"", i); + xml.stag("TrackConf type=\"%d\"", i); for (iTrGroup ig = gl->begin(); ig != gl->end(); ++ig) { TrElementList& el = *ig; - xml.tag("group"); + xml.stag("group"); for (iTrElement ie = el.begin(); ie != el.end(); ++ie) xml.tagE("element id=\"%d\"", (*ie)->id); xml.etag("group"); } xml.etag("TrackConf"); } - xml.intTag("info", trackInfoVisible); - xml.intTag("strip", mixerStripVisible); - xml.doubleTag("hmag", canvas->xmag()); - xml.doubleTag("vmag", canvas->ymag()); - xml.intTag("hpos", canvas->getWPos().x()); - xml.intTag("vpos", canvas->getWPos().y()); - xml.intTag("raster", muse->raster()); + xml.tag("info", trackInfoVisible); + xml.tag("strip", mixerStripVisible); + xml.tag("hmag", canvas->xmag()); + xml.tag("vmag", canvas->ymag()); + xml.tag("hpos", canvas->getWPos().x()); + xml.tag("vpos", canvas->getWPos().y()); + xml.tag("raster", muse->raster()); split->writeStatus("splitter", xml); xml.etag("arranger"); } diff --git a/muse/muse/audiogroup.cpp b/muse/muse/audiogroup.cpp index c979331e..7adc30e5 100644 --- a/muse/muse/audiogroup.cpp +++ b/muse/muse/audiogroup.cpp @@ -40,7 +40,7 @@ void AudioGroup::read(QDomNode node) void AudioGroup::write(Xml& xml) const { - xml.tag("AudioGroup"); + xml.stag("AudioGroup"); AudioTrack::writeProperties(xml); xml.etag("AudioGroup"); } diff --git a/muse/muse/audioinput.cpp b/muse/muse/audioinput.cpp index 6112d15f..7bd6d03a 100644 --- a/muse/muse/audioinput.cpp +++ b/muse/muse/audioinput.cpp @@ -68,7 +68,7 @@ AudioInput::~AudioInput() void AudioInput::write(Xml& xml) const { - xml.tag("AudioInput"); + xml.stag("AudioInput"); AudioTrack::writeProperties(xml); xml.etag("AudioInput"); } diff --git a/muse/muse/audiooutput.cpp b/muse/muse/audiooutput.cpp index 26af8fd8..6d58896c 100644 --- a/muse/muse/audiooutput.cpp +++ b/muse/muse/audiooutput.cpp @@ -70,7 +70,7 @@ AudioOutput::~AudioOutput() void AudioOutput::write(Xml& xml) const { - xml.tag("AudioOutput"); + xml.stag("AudioOutput"); AudioTrack::writeProperties(xml); xml.etag("AudioOutput"); } diff --git a/muse/muse/cobject.cpp b/muse/muse/cobject.cpp index 6ba7e7fb..6339a2b7 100644 --- a/muse/muse/cobject.cpp +++ b/muse/muse/cobject.cpp @@ -48,7 +48,7 @@ void TopWin::read(QDomNode node) void TopWin::write(Xml& xml) const { - xml.tag(metaObject()->className()); + xml.stag(metaObject()->className()); xml.writeProperties(this); xml.etag(metaObject()->className()); } diff --git a/muse/muse/conf.cpp b/muse/muse/conf.cpp index b91f7715..87b6fcb7 100644 --- a/muse/muse/conf.cpp +++ b/muse/muse/conf.cpp @@ -374,7 +374,7 @@ void MusE::writeGlobalConfiguration() const } Xml xml(&f); xml.header(); - xml.tag("muse version=\"2.0\""); + xml.stag("muse version=\"2.0\""); writeGlobalConfiguration(xml); xml.etag("muse"); f.close(); @@ -382,39 +382,39 @@ void MusE::writeGlobalConfiguration() const void MusE::writeGlobalConfiguration(Xml& xml) const { - xml.tag("configuration"); - - xml.intTag("division", config.division); - xml.intTag("rtcTicks", config.rtcTicks); - xml.intTag("minMeter", config.minMeter); - xml.doubleTag("minSlider", config.minSlider); - xml.intTag("guiRefresh", config.guiRefresh); - xml.intTag("peakHoldTime", config.peakHoldTime); - xml.strTag("helpBrowser", config.helpBrowser); - xml.intTag("extendedMidi", config.extendedMidi); - xml.intTag("midiExportDivision", config.midiDivision); - xml.intTag("guiDivision", config.guiDivision); - xml.strTag("copyright", config.copyright); - xml.intTag("smfFormat", config.smfFormat); - xml.intTag("startMode", config.startMode); + xml.stag("configuration"); + + xml.tag("division", config.division); + xml.tag("rtcTicks", config.rtcTicks); + xml.tag("minMeter", config.minMeter); + xml.tag("minSlider", config.minSlider); + xml.tag("guiRefresh", config.guiRefresh); + xml.tag("peakHoldTime", config.peakHoldTime); + xml.tag("helpBrowser", config.helpBrowser); + xml.tag("extendedMidi", config.extendedMidi); + xml.tag("midiExportDivision", config.midiDivision); + xml.tag("guiDivision", config.guiDivision); + xml.tag("copyright", config.copyright); + xml.tag("smfFormat", config.smfFormat); + xml.tag("startMode", config.startMode); if (!config.startProject.isEmpty()) - xml.strTag("startProject", config.startProject); - xml.intTag("freewheelMode", config.useJackFreewheelMode); + xml.tag("startProject", config.startProject); + xml.tag("freewheelMode", config.useJackFreewheelMode); - xml.strTag("theme", config.style); + xml.tag("theme", config.style); for (int i = 0; i < 6; ++i) { char buffer[32]; sprintf(buffer, "font%d", i); - xml.strTag(buffer, config.fonts[i].toString()); + xml.tag(buffer, config.fonts[i].toString()); } for (int i = 0; i < QColorDialog::customCount(); ++i) { char buffer[32]; snprintf(buffer, 32, "palette%d", i); - xml.colorTag(buffer, QColorDialog::customColor(i)); + xml.tag(buffer, QColorDialog::customColor(i)); } - xml.colorTag("selectPartBg", config.selectPartBg); + xml.tag("selectPartBg", config.selectPartBg); static const char* colorNames[Track::TRACK_TYPES] = { "outputTrackBg", @@ -428,64 +428,63 @@ void MusE::writeGlobalConfiguration(Xml& xml) const "midiSyntiBg" }; for (int i = 0; i < Track::TRACK_TYPES; ++i) - xml.colorTag(colorNames[i], config.trackBg[i]); + xml.tag(colorNames[i], config.trackBg[i]); - xml.intTag("mtctype", AL::mtcType); + xml.tag("mtctype", AL::mtcType); - xml.tag("mtcoffset"); + xml.stag("mtcoffset"); xml.put("%02d:%02d:%02d:%02d:%02d", mtcOffset.h(), mtcOffset.m(), mtcOffset.s(), mtcOffset.f(), mtcOffset.sf()); xml.etag("mtcoffset"); - xml.intTag("extSync", extSyncFlag); - xml.intTag("genMTCSync", genMTCSync); - xml.intTag("genMCSync", genMCSync); - xml.intTag("genMMC", genMMC); - xml.intTag("acceptMTC", acceptMTC); - xml.intTag("acceptMMC", acceptMMC); - xml.intTag("acceptMC", acceptMC); + xml.tag("extSync", extSyncFlag); + xml.tag("genMTCSync", genMTCSync); + xml.tag("genMCSync", genMCSync); + xml.tag("genMMC", genMMC); + xml.tag("acceptMTC", acceptMTC); + xml.tag("acceptMMC", acceptMMC); + xml.tag("acceptMC", acceptMC); - xml.qrectTag("geometryMain", config.geometryMain); - xml.qrectTag("geometryTransport", config.geometryTransport); - xml.qrectTag("geometryBigTime", config.geometryBigTime); - xml.qrectTag("geometryPianoroll", config.geometryPianoroll); - xml.qrectTag("geometryDrumedit", config.geometryDrumedit); + xml.tag("geometryMain", config.geometryMain); + xml.tag("geometryTransport", config.geometryTransport); + xml.tag("geometryBigTime", config.geometryBigTime); + xml.tag("geometryPianoroll", config.geometryPianoroll); + xml.tag("geometryDrumedit", config.geometryDrumedit); - xml.intTag("bigtimeVisible", config.bigTimeVisible); - xml.intTag("transportVisible", config.transportVisible); + xml.tag("bigtimeVisible", config.bigTimeVisible); + xml.tag("transportVisible", config.transportVisible); - xml.intTag("mixer1Visible", config.mixer1Visible); - xml.intTag("mixer2Visible", config.mixer2Visible); + xml.tag("mixer1Visible", config.mixer1Visible); + xml.tag("mixer2Visible", config.mixer2Visible); config.mixer1.write(xml, "mixer1"); config.mixer2.write(xml, "mixer2"); - xml.intTag("showSplashScreen", config.showSplashScreen); - xml.intTag("canvasShowPartType", config.canvasShowPartType); - xml.intTag("canvasShowPartEvent", config.canvasShowPartEvent); - xml.intTag("canvasShowGrid", config.canvasShowGrid); - xml.intTag("canvasUsePixmap", config.canvasUseBgPixmap); - xml.strTag("canvasBgPixmap", config.canvasBgPixmap); + xml.tag("showSplashScreen", config.showSplashScreen); + xml.tag("canvasShowPartType", config.canvasShowPartType); + xml.tag("canvasShowPartEvent", config.canvasShowPartEvent); + xml.tag("canvasShowGrid", config.canvasShowGrid); + xml.tag("canvasUsePixmap", config.canvasUseBgPixmap); + xml.tag("canvasBgPixmap", config.canvasBgPixmap); -// xml.colorTag("transportHandleColor", config.transportHandleColor); - xml.colorTag("bigtimeForegroundcolor", config.bigTimeForegroundColor); - xml.colorTag("bigtimeBackgroundcolor", config.bigTimeBackgroundColor); + xml.tag("bigtimeForegroundcolor", config.bigTimeForegroundColor); + xml.tag("bigtimeBackgroundcolor", config.bigTimeBackgroundColor); writeShortCuts(xml); midiRCList.write(xml); - xml.intTag("followMode", TimeCanvas::followMode); - - xml.strTag("defaultMidiInputDevice", config.defaultMidiInputDevice); - xml.strTag("defaultMidiOutputDevice", config.defaultMidiOutputDevice); - xml.strTag("defaultMidiInstrument", config.defaultMidiInstrument); - xml.intTag("connectToAllMidiDevices", config.connectToAllMidiDevices); - xml.intTag("connectToAllMidiTracks", config.connectToAllMidiTracks); - xml.intTag("createDefaultMidiInput", config.createDefaultMidiInput); - xml.strTag("projectPath", config.projectPath); - xml.strTag("templatePath", config.templatePath); - xml.strTag("importMidiPath", config.importMidiPath); - xml.strTag("importWavePath", config.importWavePath); + xml.tag("followMode", TimeCanvas::followMode); + + xml.tag("defaultMidiInputDevice", config.defaultMidiInputDevice); + xml.tag("defaultMidiOutputDevice", config.defaultMidiOutputDevice); + xml.tag("defaultMidiInstrument", config.defaultMidiInstrument); + xml.tag("connectToAllMidiDevices", config.connectToAllMidiDevices); + xml.tag("connectToAllMidiTracks", config.connectToAllMidiTracks); + xml.tag("createDefaultMidiInput", config.createDefaultMidiInput); + xml.tag("projectPath", config.projectPath); + xml.tag("templatePath", config.templatePath); + xml.tag("importMidiPath", config.importMidiPath); + xml.tag("importWavePath", config.importWavePath); PianoRoll::writeConfiguration(xml); DrumEdit::writeConfiguration(xml); @@ -499,39 +498,38 @@ void MusE::writeGlobalConfiguration(Xml& xml) const void MusE::writeConfiguration(Xml& xml) const { - xml.tag("configuration"); + xml.stag("configuration"); - xml.intTag("mtctype", AL::mtcType); - xml.tag("mtcoffset"); + xml.tag("mtctype", AL::mtcType); + xml.stag("mtcoffset"); xml.put("%02d:%02d:%02d:%02d:%02d", mtcOffset.h(), mtcOffset.m(), mtcOffset.s(), mtcOffset.f(), mtcOffset.sf()); xml.etag("mtcoffset"); - xml.intTag("extSync", extSyncFlag); - xml.intTag("genMTCSync", genMTCSync); - xml.intTag("genMCSync", genMCSync); - xml.intTag("genMMC", genMMC); - xml.intTag("acceptMTC", acceptMTC); - xml.intTag("acceptMMC", acceptMMC); - xml.intTag("acceptMC", acceptMC); - - xml.intTag("bigtimeVisible", bt_id->isChecked()); - xml.intTag("transportVisible", tr_id->isChecked()); - - xml.geometryTag("geometryMain", this); + xml.tag("extSync", extSyncFlag); + xml.tag("genMTCSync", genMTCSync); + xml.tag("genMCSync", genMCSync); + xml.tag("genMMC", genMMC); + xml.tag("acceptMTC", acceptMTC); + xml.tag("acceptMMC", acceptMMC); + xml.tag("acceptMC", acceptMC); + + xml.tag("bigtimeVisible", bt_id->isChecked()); + xml.tag("transportVisible", tr_id->isChecked()); + + xml.tag("geometryMain", this); if (transport) - xml.geometryTag("geometryTransport", transport); + xml.tag("geometryTransport", transport); if (bigtime) - xml.geometryTag("geometryBigTime", bigtime); + xml.tag("geometryBigTime", bigtime); - xml.intTag("mixer1Visible", aid1a->isChecked()); - xml.intTag("mixer2Visible", aid1b->isChecked()); + xml.tag("mixer1Visible", aid1a->isChecked()); + xml.tag("mixer2Visible", aid1b->isChecked()); if (mixer1) mixer1->write(xml, "mixer1"); if (mixer2) mixer2->write(xml, "mixer2"); -//TD writeMidiTransforms(xml); xml.etag("configuration"); } @@ -658,20 +656,20 @@ void MidiFileConfig::cancelClicked() void MixerConfig::write(Xml& xml, const char* name) { - xml.tag("%s", name); - xml.qrectTag("geometry", geometry); - xml.intTag("showMidiTracks", showMidiTracks); - xml.intTag("showMidiSyntiPorts", showMidiSyntiPorts); - xml.intTag("showMidiTracks", showMidiTracks); - xml.intTag("showOutputTracks", showOutputTracks); - xml.intTag("showWaveTracks", showWaveTracks); - xml.intTag("showGroupTracks", showGroupTracks); - xml.intTag("showInputTracks", showInputTracks); - xml.intTag("showAuxTracks", showAuxTracks); - xml.intTag("showSyntiTracks", showSyntiTracks); - xml.intTag("showMidiInPorts", showMidiInPorts); - xml.intTag("showMidiOutPorts", showMidiOutPorts); - xml.etag("%s", name); + xml.stag("%s", name); + xml.tag("geometry", geometry); + xml.tag("showMidiTracks", showMidiTracks); + xml.tag("showMidiSyntiPorts", showMidiSyntiPorts); + xml.tag("showMidiTracks", showMidiTracks); + xml.tag("showOutputTracks", showOutputTracks); + xml.tag("showWaveTracks", showWaveTracks); + xml.tag("showGroupTracks", showGroupTracks); + xml.tag("showInputTracks", showInputTracks); + xml.tag("showAuxTracks", showAuxTracks); + xml.tag("showSyntiTracks", showSyntiTracks); + xml.tag("showMidiInPorts", showMidiInPorts); + xml.tag("showMidiOutPorts", showMidiOutPorts); + xml.etag(name); } //--------------------------------------------------------- diff --git a/muse/muse/ctrl.cpp b/muse/muse/ctrl.cpp index c2198d77..e4d58247 100644 --- a/muse/muse/ctrl.cpp +++ b/muse/muse/ctrl.cpp @@ -268,9 +268,9 @@ void Ctrl::write(Xml& xml) return; } if (_type & INT) - xml.tag(s.arg(id()).arg(_name).arg(curVal().i).arg(_type).arg(min.i).arg(max.i).arg(_default.i).toAscii().data()); + xml.stag(s.arg(id()).arg(_name).arg(curVal().i).arg(_type).arg(min.i).arg(max.i).arg(_default.i).toAscii().data()); else - xml.tag(s.arg(id()).arg(_name).arg(curVal().f).arg(_type).arg(min.f).arg(max.f).arg(_default.f).toAscii().data()); + xml.stag(s.arg(id()).arg(_name).arg(curVal().f).arg(_type).arg(min.f).arg(max.f).arg(_default.f).toAscii().data()); int i = 0; for (ciCtrlVal ic = begin(); ic != end(); ++ic) { diff --git a/muse/muse/event.h b/muse/muse/event.h index cce5e84f..522efe5d 100644 --- a/muse/muse/event.h +++ b/muse/muse/event.h @@ -25,7 +25,6 @@ #include "al/xml.h" #include "al/pos.h" #include "evdata.h" -#include "clonedata.h" using AL::Xml; using AL::Pos; diff --git a/muse/muse/liste/listedit.cpp b/muse/muse/liste/listedit.cpp index df78dfe7..02dfe5d2 100644 --- a/muse/muse/liste/listedit.cpp +++ b/muse/muse/liste/listedit.cpp @@ -269,12 +269,12 @@ void ListEdit::read(QDomNode node) void ListEdit::write(Xml& xml) const { - xml.tag(metaObject()->className()); + xml.stag(metaObject()->className()); xml.writeProperties(this); - xml.strTag("Track", lt.track->name()); + xml.tag("Track", lt.track->name()); if (lt.ctrl) { - xml.intTag("Ctrl", lt.ctrl->id()); + xml.tag("Ctrl", lt.ctrl->id()); _pos.write(xml, "Pos"); } xml.etag(metaObject()->className()); diff --git a/muse/muse/master/masteredit.cpp b/muse/muse/master/masteredit.cpp index a86e0426..e3271ea6 100644 --- a/muse/muse/master/masteredit.cpp +++ b/muse/muse/master/masteredit.cpp @@ -221,7 +221,7 @@ void MasterEdit::read(QDomNode node) void MasterEdit::write(Xml& xml) const { - xml.tag(metaObject()->className()); + xml.stag(metaObject()->className()); xml.writeProperties(this); xml.etag(metaObject()->className()); } diff --git a/muse/muse/midiedit/drumedit.cpp b/muse/muse/midiedit/drumedit.cpp index 04a5766a..55cc52b6 100644 --- a/muse/muse/midiedit/drumedit.cpp +++ b/muse/muse/midiedit/drumedit.cpp @@ -417,13 +417,13 @@ void DrumEdit::drumCmd(QObject* object) void DrumEdit::writeConfiguration(Xml& xml) { - xml.tag("DrumEdit"); + xml.stag("DrumEdit"); if (DrumEdit::initWidth != DrumEdit::INIT_WIDTH) - xml.intTag("width", DrumEdit::initWidth); + xml.tag("width", DrumEdit::initWidth); if (DrumEdit::initHeight != DrumEdit::INIT_HEIGHT) - xml.intTag("height", DrumEdit::initHeight); + xml.tag("height", DrumEdit::initHeight); if (DrumEdit::initRaster != DrumEdit::INIT_RASTER) - xml.intTag("raster", DrumEdit::initRaster); + xml.tag("raster", DrumEdit::initRaster); xml.etag("DrumEdit"); } diff --git a/muse/muse/midiedit/drummap.cpp b/muse/muse/midiedit/drummap.cpp index e8f10806..c8d3dadb 100644 --- a/muse/muse/midiedit/drummap.cpp +++ b/muse/muse/midiedit/drummap.cpp @@ -113,27 +113,27 @@ void DrumMap::init() void DrumMap::write(Xml& xml) { - xml.tag("drummap"); + xml.stag("drummap"); for (int i = 0; i < DRUM_MAPSIZE; ++i) { DrumMapEntry* dm = &map[i]; - xml.tag("entry"); - xml.strTag("name", dm->name); + xml.stag("entry"); + xml.tag("name", dm->name); if (dm->quant != DEFAULT_QUANT) - xml.intTag("quant", dm->quant); + xml.tag("quant", dm->quant); if (dm->len != DEFAULT_LEN) - xml.intTag("len", dm->len); + xml.tag("len", dm->len); if (dm->channel != DEFAULT_CHANNEL) - xml.intTag("channel", dm->channel); + xml.tag("channel", dm->channel); if (dm->lv1 != DEFAULT_LV1) - xml.intTag("lv1", dm->lv1); + xml.tag("lv1", dm->lv1); if (dm->lv2 != DEFAULT_LV2) - xml.intTag("lv2", dm->lv2); + xml.tag("lv2", dm->lv2); if (dm->lv2 != DEFAULT_LV3) - xml.intTag("lv3", dm->lv3); + xml.tag("lv3", dm->lv3); if (dm->lv4 != DEFAULT_LV4) - xml.intTag("lv4", dm->lv4); - xml.intTag("enote", dm->enote); - xml.intTag("anote", dm->anote); + xml.tag("lv4", dm->lv4); + xml.tag("enote", dm->enote); + xml.tag("anote", dm->anote); xml.etag("entry"); } xml.etag("drummap"); diff --git a/muse/muse/midiedit/ecanvas.cpp b/muse/muse/midiedit/ecanvas.cpp index 96df17cf..1bcc1868 100644 --- a/muse/muse/midiedit/ecanvas.cpp +++ b/muse/muse/midiedit/ecanvas.cpp @@ -1415,7 +1415,7 @@ QMimeData* EventCanvas::getTextDrag() Xml xml(&buffer); xml.header(); - xml.tag("eventlist"); + xml.stag("eventlist"); for (ciEvent e = el.begin(); e != el.end(); ++e) e->second.write(xml, -startTick); xml.etag("eventlist"); diff --git a/muse/muse/midiedit/midieditor.cpp b/muse/muse/midiedit/midieditor.cpp index 7cdab03e..8dfe4d5a 100644 --- a/muse/muse/midiedit/midieditor.cpp +++ b/muse/muse/midiedit/midieditor.cpp @@ -206,7 +206,7 @@ void MidiEditor::writePartList(Xml& xml) const Track* track = part->track(); int trkIdx = song->tracks()->indexOf(track); int partIdx = track->parts()->index(part); - xml.tag("part"); + xml.stag("part"); xml.put("%d:%d", trkIdx, partIdx); xml.etag("part"); } @@ -425,7 +425,7 @@ void MidiEditor::read(QDomNode node) void MidiEditor::write(Xml& xml) const { writePartList(xml); - xml.tag(metaObject()->className()); + xml.stag(metaObject()->className()); xml.writeProperties(this); const CtrlEditList* el = canvas()->getCtrlEditors(); for (ciCtrlEdit i = el->begin(); i != el->end(); ++i) { diff --git a/muse/muse/midiedit/pianoroll.cpp b/muse/muse/midiedit/pianoroll.cpp index e709bf45..51a1d01e 100644 --- a/muse/muse/midiedit/pianoroll.cpp +++ b/muse/muse/midiedit/pianoroll.cpp @@ -514,14 +514,14 @@ void PianoRoll::readConfiguration(QDomNode node) void PianoRoll::writeConfiguration(Xml& xml) { - xml.tag("PianoRoll"); + xml.stag("PianoRoll"); if (PianoRoll::initWidth != PianoRoll::INIT_WIDTH) - xml.intTag("width", PianoRoll::initWidth); + xml.tag("width", PianoRoll::initWidth); if (PianoRoll::initHeight != PianoRoll::INIT_HEIGHT) - xml.intTag("height", PianoRoll::initHeight); + xml.tag("height", PianoRoll::initHeight); if (PianoRoll::initRaster != PianoRoll::INIT_RASTER) - xml.intTag("raster", PianoRoll::initRaster); + xml.tag("raster", PianoRoll::initRaster); if (PianoRoll::initQuant != PianoRoll::INIT_QUANT) - xml.intTag("quant", PianoRoll::initQuant); + xml.tag("quant", PianoRoll::initQuant); xml.etag("PianoRoll"); } diff --git a/muse/muse/midieventbase.cpp b/muse/muse/midieventbase.cpp index 0f4b77d3..c98fa6ec 100644 --- a/muse/muse/midieventbase.cpp +++ b/muse/muse/midieventbase.cpp @@ -100,7 +100,7 @@ void MidiEventBase::write(Xml& xml, const Pos& offset) const } if (edata.dataLen) { s += QString(" datalen=\"%1\"").arg(edata.dataLen); - xml.tag(s.toLatin1().data()); + xml.stag(s.toLatin1().data()); QString data; int col = 0; diff --git a/muse/muse/midiinport.cpp b/muse/muse/midiinport.cpp index 8ee1f0eb..42ceff2c 100644 --- a/muse/muse/midiinport.cpp +++ b/muse/muse/midiinport.cpp @@ -72,7 +72,7 @@ void MidiInPort::setName(const QString& s) void MidiInPort::write(Xml& xml) const { - xml.tag("MidiInPort"); + xml.stag("MidiInPort"); MidiTrackBase::writeProperties(xml); xml.etag("MidiInPort"); } diff --git a/muse/muse/midioutport.cpp b/muse/muse/midioutport.cpp index 247af147..96984d48 100644 --- a/muse/muse/midioutport.cpp +++ b/muse/muse/midioutport.cpp @@ -78,16 +78,16 @@ void MidiOutPort::setName(const QString& s) void MidiOutPort::write(Xml& xml) const { - xml.tag("MidiOutPort"); + xml.stag("MidiOutPort"); MidiTrackBase::writeProperties(xml); if (_instrument) - xml.strTag("instrument", _instrument->iname()); + xml.tag("instrument", _instrument->iname()); // for (int i = 0; i < MIDI_CHANNELS; ++i) { // if (!_channel[i]->noInRoute()) // _channel[i]->write(xml); // } - xml.intTag("sendSync", sendSync()); - xml.intTag("deviceId", deviceId()); + xml.tag("sendSync", sendSync()); + xml.tag("deviceId", deviceId()); xml.etag("MidiOutPort"); } diff --git a/muse/muse/midiplugin.cpp b/muse/muse/midiplugin.cpp index 372bf4a3..22dda972 100644 --- a/muse/muse/midiplugin.cpp +++ b/muse/muse/midiplugin.cpp @@ -417,18 +417,18 @@ void MidiPluginI::apply(unsigned from, unsigned to, MidiEventList* il, MidiEvent void MidiPluginI::writeConfiguration(Xml& xml) { - xml.tag("midiPlugin file=\"%s\" name=\"%s\"", + xml.stag("midiPlugin file=\"%s\" name=\"%s\"", _plugin->lib().toLatin1().data(), _plugin->name().toLatin1().data()); if (_on == false) - xml.intTag("on", _on); + xml.tag("on", _on); if (mempi->hasGui()) { - xml.intTag("guiVisible", mempi->guiVisible()); + xml.tag("guiVisible", mempi->guiVisible()); int x, y, w, h; w = 0; h = 0; mempi->getGeometry(&x, &y, &w, &h); if (h || w) - xml.qrectTag("geometry", QRect(x, y, w, h)); + xml.tag("geometry", QRect(x, y, w, h)); } //--------------------------------------------- @@ -439,7 +439,7 @@ void MidiPluginI::writeConfiguration(Xml& xml) const unsigned char* p; mempi->getInitData(&len, &p); if (len) { - xml.tag("init len=\"%d\"", len); + xml.stag("init len=\"%d\"", len); int col = 0; xml.putLevel(); for (int i = 0; i < len; ++i, ++col) { diff --git a/muse/muse/midirc.cpp b/muse/muse/midirc.cpp index b889bcb2..20e530b4 100644 --- a/muse/muse/midirc.cpp +++ b/muse/muse/midirc.cpp @@ -163,13 +163,13 @@ void MidiRCList::read(QDomNode node) void MidiRCList::write(Xml& xml) { - xml.tag("midiRC"); + xml.stag("midiRC"); for (iMidiRC i = begin(); i != end(); ++i) { - xml.tag("action id=\"%d\"", i->action); + xml.stag("action id=\"%d\"", i->action); if (i->event.type() == ME_NOTEON) - xml.tag("noteOn pitch=\"%d\"", i->event.dataA()); + xml.stag("noteOn pitch=\"%d\"", i->event.dataA()); else if (i->event.type() == ME_CONTROLLER) - xml.tag("controller no=\"%d\" val=\"%d\"", + xml.stag("controller no=\"%d\" val=\"%d\"", i->event.dataA(), i->event.dataB()); else printf("remote event type %d not supported\n", i->event.type()); diff --git a/muse/muse/midisynti.cpp b/muse/muse/midisynti.cpp index c542ebac..0aa695ce 100644 --- a/muse/muse/midisynti.cpp +++ b/muse/muse/midisynti.cpp @@ -92,17 +92,17 @@ bool MidiSynti::initInstance(MidiPlugin* plugin) void MidiSynti::write(Xml& xml) const { - xml.tag("MidiSynti"); + xml.stag("MidiSynti"); MidiTrackBase::writeProperties(xml); - xml.strTag("class", _synti->plugin()->name()); + xml.tag("class", _synti->plugin()->name()); if (_synti->hasGui()) { - xml.intTag("guiVisible", _synti->guiVisible()); + xml.tag("guiVisible", _synti->guiVisible()); int x, y, w, h; w = 0; h = 0; _synti->getGeometry(&x, &y, &w, &h); if (h || w) - xml.qrectTag("geometry", QRect(x, y, w, h)); + xml.tag("geometry", QRect(x, y, w, h)); } //--------------------------------------------- // dump current state of plugin @@ -112,7 +112,7 @@ void MidiSynti::write(Xml& xml) const const unsigned char* p; _synti->getInitData(&len, &p); if (len) { - xml.tag("init len=\"%d\"", len); + xml.stag("init len=\"%d\"", len); int col = 0; xml.putLevel(); for (int i = 0; i < len; ++i, ++col) { diff --git a/muse/muse/miditrack.cpp b/muse/muse/miditrack.cpp index f35642bf..742e24e1 100644 --- a/muse/muse/miditrack.cpp +++ b/muse/muse/miditrack.cpp @@ -92,15 +92,15 @@ Part* MidiTrack::newPart(Part* p, bool clone) void MidiTrack::write(Xml& xml) const { - xml.tag("miditrack"); + xml.stag("miditrack"); MidiTrackBase::writeProperties(xml); - xml.intTag("transposition", _transposition); - xml.intTag("velocity", _velocity); - xml.intTag("delay", _delay); - xml.intTag("len", _len); - xml.intTag("compression", _compression); - xml.intTag("useDrumMap", _useDrumMap); + xml.tag("transposition", _transposition); + xml.tag("velocity", _velocity); + xml.tag("delay", _delay); + xml.tag("len", _len); + xml.tag("compression", _compression); + xml.tag("useDrumMap", _useDrumMap); const PartList* pl = parts(); for (ciPart p = pl->begin(); p != pl->end(); ++p) diff --git a/muse/muse/mixer/mixer.cpp b/muse/muse/mixer/mixer.cpp index bb0786fc..f7116d43 100644 --- a/muse/muse/mixer/mixer.cpp +++ b/muse/muse/mixer/mixer.cpp @@ -372,17 +372,17 @@ void Mixer::showTracksChanged(QAction* id) void Mixer::write(Xml& xml, const char* name) { - xml.tag("%s", name); - xml.qrectTag("geometry", geometry()); - xml.intTag("showMidiTracks", cfg->showMidiTracks); - xml.intTag("showOutputTracks", cfg->showOutputTracks); - xml.intTag("showWaveTracks", cfg->showWaveTracks); - xml.intTag("showGroupTracks", cfg->showGroupTracks); - xml.intTag("showInputTracks", cfg->showInputTracks); - xml.intTag("showSyntiTracks", cfg->showSyntiTracks); - xml.intTag("showMidiInPorts", cfg->showMidiInPorts); - xml.intTag("showMidiOutPorts", cfg->showMidiOutPorts); - xml.etag("%s", name); + xml.stag("%s", name); + xml.tag("geometry", geometry()); + xml.tag("showMidiTracks", cfg->showMidiTracks); + xml.tag("showOutputTracks", cfg->showOutputTracks); + xml.tag("showWaveTracks", cfg->showWaveTracks); + xml.tag("showGroupTracks", cfg->showGroupTracks); + xml.tag("showInputTracks", cfg->showInputTracks); + xml.tag("showSyntiTracks", cfg->showSyntiTracks); + xml.tag("showMidiInPorts", cfg->showMidiInPorts); + xml.tag("showMidiOutPorts", cfg->showMidiOutPorts); + xml.etag(name); } //--------------------------------------------------------- diff --git a/muse/muse/mixer/rack.cpp b/muse/muse/mixer/rack.cpp index afab6a77..ba028e5d 100644 --- a/muse/muse/mixer/rack.cpp +++ b/muse/muse/mixer/rack.cpp @@ -213,7 +213,7 @@ void EffectRack::startDrag(int idx) if ((*pipe)[idx] != NULL) { PluginI *plug = (*pipe)[idx]; xml.header(); - xml.tag("muse version=\"1.0\""); + xml.stag("muse version=\"1.0\""); // header info plug->writeConfiguration1(xml, prefader); // wC1 does not append endtag // parameters diff --git a/muse/muse/part.cpp b/muse/muse/part.cpp index 601515cd..e52b1309 100644 --- a/muse/muse/part.cpp +++ b/muse/muse/part.cpp @@ -210,29 +210,29 @@ void Part::write(Xml& xml) } if (id != -1) - xml.tag("part cloneId=\"%d\"", id); + xml.stag("part cloneId=\"%d\"", id); else - xml.tag("part"); + xml.stag("part"); if (!_name.isEmpty()) - xml.strTag("name", _name); + xml.tag("name", _name); PosLen::write(xml, "poslen"); if (_selected) - xml.intTag("selected", _selected); - xml.intTag("color", _colorIndex); + xml.tag("selected", _selected); + xml.tag("color", _colorIndex); if (_raster != -1) - xml.intTag("raster", _raster); + xml.tag("raster", _raster); if (_quant != -1) - xml.intTag("quant", _quant); + xml.tag("quant", _quant); if (_xmag != -1.0) - xml.doubleTag("xmag", _xmag); + xml.tag("xmag", _xmag); for (ciCtrlCanvas i = ctrlCanvasList.begin(); i != ctrlCanvasList.end(); ++i) xml.tagE("CtrlCanvas h=\"%d\" id=\"%d\"", i->height, i->ctrlId); if (_fillLen) - xml.intTag("fillLen", _fillLen); + xml.tag("fillLen", _fillLen); if (_mute) - xml.intTag("mute", _mute); + xml.tag("mute", _mute); if (dumpEvents) { for (ciEvent e = _events->begin(); e != _events->end(); ++e) e->second.write(xml, *this); @@ -360,10 +360,5 @@ void Part::ref() void Part::deref() { --(_events->cloneCount); -/* if (_events->cloneCount <= 0) { - delete _events; - _events = 0; - } -*/ } diff --git a/muse/muse/plugin.cpp b/muse/muse/plugin.cpp index 5f7b128e..4703d15e 100644 --- a/muse/muse/plugin.cpp +++ b/muse/muse/plugin.cpp @@ -308,20 +308,20 @@ void PluginI::writeConfiguration(Xml& xml, bool prefader) void PluginI::writeConfiguration1(Xml& xml, bool prefader) { - xml.tag("plugin pre=\"%d\" file=\"%s\" label=\"%s\" channel=\"%d\"", + xml.stag("plugin pre=\"%d\" file=\"%s\" label=\"%s\" channel=\"%d\"", prefader, _plugin->lib().toLatin1().data(), _plugin->label().toLatin1().data(), _channel); // instances * _plugin->inports()); if (_on == false) - xml.intTag("on", _on); + xml.tag("on", _on); if (guiVisible()) { - xml.intTag("gui", 1); - xml.geometryTag("geometry", _gui); + xml.tag("gui", 1); + xml.tag("geometry", _gui); } if (hasNativeGui() && nativeGuiVisible()) - xml.intTag("nativeGui", 1); + xml.tag("nativeGui", 1); } //--------------------------------------------------------- diff --git a/muse/muse/plugingui.cpp b/muse/muse/plugingui.cpp index b0441f8c..4b8ef920 100644 --- a/muse/muse/plugingui.cpp +++ b/muse/muse/plugingui.cpp @@ -640,7 +640,7 @@ void PluginGui::save() return; Xml xml(f); xml.header(); - xml.tag("muse version=\"1.0\""); + xml.stag("muse version=\"1.0\""); plugin->writeConfiguration(xml, true); xml.etag("muse"); f->close(); diff --git a/muse/muse/shortcuts.cpp b/muse/muse/shortcuts.cpp index a73b757f..34b91293 100644 --- a/muse/muse/shortcuts.cpp +++ b/muse/muse/shortcuts.cpp @@ -979,10 +979,10 @@ KeyboardMovementIndicator shortcutsKbdMovement; //for keeping track of active pa void writeShortCuts(Xml& xml) { - xml.tag("shortcuts"); + xml.stag("shortcuts"); foreach(Shortcut* s, shortcuts) if (s->xml && s->type != INVIS_SHRT) //Avoid nullptr & hardcoded shortcuts - xml.strTag(s->xml, s->key.toString(QKeySequence::PortableText)); + xml.tag(s->xml, s->key.toString(QKeySequence::PortableText)); xml.etag("shortcuts"); } diff --git a/muse/muse/songfile.cpp b/muse/muse/songfile.cpp index 47aadff3..187132e3 100644 --- a/muse/muse/songfile.cpp +++ b/muse/muse/songfile.cpp @@ -273,36 +273,36 @@ void Song::read(QDomNode node) void Song::write(Xml& xml) const { - xml.tag("song"); - xml.strTag("comment", _comment); - xml.strTag("createDate", _createDate.toString(Qt::ISODate)); + xml.stag("song"); + xml.tag("comment", _comment); + xml.tag("createDate", _createDate.toString(Qt::ISODate)); int n = AL::tempomap.tick2frame(_len); - xml.intTag("LenInSec", n / AL::sampleRate); + xml.tag("LenInSec", n / AL::sampleRate); - xml.intTag("cpos", cpos()); - xml.intTag("rpos", rpos()); - xml.intTag("lpos", lpos()); - xml.intTag("master", _masterFlag); + xml.tag("cpos", cpos()); + xml.tag("rpos", rpos()); + xml.tag("lpos", lpos()); + xml.tag("master", _masterFlag); if (loopFlag) - xml.intTag("loop", loopFlag); + xml.tag("loop", loopFlag); if (punchinFlag) - xml.intTag("punchin", punchinFlag); + xml.tag("punchin", punchinFlag); if (punchoutFlag) - xml.intTag("punchout", punchoutFlag); + xml.tag("punchout", punchoutFlag); if (soloFlag) - xml.intTag("solo", soloFlag); + xml.tag("solo", soloFlag); if (_recMode != REC_OVERDUP) - xml.intTag("recmode", _recMode); + xml.tag("recmode", _recMode); if (_cycleMode != CYCLE_NORMAL) - xml.intTag("cycle", _cycleMode); + xml.tag("cycle", _cycleMode); if (_click) - xml.intTag("click", _click); + xml.tag("click", _click); if (_quantize) - xml.intTag("quantize", _quantize); - xml.intTag("len", _len); + xml.tag("quantize", _quantize); + xml.tag("len", _len); if (_globalPitchShift) - xml.intTag("globalPitchShift", _globalPitchShift); + xml.tag("globalPitchShift", _globalPitchShift); cloneList.clear(); @@ -331,12 +331,12 @@ void MusE::write(Xml& xml) const { xml.header(); - xml.tag("muse version=\"2.1\""); + xml.stag("muse version=\"2.1\""); writeConfiguration(xml); song->write(xml); - xml.tag("toplevels"); + xml.stag("toplevels"); foreach(QWidget* w, QApplication::topLevelWidgets()) { if (!w->isVisible()) continue; diff --git a/muse/muse/synth.cpp b/muse/muse/synth.cpp index 3e61056b..fae15e2f 100644 --- a/muse/muse/synth.cpp +++ b/muse/muse/synth.cpp @@ -361,9 +361,9 @@ void initMidiSynth() void SynthI::write(Xml& xml) const { - xml.tag("SynthI"); + xml.stag("SynthI"); AudioTrack::writeProperties(xml); - xml.strTag("class", synth()->name()); + xml.tag("class", synth()->name()); // for (int i = 0; i < MIDI_CHANNELS; ++i) { // if (!_channel[i]->noInRoute()) @@ -376,13 +376,13 @@ void SynthI::write(Xml& xml) const //--------------------------------------------- if (hasGui()) { - xml.intTag("guiVisible", guiVisible()); + xml.tag("guiVisible", guiVisible()); int x, y, w, h; w = 0; h = 0; getGeometry(&x, &y, &w, &h); if (h || w) - xml.qrectTag("geometry", QRect(x, y, w, h)); + xml.tag("geometry", QRect(x, y, w, h)); } _sif->write(xml); xml.etag("SynthI"); @@ -399,8 +399,8 @@ void MessSynthIF::write(Xml& xml) const const unsigned char* p; _mess->getInitData(&len, &p); if (len) { - xml.tag("midistate"); - xml.tag("event type=\"%d\" datalen=\"%d\"", Sysex, len); + xml.stag("midistate"); + xml.stag("event type=\"%d\" datalen=\"%d\"", Sysex, len); int col = 0; xml.putLevel(); for (int i = 0; i < len; ++i, ++col) { diff --git a/muse/muse/track.cpp b/muse/muse/track.cpp index 9fd77f4b..7d78c7a8 100644 --- a/muse/muse/track.cpp +++ b/muse/muse/track.cpp @@ -223,37 +223,37 @@ Part* Track::findPart(unsigned tick) void Track::writeProperties(Xml& xml) const { - xml.strTag("name", _name); + xml.tag("name", _name); if (!_comment.isEmpty()) - xml.strTag("comment", _comment); + xml.tag("comment", _comment); if (_recordFlag) - xml.intTag("record", _recordFlag); + xml.tag("record", _recordFlag); if (mute() != muteDefault()) - xml.intTag("mute", mute()); + xml.tag("mute", mute()); if (solo()) - xml.intTag("solo", solo()); + xml.tag("solo", solo()); if (off()) - xml.intTag("off", off()); + xml.tag("off", off()); if (_channels) - xml.intTag("channels", _channels); + xml.tag("channels", _channels); if (_locked) - xml.intTag("locked", _locked); + xml.tag("locked", _locked); if (_monitor) - xml.intTag("monitor", _monitor); + xml.tag("monitor", _monitor); if (_autoRead != autoReadDefault()) - xml.intTag("autoRead", _autoRead); + xml.tag("autoRead", _autoRead); if (_autoWrite != autoWriteDefault()) - xml.intTag("autoWrite", _autoWrite); + xml.tag("autoWrite", _autoWrite); if (_selected) - xml.intTag("selected", _selected); + xml.tag("selected", _selected); for (ciCtrl icl = controller()->begin(); icl != controller()->end(); ++icl) icl->second->write(xml); if (arrangerTrack.tw) - xml.intTag("height", arrangerTrack.tw->height()); + xml.tag("height", arrangerTrack.tw->height()); for (ciArrangerTrack i = subtracks.begin(); i != subtracks.end(); ++i) { - xml.tag("subtrack"); - xml.intTag("height", (*i)->tw->height()); - xml.intTag("ctrl", (*i)->ctrl); + xml.stag("subtrack"); + xml.tag("height", (*i)->tw->height()); + xml.tag("ctrl", (*i)->ctrl); xml.etag("subtrack"); } } @@ -663,14 +663,14 @@ void Track::writeRouting(Xml& xml) const { if (type() == AUDIO_INPUT || type() == MIDI_IN) { foreach(Route r, _inRoutes) { - xml.tag("Route"); + xml.stag("Route"); r.src.write(xml, "src"); r.dst.write(xml, "dst"); xml.etag("Route"); } } foreach(Route r, _outRoutes) { - xml.tag("Route"); + xml.stag("Route"); r.src.write(xml, "src"); r.dst.write(xml, "dst"); xml.etag("Route"); diff --git a/muse/muse/waveevent.cpp b/muse/muse/waveevent.cpp index 82d451ae..45a07562 100644 --- a/muse/muse/waveevent.cpp +++ b/muse/muse/waveevent.cpp @@ -96,14 +96,14 @@ void WaveEventBase::write(Xml& xml, const Pos& offset) const { if (f.isNull()) return; - xml.tag("event"); + xml.stag("event"); PosLen wpos(*this); wpos += offset; // if (offset) // wpos.setTick(wpos.tick() + offset); wpos.write(xml, "poslen"); - xml.intTag("frame", _spos); // offset in wave file - xml.strTag("file", f.finfo()->fileName()); + xml.tag("frame", _spos); // offset in wave file + xml.tag("file", f.finfo()->fileName()); xml.etag("event"); } diff --git a/muse/muse/wavetrack.cpp b/muse/muse/wavetrack.cpp index ae269f52..47187364 100644 --- a/muse/muse/wavetrack.cpp +++ b/muse/muse/wavetrack.cpp @@ -138,7 +138,7 @@ void WaveTrack::fetchData(unsigned pos, unsigned samples, int widx) void WaveTrack::write(Xml& xml) const { - xml.tag("wavetrack"); + xml.stag("wavetrack"); AudioTrack::writeProperties(xml); const PartList* pl = parts(); for (ciPart p = pl->begin(); p != pl->end(); ++p) diff --git a/muse/muse/widgets/splitter.cpp b/muse/muse/widgets/splitter.cpp index 3a860be4..b95750ab 100644 --- a/muse/muse/widgets/splitter.cpp +++ b/muse/muse/widgets/splitter.cpp @@ -76,11 +76,11 @@ Splitter::Splitter(Qt::Orientation o) void Splitter::writeStatus(const char* name, Xml& xml) { QList sl = sizes(); - xml.tag(name); + xml.stag(name); int n = sl.size(); for (int i = 0; i < n; ++i) { int n = sl.at(i); - xml.intTag("size", n); + xml.tag("size", n); } xml.etag(name); } diff --git a/muse/synti/deicsonze/deicsonze.cpp b/muse/synti/deicsonze/deicsonze.cpp index 2360f4c8..369a02a3 100644 --- a/muse/synti/deicsonze/deicsonze.cpp +++ b/muse/synti/deicsonze/deicsonze.cpp @@ -2047,29 +2047,29 @@ void DeicsOnze::loadConfiguration(QString fileName) { //--------------------------------------------------------- void DeicsOnze::writeConfiguration(AL::Xml* xml) { QString str; - xml->tag("deicsOnzeConfiguation version=\"1.0\""); + xml->stag("deicsOnzeConfiguation version=\"1.0\""); //xml->intTag(NBRVOICESSTR, (int)_global.nbrVoices); //xml->strTag(CHANNELNUMSTR, (_global.channelNum==-1?ALLSTR: // str.setNum(_global.channelNum+1))); - xml->strTag(QUALITYSTR, (_global.quality==high?HIGHSTR: + xml->tag(QUALITYSTR, (_global.quality==high?HIGHSTR: (_global.quality==middle?MIDDLESTR: (_global.quality==low?LOWSTR:ULTRALOWSTR)))); - xml->intTag(FONTSIZESTR, _global.fontSize); - xml->strTag(SAVECONFIGSTR, (_saveConfig?YESSTRDEI:NOSTRDEI)); - xml->strTag(SAVEONLYUSEDSTR, (_saveOnlyUsed?YESSTRDEI:NOSTRDEI)); - xml->colorTag(TEXTCOLORSTR, + xml->tag(FONTSIZESTR, _global.fontSize); + xml->tag(SAVECONFIGSTR, (_saveConfig?YESSTRDEI:NOSTRDEI)); + xml->tag(SAVEONLYUSEDSTR, (_saveOnlyUsed?YESSTRDEI:NOSTRDEI)); + xml->tag(TEXTCOLORSTR, reinterpret_cast(*_gui->tColor)); - xml->colorTag(BACKGROUNDCOLORSTR, + xml->tag(BACKGROUNDCOLORSTR, reinterpret_cast(*_gui->bColor)); - xml->colorTag(EDITTEXTCOLORSTR, + xml->tag(EDITTEXTCOLORSTR, reinterpret_cast(*_gui->etColor)); - xml->colorTag(EDITBACKGROUNDCOLORSTR, + xml->tag(EDITBACKGROUNDCOLORSTR, reinterpret_cast(*_gui->ebColor)); - xml->strTag(ISINITSETSTR, (_isInitSet?YESSTRDEI:NOSTRDEI)); + xml->tag(ISINITSETSTR, (_isInitSet?YESSTRDEI:NOSTRDEI)); //printf("initSetPath : %s\n", _initSetPath.toAscii().data()); - xml->strTag(INITSETPATHSTR, _initSetPath.toAscii().data()); - xml->strTag(ISBACKGROUNDPIXSTR, (_isBackgroundPix?YESSTRDEI:NOSTRDEI)); - xml->strTag(BACKGROUNDPIXPATHSTR, _backgroundPixPath.toAscii().data()); + xml->tag(INITSETPATHSTR, _initSetPath.toAscii().data()); + xml->tag(ISBACKGROUNDPIXSTR, (_isBackgroundPix?YESSTRDEI:NOSTRDEI)); + xml->tag(BACKGROUNDPIXPATHSTR, _backgroundPixPath.toAscii().data()); xml->etag(DEICSONZECONFIGURATIONSTR); } diff --git a/muse/synti/deicsonze/deicsonzepreset.cpp b/muse/synti/deicsonze/deicsonzepreset.cpp index d01dd959..c6597000 100644 --- a/muse/synti/deicsonze/deicsonzepreset.cpp +++ b/muse/synti/deicsonze/deicsonzepreset.cpp @@ -553,8 +553,8 @@ void Set::readSet(QDomNode setNode) { // writeSet //--------------------------------------------------------- void Set::writeSet(AL::Xml* xml, bool onlyUsed) { - xml->tag("deicsOnzeSet version=\"1.0\""); - xml->strTag("setName",_setName.c_str()); + xml->stag("deicsOnzeSet version=\"1.0\""); + xml->tag("setName",_setName.c_str()); for(std::vector::iterator i=_categoryVector.begin(); i!=_categoryVector.end(); i++) (*i)->writeCategory(xml, onlyUsed); xml->etag("deicsOnzeSet"); @@ -589,9 +589,9 @@ void Category::readCategory(QDomNode catNode) { //--------------------------------------------------------- void Category::writeCategory(AL::Xml* xml, bool onlyUsed) { if((!onlyUsed || _isUsed)) { - xml->tag("deicsOnzeCategory version=\"1.0\""); - xml->strTag("categoryName",_categoryName.c_str()); - xml->intTag("hbank", _hbank); + xml->stag("deicsOnzeCategory version=\"1.0\""); + xml->tag("categoryName",_categoryName.c_str()); + xml->tag("hbank", _hbank); for(std::vector::iterator i=_subcategoryVector.begin(); i!=_subcategoryVector.end(); i++) (*i)->writeSubcategory(xml, onlyUsed); @@ -628,9 +628,9 @@ void Subcategory::readSubcategory(QDomNode subNode) { //--------------------------------------------------------- void Subcategory::writeSubcategory(AL::Xml* xml, bool onlyUsed) { if((!onlyUsed || _isUsed)) { - xml->tag("deicsOnzeSubcategory version=\"1.0\""); - xml->strTag("subcategoryName",_subcategoryName.c_str()); - xml->intTag("lbank", _lbank); + xml->stag("deicsOnzeSubcategory version=\"1.0\""); + xml->tag("subcategoryName",_subcategoryName.c_str()); + xml->tag("lbank", _lbank); for(std::vector::iterator i=_presetVector.begin(); i!=_presetVector.end(); i++) (*i)->writePreset(xml, onlyUsed); xml->etag("deicsOnzeSubcategory"); @@ -908,10 +908,10 @@ void Preset::readPreset(QDomNode presetNode) { void Preset::writePreset(AL::Xml* xml, bool onlyUsed) { char s[MAXCHARTAG]; if((!onlyUsed || _isUsed)) { - xml->tag("deicsOnzePreset version=\"1.0\""); + xml->stag("deicsOnzePreset version=\"1.0\""); //algorithm - xml->strTag(ALGSTR, (algorithm==FIRST? "FIRST": + xml->tag(ALGSTR, (algorithm==FIRST? "FIRST": (algorithm==SECOND? "SECOND": (algorithm==THIRD? "THIRD": (algorithm==FOURTH? "FOURTH": @@ -920,60 +920,60 @@ void Preset::writePreset(AL::Xml* xml, bool onlyUsed) { (algorithm==SEVENTH? "SEVENTH": "EIGHTH")))))))); //feedback - xml->intTag(FEEDBACKSTR, feedback); + xml->tag(FEEDBACKSTR, feedback); //quick edit - //xml->intTag(FINEBRIGHTNESSSTR, brightness); - //xml->intTag(MODULATIONSTR, (int)modulation); - //xml->intTag(GLOBALDETUNESTR, globalDetune); - //xml->intTag(ATTACKSTR, attack); - //xml->intTag(RELEASESTR, release); + //xml->tag(FINEBRIGHTNESSSTR, brightness); + //xml->tag(MODULATIONSTR, (int)modulation); + //xml->tag(GLOBALDETUNESTR, globalDetune); + //xml->tag(ATTACKSTR, attack); + //xml->tag(RELEASESTR, release); //lfo - xml->tag("lfo"); - xml->strTag(WAVESTR, (lfo.wave==SAWUP? "SAWUP": + xml->stag("lfo"); + xml->tag(WAVESTR, (lfo.wave==SAWUP? "SAWUP": (lfo.wave==SQUARE? "SQUARE": (lfo.wave==TRIANGL? "TRIANGL":"SHOLD")))); - xml->intTag(SPEEDSTR, lfo.speed); - xml->intTag(DELAYSTR, lfo.delay); - xml->intTag(PMODDEPTHSTR, lfo.pModDepth); - xml->intTag(AMODDEPTHSTR, lfo.aModDepth); - xml->strTag(SYNCSTR, (lfo.sync==true? "on":"off")); + xml->tag(SPEEDSTR, lfo.speed); + xml->tag(DELAYSTR, lfo.delay); + xml->tag(PMODDEPTHSTR, lfo.pModDepth); + xml->tag(AMODDEPTHSTR, lfo.aModDepth); + xml->tag(SYNCSTR, (lfo.sync==true? "on":"off")); xml->etag("lfo"); //sensitivity - xml->tag("sensitivity"); - xml->intTag(PMODSENSSTR, sensitivity.pitch); - xml->intTag(AMSSTR, sensitivity.amplitude); + xml->stag("sensitivity"); + xml->tag(PMODSENSSTR, sensitivity.pitch); + xml->tag(AMSSTR, sensitivity.amplitude); for(int i=0; istrTag(s, (sensitivity.ampOn[i]==true? "on":"off")); + xml->tag(s, (sensitivity.ampOn[i]==true? "on":"off")); } for(int i=0; iintTag(s, sensitivity.egBias[i]); + xml->tag(s, sensitivity.egBias[i]); } for(int i=0; iintTag(s, sensitivity.keyVelocity[i]); + xml->tag(s, sensitivity.keyVelocity[i]); } xml->etag("sensitivity"); //frequency - xml->tag("frequency"); + xml->stag("frequency"); for(int i=0; ifloatTag(s, frequency[i].ratio); + xml->tag(s, frequency[i].ratio); } for(int i=0; istrTag(s, (frequency[i].isFix==true? "yes":"no")); + xml->tag(s, (frequency[i].isFix==true? "yes":"no")); } for(int i=0; ifloatTag(s, frequency[i].freq); + xml->tag(s, frequency[i].freq); } xml->etag("frequency"); //oscWave for(int i=0; istrTag(s, (oscWave[i]==W1?"W1": + xml->tag(s, (oscWave[i]==W1?"W1": (oscWave[i]==W2?"W2": (oscWave[i]==W3?"W3": (oscWave[i]==W4?"W4": @@ -984,92 +984,92 @@ void Preset::writePreset(AL::Xml* xml, bool onlyUsed) { //detune for(int i=0; iintTag(s, detune[i]); + xml->tag(s, detune[i]); } //eg - xml->tag("eg"); + xml->stag("eg"); for(int i=0; iintTag(s, eg[i].ar); + xml->tag(s, eg[i].ar); } for(int i=0; iintTag(s, eg[i].d1r); + xml->tag(s, eg[i].d1r); } for(int i=0; iintTag(s, eg[i].d1l); + xml->tag(s, eg[i].d1l); } for(int i=0; iintTag(s, eg[i].d2r); + xml->tag(s, eg[i].d2r); } for(int i=0; iintTag(s, eg[i].rr); + xml->tag(s, eg[i].rr); } for(int i=0; istrTag(s, (eg[i].egShift==VOF?"VOF": + xml->tag(s, (eg[i].egShift==VOF?"VOF": (eg[i].egShift==V48?"V48": (eg[i].egShift==V24?"V24":"V12")))); } xml->etag("eg"); //pitchEg - xml->tag("pitchEg"); - xml->intTag(PR1STR,pitchEg.pr1); - xml->intTag(PR2STR,pitchEg.pr2); - xml->intTag(PR3STR,pitchEg.pr3); - xml->intTag(PL1STR,pitchEg.pl1); - xml->intTag(PL2STR,pitchEg.pl2); - xml->intTag(PL3STR,pitchEg.pl3); + xml->stag("pitchEg"); + xml->tag(PR1STR,pitchEg.pr1); + xml->tag(PR2STR,pitchEg.pr2); + xml->tag(PR3STR,pitchEg.pr3); + xml->tag(PL1STR,pitchEg.pl1); + xml->tag(PL2STR,pitchEg.pl2); + xml->tag(PL3STR,pitchEg.pl3); xml->etag("pitchEg"); //outLevel for(int i=0; iintTag(s, outLevel[i]); + xml->tag(s, outLevel[i]); } //scaling - xml->tag("scaling"); + xml->stag("scaling"); for(int i=0; iintTag(s, scaling.rate[i]); + xml->tag(s, scaling.rate[i]); } for(int i=0; iintTag(s, scaling.level[i]); + xml->tag(s, scaling.level[i]); } xml->etag("scaling"); //function - xml->tag("function"); - xml->intTag(TRANSPOSESTR, function.transpose); - xml->strTag(POLYMODESTR, (function.mode==POLY? "POLY":"MONO")); - xml->intTag(PBENDRANGESTR, function.pBendRange); - xml->strTag(PORTAMODESTR, (function.portamento==FINGER? - "FINGER":"FULL")); - xml->intTag(PORTATIMESTR, function.portamentoTime); - xml->strTag(FSWSTR, (function.footSw==POR? "POR":"SUS")); - xml->intTag(FCVOLUMESTR, function.fcVolume); - xml->intTag(FCPITCHSTR, function.fcPitch); - xml->intTag(FCAMPLITUDESTR, function.fcAmplitude); - xml->intTag(MWPITCHSTR, function.mwPitch); - xml->intTag(MWAMPLITUDESTR, function.mwAmplitude); - xml->intTag(BCPITCHSTR, function.bcPitch); - xml->intTag(BCAMPLITUDESTR, function.bcAmplitude); - xml->intTag(BCPITCHBIASSTR, function.bcPitchBias); - xml->intTag(BCEGBIASSTR, function.bcEgBias); - xml->intTag(ATPITCHSTR, function.atPitch); - xml->intTag(ATAMPLITUDESTR, function.atAmplitude); - xml->intTag(ATPITCHBIASSTR, function.atPitchBias); - xml->intTag(ATEGBIASSTR, function.atEgBias); - xml->intTag(REVERBRATESTR, function.reverbRate); + xml->stag("function"); + xml->tag(TRANSPOSESTR, function.transpose); + xml->tag(POLYMODESTR, (function.mode==POLY? "POLY":"MONO")); + xml->tag(PBENDRANGESTR, function.pBendRange); + xml->tag(PORTAMODESTR, (function.portamento==FINGER? + "FINGER":"FULL")); + xml->tag(PORTATIMESTR, function.portamentoTime); + xml->tag(FSWSTR, (function.footSw==POR? "POR":"SUS")); + xml->tag(FCVOLUMESTR, function.fcVolume); + xml->tag(FCPITCHSTR, function.fcPitch); + xml->tag(FCAMPLITUDESTR, function.fcAmplitude); + xml->tag(MWPITCHSTR, function.mwPitch); + xml->tag(MWAMPLITUDESTR, function.mwAmplitude); + xml->tag(BCPITCHSTR, function.bcPitch); + xml->tag(BCAMPLITUDESTR, function.bcAmplitude); + xml->tag(BCPITCHBIASSTR, function.bcPitchBias); + xml->tag(BCEGBIASSTR, function.bcEgBias); + xml->tag(ATPITCHSTR, function.atPitch); + xml->tag(ATAMPLITUDESTR, function.atAmplitude); + xml->tag(ATPITCHBIASSTR, function.atPitchBias); + xml->tag(ATEGBIASSTR, function.atEgBias); + xml->tag(REVERBRATESTR, function.reverbRate); xml->etag("function"); //globalDetune - //xml->intTag("globalDetune", globalDetune); + //xml->tag("globalDetune", globalDetune); //preset name - xml->strTag("name", name.c_str()); + xml->tag("name", name.c_str()); //bank prog - xml->intTag("prog",prog); + xml->tag("prog",prog); xml->etag("deicsOnzePreset"); } diff --git a/muse/synti/vam/vamgui.cpp b/muse/synti/vam/vamgui.cpp index 75a05f1b..2787650d 100644 --- a/muse/synti/vam/vamgui.cpp +++ b/muse/synti/vam/vamgui.cpp @@ -8,7 +8,7 @@ // (Many) parts of this file was taken from Werner Schweer's GUI // for his organ soft synth. // -// (C) Copyright 2002 Jotsif Lindman Hörnlund (jotsif@linux.nu) +// (C) Copyright 2002 Jotsif Lindman Hönlund (jotsif@linux.nu) // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License @@ -140,7 +140,7 @@ void Preset::readConfiguration(QDomNode /*node*/) void Preset::writeConfiguration(Xml& xml) { - xml.tag("preset name=\"%s\"", name.toLatin1().data()); + xml.stag("preset name=\"%s\"", name.toLatin1().data()); for (int i = 0; i < NUM_CONTROLLER; ++i) { xml.tagE("control idx=\"%d\" val=\"%d\"", i, ctrl[i]); } -- cgit v1.2.3