当前位置: 首页>>代码示例>>C++>>正文


C++ Xml::tag方法代码示例

本文整理汇总了C++中Xml::tag方法的典型用法代码示例。如果您正苦于以下问题:C++ Xml::tag方法的具体用法?C++ Xml::tag怎么用?C++ Xml::tag使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Xml的用法示例。


在下文中一共展示了Xml::tag方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: write

void Hairpin::write(Xml& xml) const
      {
      if (!xml.canWrite(this))
            return;
      int id = xml.spannerId(this);
      xml.stag(QString("%1 id=\"%2\"").arg(name()).arg(id));
      xml.tag("subtype", int(_hairpinType));
      if (_useTextLine)
            xml.tag("useTextLine", true);
      writeProperty(xml, P_ID::VELO_CHANGE);
      writeProperty(xml, P_ID::HAIRPIN_CIRCLEDTIP);
      writeProperty(xml, P_ID::DYNAMIC_RANGE);
      writeProperty(xml, P_ID::PLACEMENT);
      writeProperty(xml, P_ID::HAIRPIN_HEIGHT);
      writeProperty(xml, P_ID::HAIRPIN_CONT_HEIGHT);
      TextLine::writeProperties(xml);
      xml.etag();
      }
开发者ID:HerbertYu,项目名称:MuseScore,代码行数:18,代码来源:hairpin.cpp

示例2: write

void Lyrics::write(Xml& xml) const
      {
      if (!xml.canWrite(this))
            return;
      xml.stag("Lyrics");
      if (_no)
            xml.tag("no", _no);
      if (_syllabic != Syllabic::SINGLE) {
            static const char* sl[] = {
                  "single", "begin", "end", "middle"
                  };
            xml.tag("syllabic", sl[int(_syllabic)]);
            }
      writeProperty(xml, P_ID::LYRIC_TICKS);

      Text::writeProperties(xml);
      xml.etag();
      }
开发者ID:barichd,项目名称:MuseScore,代码行数:18,代码来源:lyrics.cpp

示例3: write

void StaffState::write(Xml& xml) const
      {
      xml.stag(name());
      xml.tag("subtype", int(_staffStateType));
      if (staffStateType() == StaffStateType::INSTRUMENT)
            _instrument->write(xml);
      Element::writeProperties(xml);
      xml.etag();
      }
开发者ID:JessicaWhite17,项目名称:MuseScore,代码行数:9,代码来源:staffstate.cpp

示例4: writeProperties

void Box::writeProperties(Xml& xml) const
      {
      writeProperty(xml, P_ID::BOX_HEIGHT);
      writeProperty(xml, P_ID::BOX_WIDTH);

      if (getProperty(P_ID::TOP_GAP) != propertyDefault(P_ID::TOP_GAP))
            xml.tag("topGap", _topGap / spatium());
      if (getProperty(P_ID::BOTTOM_GAP) != propertyDefault(P_ID::BOTTOM_GAP))
            xml.tag("bottomGap", _bottomGap / spatium());
      writeProperty(xml, P_ID::LEFT_MARGIN);
      writeProperty(xml, P_ID::RIGHT_MARGIN);
      writeProperty(xml, P_ID::TOP_MARGIN);
      writeProperty(xml, P_ID::BOTTOM_MARGIN);

      Element::writeProperties(xml);
      foreach (const Element* el, _el)
            el->write(xml);
      }
开发者ID:FryderykChopin,项目名称:MuseScore,代码行数:18,代码来源:box.cpp

示例5: write

void NamedEventList::write(Xml& xml, const QString& n) const
      {
      xml.stag(QString("%1 name=\"%2\"").arg(n).arg(name));
      if (!descr.isEmpty())
            xml.tag("descr", descr);
      foreach(const Event& e, events)
            e.write(xml);
      xml.etag();
      }
开发者ID:Archer90,项目名称:MuseScore,代码行数:9,代码来源:instrument.cpp

示例6: write

