本文整理汇总了C++中KeyMap::write方法的典型用法代码示例。如果您正苦于以下问题:C++ KeyMap::write方法的具体用法?C++ KeyMap::write怎么用?C++ KeyMap::write使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KeyMap
的用法示例。
在下文中一共展示了KeyMap::write方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: write
void MidiInstrument::write(int level, Xml& xml)
{
xml.header();
xml.tag(level, "los version=\"1.0\"");
level++;
xml.nput(level, "<MidiInstrument name=\"%s\" panValue=\"%f\"",
Xml::xmlString(iname()).toLatin1().constData(), m_panValue);
if (_nullvalue != -1)
{
QString nv;
nv.setNum(_nullvalue);
xml.nput(" nullparam=\"%s\"", nv.toLatin1().constData());
}
xml.put(">");
// -------------
// What about Init, Reset, State, and InitScript ?
// -------------
level++;
for (ciPatchGroup g = pg.begin(); g != pg.end(); ++g)
{
PatchGroup* pgp = *g;
const PatchList& pl = pgp->patches;
xml.tag(level, "PatchGroup name=\"%s\"", Xml::xmlString(pgp->name).toLatin1().constData());
level++;
for (ciPatch p = pl.begin(); p != pl.end(); ++p)
(*p)->write(level, xml);
level--;
xml.etag(level, "PatchGroup");
}
for (iMidiController ic = _controller->begin(); ic != _controller->end(); ++ic)
ic->second->write(level, xml);
for(QHash<int, KeyMap*>::const_iterator km = m_keymaps.begin(); km != m_keymaps.end(); ++km)
{
KeyMap *m = km.value();
m->write(level, xml);
}
level--;
xml.etag(level, "MidiInstrument");
level--;
xml.etag(level, "los");
}