本文整理汇总了C++中musecore::Xml类的典型用法代码示例。如果您正苦于以下问题:C++ Xml类的具体用法?C++ Xml怎么用?C++ Xml使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Xml类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: readStatus
void ArrangerView::readStatus(MusECore::Xml& xml)
{
for (;;)
{
MusECore::Xml::Token token = xml.parse();
if (token == MusECore::Xml::Error || token == MusECore::Xml::End)
break;
const QString& tag = xml.s1();
switch (token)
{
case MusECore::Xml::TagStart:
if (tag == "tool")
editTools->set(xml.parseInt());
else if (tag == "topwin")
TopWin::readStatus(xml);
else if (tag == "arranger")
arranger->readStatus(xml);
else
xml.unknown("ArrangerView");
break;
case MusECore::Xml::TagEnd:
if (tag == "arrangerview")
return;
default:
break;
}
}
}
示例2: readConfiguration
void WaveEdit::readConfiguration(MusECore::Xml& xml)
{
for (;;) {
MusECore::Xml::Token token = xml.parse();
const QString& tag = xml.s1();
switch (token) {
case MusECore::Xml::TagStart:
if (tag == "bgcolor")
MusEGlobal::config.waveEditBackgroundColor = readColor(xml);
else if (tag == "raster")
_rasterInit = xml.parseInt();
else if (tag == "colormode")
colorModeInit = xml.parseInt();
else if (tag == "topwin")
TopWin::readConfiguration(WAVE, xml);
else
xml.unknown("WaveEdit");
break;
case MusECore::Xml::TagEnd:
if (tag == "waveedit")
return;
default:
break;
case MusECore::Xml::Error:
case MusECore::Xml::End:
return;
}
}
}
示例3: writeStatus
void MidiEditor::writeStatus(int level, MusECore::Xml& xml) const
{
xml.tag(level++, "midieditor");
TopWin::writeStatus(level, xml);
xml.intTag(level, "raster", _raster);
xml.tag(level, "/midieditor");
}
示例4: readConfiguration
void ArrangerView::readConfiguration(MusECore::Xml& xml)
{
for (;;) {
MusECore::Xml::Token token = xml.parse();
const QString& tag = xml.s1();
switch (token) {
case MusECore::Xml::Error:
case MusECore::Xml::End:
return;
case MusECore::Xml::TagStart:
if (tag == "topwin")
TopWin::readConfiguration(ARRANGER, xml);
else if (tag == "arranger")
Arranger::readConfiguration(xml);
else
xml.unknown("ArrangerView");
break;
case MusECore::Xml::TagEnd:
if (tag == "arrangerview")
return;
default:
break;
}
}
}
示例5: readStatus
void MidiEditor::readStatus(MusECore::Xml& xml)
{
if (_pl == 0)
_pl = new MusECore::PartList;
for (;;) {
MusECore::Xml::Token token = xml.parse();
QString tag = xml.s1();
switch (token) {
case MusECore::Xml::Error:
case MusECore::Xml::End:
return;
case MusECore::Xml::TagStart:
if (tag == "raster")
_raster = xml.parseInt();
else if (tag == "topwin")
TopWin::readStatus(xml);
else
xml.unknown("MidiEditor");
break;
case MusECore::Xml::TagEnd:
if (tag == "midieditor")
return;
default:
break;
}
}
}
示例6: read_configuration
void Move::read_configuration(MusECore::Xml& xml)
{
for (;;)
{
MusECore::Xml::Token token = xml.parse();
if (token == MusECore::Xml::Error || token == MusECore::Xml::End)
break;
const QString& tag = xml.s1();
switch (token)
{
case MusECore::Xml::TagStart:
if (tag == "range")
range=xml.parseInt();
else if (tag == "amount")
amount=xml.parseInt();
else
xml.unknown("Move");
break;
case MusECore::Xml::TagEnd:
if (tag == "move")
return;
default:
break;
}
}
}
示例7: writeConfiguration
void Arranger::writeConfiguration(int level, MusECore::Xml& xml)
{
xml.tag(level++, "arranger");
writeCustomColumns(level, xml);
xml.strTag(level, "tlist_header", header->saveState().toHex().constData());
xml.etag(level, "arranger");
}
示例8: readConfiguration
void Arranger::readConfiguration(MusECore::Xml& xml)
{
for (;;) {
MusECore::Xml::Token token(xml.parse());
const QString& tag(xml.s1());
switch (token) {
case MusECore::Xml::Error:
case MusECore::Xml::End:
return;
case MusECore::Xml::TagStart:
if (tag == "tlist_header")
header_state = QByteArray::fromHex(xml.parse1().toLatin1());
else if (tag == "custom_columns")
readCustomColumns(xml);
else
xml.unknown("Arranger");
break;
case MusECore::Xml::TagEnd:
if (tag == "arranger")
return;
default:
break;
}
}
}
示例9: write_configuration
void Move::write_configuration(int level, MusECore::Xml& xml)
{
xml.tag(level++, "move");
xml.intTag(level, "range", range);
xml.intTag(level, "amount", amount);
xml.tag(level, "/move");
}
示例10: readCustomColumns
void Arranger::readCustomColumns(MusECore::Xml& xml)
{
custom_columns.clear();
for (;;) {
MusECore::Xml::Token token(xml.parse());
const QString& tag(xml.s1());
switch (token) {
case MusECore::Xml::Error:
case MusECore::Xml::End:
new_custom_columns=custom_columns;
return;
case MusECore::Xml::TagStart:
if (tag == "column")
custom_columns.push_back(readOneCustomColumn(xml));
else
xml.unknown("Arranger::readCustomColumns");
break;
case MusECore::Xml::TagEnd:
if (tag == "custom_columns")
{
new_custom_columns=custom_columns;
return;
}
default:
break;
}
}
}
示例11: writeConfiguration
void ArrangerView::writeConfiguration(int level, MusECore::Xml& xml)
{
xml.tag(level++, "arrangerview");
TopWin::writeConfiguration(ARRANGER, level, xml);
arranger->writeConfiguration(level,xml);
xml.tag(level, "/arrangerview");
}
示例12: writeStatus
void ArrangerView::writeStatus(int level, MusECore::Xml& xml) const
{
xml.tag(level++, "arrangerview");
TopWin::writeStatus(level, xml);
xml.intTag(level, "tool", editTools->curTool());
arranger->writeStatus(level,xml);
xml.tag(level, "/arrangerview");
}
示例13: writeConfiguration
void WaveEdit::writeConfiguration(int level, MusECore::Xml& xml)
{
xml.tag(level++, "waveedit");
xml.colorTag(level, "bgcolor", MusEGlobal::config.waveEditBackgroundColor);
xml.intTag(level, "raster", _rasterInit);
xml.intTag(level, "colormode", colorModeInit);
TopWin::writeConfiguration(WAVE, level,xml);
xml.tag(level, "/waveedit");
}
示例14: writeStatus
void WaveEdit::writeStatus(int level, MusECore::Xml& xml) const
{
writePartList(level, xml);
xml.tag(level++, "waveedit");
MidiEditor::writeStatus(level, xml);
xml.intTag(level, "tool", int(canvas->tool()));
xml.intTag(level, "xmag", hscroll->mag());
xml.intTag(level, "xpos", hscroll->pos());
xml.intTag(level, "ymag", ymag->value());
xml.tag(level, "/waveedit");
}
示例15: read_configuration
void Remove::read_configuration(MusECore::Xml& xml)
{
for (;;)
{
MusECore::Xml::Token token = xml.parse();
if (token == MusECore::Xml::Error || token == MusECore::Xml::End)
break;
const QString& tag = xml.s1();
switch (token)
{
case MusECore::Xml::TagStart:
if (tag == "range")
range=xml.parseInt();
else if (tag == "velo_threshold")
velo_threshold=xml.parseInt();
else if (tag == "velo_thres_used")
velo_thres_used=xml.parseInt();
else if (tag == "len_threshold")
len_threshold=xml.parseInt();
else if (tag == "len_thres_used")
len_thres_used=xml.parseInt();
else
xml.unknown("Erase");
break;
case MusECore::Xml::TagEnd:
if (tag == "erase")
return;
default:
break;
}
}
}