void Articulation::write(Xml& xml) const
      {
      if (!xml.canWrite(this))
            return;
      xml.stag("Articulation");
      if (!_channelName.isEmpty())
            xml.tagE(QString("channel name=\"%1\"").arg(_channelName));
      writeProperty(xml, P_ID::DIRECTION);
      xml.tag("subtype", subtypeName());
      if (_timeStretch != 1.0)
            xml.tag("timeStretch", _timeStretch);
      writeProperty(xml, P_ID::PLAY_ARTICULATION);
      writeProperty(xml, P_ID::ORNAMENT_STYLE);
      Element::writeProperties(xml);
      if (anchorStyle == PropertyStyle::UNSTYLED)
            xml.tag("anchor", int(_anchor));
      xml.etag();
      }
开发者ID:Skyh13,项目名称:MuseScore,代码行数:18,代码来源:articulation.cpp

示例7: write

void Dynamic::write(Xml& xml) const
      {
      xml.stag("Dynamic");
      xml.tag("subtype", dynamicTypeName());
      writeProperty(xml, P_VELOCITY);
      writeProperty(xml, P_DYNAMIC_RANGE);
      Text::writeProperties(xml, dynamicType() == 0);
      xml.etag();
      }
开发者ID:Annovae,项目名称:MuseScore,代码行数:9,代码来源:dynamic.cpp

示例8: write

void Lyrics::write(Xml& xml) const
      {
      xml.stag("Lyrics");
      if (_no)
            xml.tag("no", _no);
      if (_syllabic != SINGLE) {
            static const char* sl[] = {
                  "single", "begin", "end", "middle"
                  };
            xml.tag("syllabic", sl[_syllabic]);
            }
      if (_ticks)
            xml.tag("ticks", _ticks);
      Text::writeProperties(xml);
      if (_verseNumber)
            _verseNumber->write(xml, "Number");
      xml.etag();
      }
开发者ID:SSMN,项目名称:MuseScore,代码行数:18,代码来源:lyrics.cpp

示例9: write

void StaffState::write(Xml& xml) const
      {
      xml.stag(name());
      xml.tag("subtype", _subtype);
      if (subtype() == STAFF_STATE_INSTRUMENT)
            _instrument.write(xml);
      Element::writeProperties(xml);
      xml.etag();
      }
开发者ID:Isenbarth,项目名称:MuseScore,代码行数:9,代码来源:staffstate.cpp

示例10: write

void Trill::write(Xml& xml) const
      {
      xml.stag(QString("%1 id=\"%2\"").arg(name()).arg(id()));
      if (_accidental)
            _accidental->write(xml);
      xml.tag("subtype", subtypeName());
      SLine::writeProperties(xml);
      xml.etag();
      }
开发者ID:hanabokuro,项目名称:MuseScore,代码行数:9,代码来源:trill.cpp

示例11: 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");
}
开发者ID:ViktorNova,项目名称:los,代码行数:44,代码来源:minstrument.cpp

示例12: writeProperties

void AudioTrack::writeProperties(int level, Xml& xml) const
{
	Track::writeProperties(level, xml);
	xml.intTag(level, "prefader", prefader());
	xml.intTag(level, "sendMetronome", sendMetronome());
	xml.intTag(level, "automation", int(automationType()));
	if (hasAuxSend())
	{
		QHashIterator<qint64, AuxInfo> iter(_auxSend);
		while (iter.hasNext())
		{
			iter.next();
			Track* t = song->findTrackByIdAndType(iter.key(), Track::AUDIO_AUX);
			//Write it out only if the AUX track still exists
			if(t)
			{
				bool pre = iter.value().first;
				double val = iter.value().second;
				QString s("<auxSend trackId=\"%1\" pre=\"%2\">%3</auxSend>\n");
				xml.nput(level, s.arg(iter.key()).arg(pre).arg(val).toAscii().constData());
			}
		}
	}
    if (_wantsAutomation == false)
    {
        // _wantsAutomation is only set on fake midi automation tracks. on those, we don't need to save the plugins (synth) config
        for (ciPluginI ip = _efxPipe->begin(); ip != _efxPipe->end(); ++ip)
        {
            if (*ip)
                (*ip)->writeConfiguration(level, xml);
        }
    }
	for (ciCtrlList icl = _controller.begin(); icl != _controller.end(); ++icl)
	{
		const CtrlList* cl = icl->second;

		QString s= QString("controller id=\"%1\" cur=\"%2\"").arg(cl->id()).arg(cl->curVal()).toAscii().constData();
		s += QString(" color=\"%1\" visible=\"%2\"").arg(cl->color().name()).arg(cl->isVisible());
		xml.tag(level++, s.toAscii().constData());
		int i = 0;
		for (ciCtrl ic = cl->begin(); ic != cl->end(); ++ic)
		{
			QString s("%1 %2, ");
			xml.nput(level, s.arg(ic->second.getFrame()).arg(ic->second.val).toAscii().constData());
			++i;
			if (i >= 4)
			{
				xml.put(level, "");
				i = 0;
			}
		}
		if (i)
			xml.put(level, "");
        xml.etag(--level, "controller");
	}
}
开发者ID:87maxi,项目名称:oom,代码行数:56,代码来源:audiotrack.cpp

示例13: writeShortCuts

void writeShortCuts(int level, Xml& xml)
{
	xml.tag(level++, "shortcuts");
	for (int i = 0; i < SHRT_NUM_OF_ELEMENTS; i++)
	{
		if (shortcuts[i].xml != NULL && shortcuts[i].type != INVIS_SHRT) //Avoid nullptr & hardcoded shortcuts
			xml.intTag(level, shortcuts[i].xml, shortcuts[i].key);
	}
	xml.etag(level, "shortcuts");
}
开发者ID:faesong,项目名称:oom,代码行数:10,代码来源:shortcuts.cpp

示例14: writeProperties

void ElementLayout::writeProperties(Xml& xml, const ElementLayout& l) const
      {
      if ((l._align & ALIGN_HMASK) != (_align & ALIGN_HMASK)) {
            const char* p;
            if (_align & ALIGN_HCENTER)
                  p = "center";
            else if (_align & ALIGN_RIGHT)
                  p = "right";
            else
                  p = "left";
            xml.tag("halign", p);
            }

      if ((l._align & ALIGN_VMASK) != (_align & ALIGN_VMASK)) {
            const char* p;
            if (_align & ALIGN_BOTTOM)
                  p = "bottom";
            else if (_align & ALIGN_VCENTER)
                  p = "center";
            else if (_align & ALIGN_BASELINE)
                  p = "baseline";
            else
                  p = "top";
            xml.tag("valign", p);
            }

      if (l._offset != _offset) {
            QPointF pt(_offset);
            if (offsetType() == OffsetType::ABS)
                  pt *= INCH;
            xml.tag("xoffset", pt.x());         // save in spatium or metric mm
            xml.tag("yoffset", pt.y());
            }

      if (_offsetType != l._offsetType) {
            const char* p = 0;
            switch(_offsetType) {
                  case OffsetType::SPATIUM: p = "spatium"; break;
                  case OffsetType::ABS:     p = "absolute"; break;
                  }
            xml.tag("offsetType", p);
            }
      }
开发者ID:WeiChou,项目名称:MuseScore,代码行数:43,代码来源:elementlayout.cpp

示例15: write

void Breath::write(Xml& xml) const
      {
      if (!xml.canWrite(this))
            return;
      xml.stag("Breath");
      xml.tag("subtype", _breathType);
      writeProperty(xml, P_ID::PAUSE);
      Element::writeProperties(xml);
      xml.etag();
      }
开发者ID:Angeldude,项目名称:MuseScore,代码行数:10,代码来源:breath.cpp


注:本文中的Xml::tag方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。