您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ writeProperty函数代码示例

51自学网 2021-06-03 10:04:26
  C++
这篇教程C++ writeProperty函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中writeProperty函数的典型用法代码示例。如果您正苦于以下问题:C++ writeProperty函数的具体用法?C++ writeProperty怎么用?C++ writeProperty使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

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

示例1: switch

void ChordRest::writeProperties(Xml& xml) const      {      DurationElement::writeProperties(xml);      //      // Beam::Mode default:      //    REST  - Beam::Mode::NONE      //    CHORD - Beam::Mode::AUTO      //      if ((type() == Element::Type::REST && _beamMode != Beam::Mode::NONE)         || (type() == Element::Type::CHORD && _beamMode != Beam::Mode::AUTO)) {            QString s;            switch(_beamMode) {                  case Beam::Mode::AUTO:    s = "auto"; break;                  case Beam::Mode::BEGIN:   s = "begin"; break;                  case Beam::Mode::MID:     s = "mid"; break;                  case Beam::Mode::END:     s = "end"; break;                  case Beam::Mode::NONE:    s = "no"; break;                  case Beam::Mode::BEGIN32: s = "begin32"; break;                  case Beam::Mode::BEGIN64: s = "begin64"; break;                  case Beam::Mode::INVALID: s = "?"; break;                  }            xml.tag("BeamMode", s);            }      writeProperty(xml, P_ID::SMALL);      if (actualDurationType().dots())            xml.tag("dots", actualDurationType().dots());      writeProperty(xml, P_ID::STAFF_MOVE);      if (actualDurationType().isValid())            xml.tag("durationType", actualDurationType().name());      if (!duration().isZero() && (!actualDurationType().fraction().isValid()         || (actualDurationType().fraction() != duration())))            xml.fTag("duration", duration());      foreach(const Articulation* a, _articulations)            a->write(xml);#ifndef NDEBUG      if (_beam && (MScore::testMode || !_beam->generated()))            xml.tag("Beam", _beam->id());#else      if (_beam && !_beam->generated())            xml.tag("Beam", _beam->id());#endif      foreach(Lyrics* lyrics, _lyricsList) {            if (lyrics)                  lyrics->write(xml);            }      if (!isGrace()) {            Fraction t(globalDuration());            if (staff())                  t *= staff()->timeStretch(xml.curTick);            xml.curTick += t.ticks();            }      }
开发者ID:DaneTheory,项目名称:MuseScore,代码行数:55,


示例2: dynamicTypeName

void Dynamic::write(Xml& xml) const      {      if (!xml.canWrite(this))            return;      xml.stag("Dynamic");      xml.tag("subtype", dynamicTypeName());      writeProperty(xml, P_ID::VELOCITY);      writeProperty(xml, P_ID::DYNAMIC_RANGE);      Text::writeProperties(xml, dynamicType() == Type::OTHER);      xml.etag();      }
开发者ID:NupurMalpani,项目名称:MuseScore,代码行数:11,


示例3: openMsg

void TeamcityMessages::testFailed(string name, string message, string details, string flowid) {    openMsg("testFailed");    writeProperty("name", name);    writeProperty("message", message);    writeProperty("details", details);    if(flowid.length() > 0) {        writeProperty("flowId", flowid);    }    closeMsg();}
开发者ID:AtosCodex,项目名称:ignite,代码行数:11,


示例4: writeProperty

void TremoloBar::write(XmlWriter& xml) const      {      xml.stag("TremoloBar");      writeProperty(xml, Pid::MAG);      writeProperty(xml, Pid::LINE_WIDTH);      writeProperty(xml, Pid::PLAY);      for (const PitchValue& v : _points) {            xml.tagE(QString("point time=/"%1/" pitch=/"%2/" vibrato=/"%3/"")               .arg(v.time).arg(v.pitch).arg(v.vibrato));            }      xml.etag();      }
开发者ID:CammyVee,项目名称:MuseScore,代码行数:12,


示例5: writeProperty

void Hairpin::write(Xml& xml) const      {      xml.stag(QString("%1 id=/"%2/"").arg(name()).arg(id()));      xml.tag("subtype", _hairpinType);      xml.tag("veloChange", _veloChange);      writeProperty(xml, P_DYNAMIC_RANGE);      writeProperty(xml, P_PLACEMENT);      writeProperty(xml, P_HAIRPIN_HEIGHT);      writeProperty(xml, P_HAIRPIN_CONT_HEIGHT);      SLine::writeProperties(xml);      xml.etag();      }
开发者ID:BlueMockingbird,项目名称:MuseScore,代码行数:12,


示例6: vibratoTypeName

void Vibrato::write(XmlWriter& xml) const      {      if (!xml.canWrite(this))            return;      xml.stag(this);      xml.tag("subtype", vibratoTypeName());      writeProperty(xml, Pid::PLAY);      for (const StyledProperty& spp : *styledProperties())            writeProperty(xml, spp.pid);      SLine::writeProperties(xml);      xml.etag();      }
开发者ID:Jojo-Schmitz,项目名称:MuseScore,代码行数:12,


示例7: trillTypeName

void Trill::write(XmlWriter& xml) const      {      if (!xml.canWrite(this))            return;      xml.stag(QString("%1 id=/"%2/"").arg(name()).arg(xml.spannerId(this)));      xml.tag("subtype", trillTypeName());      writeProperty(xml, Pid::PLAY);      writeProperty(xml, Pid::ORNAMENT_STYLE);      SLine::writeProperties(xml);      if (_accidental)            _accidental->write(xml);      xml.etag();      }
开发者ID:emeraldimp,项目名称:MuseScore,代码行数:13,


示例8: qDebug

void Fermata::write(XmlWriter& xml) const      {      if (!xml.canWrite(this)) {            qDebug("%s not written", name());            return;            }      xml.stag(this);      xml.tag("subtype", Sym::id2name(_symId));      writeProperty(xml, Pid::TIME_STRETCH);      writeProperty(xml, Pid::PLAY);      Element::writeProperties(xml);      xml.etag();      }
开发者ID:mmuman,项目名称:MuseScore,代码行数:13,


示例9: writeProperty

void GeoRectangleValueType::writeVariantValue(QObject *obj, int idx, QQmlPropertyPrivate::WriteFlags flags, QVariant *from){    if (from->userType() == qMetaTypeId<QGeoRectangle>()) {        writeProperty(obj, idx, flags, from);    } else if (from->userType() == qMetaTypeId<QGeoShape>()) {        QGeoRectangle r = from->value<QGeoShape>();        QVariant v = QVariant::fromValue(r);        writeProperty(obj, idx, flags, &v);    } else {        QVariant v = QVariant::fromValue(QGeoRectangle());        writeProperty(obj, idx, flags, &v);    }}
开发者ID:SchleunigerAG,项目名称:WinEC7_Qt5.3.1_Fixes,代码行数:13,


示例10: int

void Glissando::write(Xml& xml) const      {      if (!xml.canWrite(this))            return;      xml.stag(QString("%1 id=/"%2/"").arg(name()).arg(xml.spannerId(this)));      if (_showText && !_text.isEmpty())            xml.tag("text", _text);      xml.tag("subtype", int(_glissandoType));      writeProperty(xml, P_ID::PLAY);      writeProperty(xml, P_ID::GLISSANDO_STYLE);      SLine::writeProperties(xml);      xml.etag();      }
开发者ID:ajyoon,项目名称:MuseScore,代码行数:13,


示例11: trillTypeName

void Trill::write(XmlWriter& xml) const      {      if (!xml.canWrite(this))            return;      xml.stag(this);      xml.tag("subtype", trillTypeName());      writeProperty(xml, Pid::PLAY);      writeProperty(xml, Pid::ORNAMENT_STYLE);      writeProperty(xml, Pid::PLACEMENT);      SLine::writeProperties(xml);      if (_accidental)            _accidental->write(xml);      xml.etag();      }
开发者ID:musescore,项目名称:MuseScore,代码行数:14,


示例12: writeProperty

void LayoutBreak::write(Xml& xml) const      {      xml.stag(name());      Element::writeProperties(xml);      writeProperty(xml, P_ID::LAYOUT_BREAK);      writeProperty(xml, P_ID::PAUSE);      if (!_startWithLongNames)            xml.tag("startWithLongNames", _startWithLongNames);      if (!_startWithMeasureOne)            xml.tag("startWithMeasureOne", _startWithMeasureOne);      xml.etag();      }
开发者ID:FryderykChopin,项目名称:MuseScore,代码行数:14,


示例13: PRECONDITION

  void SDWriter::write(const ROMol &mol, int confId) {    PRECONDITION(dp_ostream,"no output stream");    // write the molecule     (*dp_ostream) << MolToMolBlock(mol, true, confId, df_kekulize, df_forceV3000);    // now write the properties    STR_VECT_CI pi;    if (d_props.size() > 0) {      // check if we have any properties the user specified to write out      // in which loop over them and write them out      for (pi = d_props.begin(); pi != d_props.end(); pi++) {	if (mol.hasProp(*pi)) {	  writeProperty(mol, (*pi));	}      }    }    else {      // if use did not specify any properties, write all non computed properties      // out to the file      STR_VECT properties = mol.getPropList();      STR_VECT compLst;      if (mol.hasProp(detail::computedPropName)) {	mol.getProp(detail::computedPropName, compLst);      }      STR_VECT_CI pi;      for (pi = properties.begin(); pi != properties.end(); pi++) {	// ignore any of the following properties	if ( ((*pi) == detail::computedPropName) || 	     ((*pi) == "_Name") ||	     ((*pi) == "_MolFileInfo") ||	     ((*pi) == "_MolFileComments") ||             ((*pi) == "_MolFileChiralFlag")) {	  continue;	}	// check if this property is not computed	if (std::find(compLst.begin(), compLst.end(), (*pi)) == compLst.end()) {	  writeProperty(mol, (*pi));	}      }    }    // add the $$$$ that marks the end of a molecule    (*dp_ostream) << "$$$$/n";    ++d_molid;  }
开发者ID:Acpharis,项目名称:rdkit,代码行数:48,


示例14: writeProperty

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", Sym::id2name(_symId));      writeProperty(xml, P_ID::TIME_STRETCH);      writeProperty(xml, P_ID::PLAY);      writeProperty(xml, P_ID::ORNAMENT_STYLE);      Element::writeProperties(xml);      writeProperty(xml, P_ID::ARTICULATION_ANCHOR);      xml.etag();      }
开发者ID:ajyoon,项目名称:MuseScore,代码行数:16,


示例15: setExecuting

 void setExecuting(bool executing) {    if (!empty())    {       std::string value = safe_convert::numberToString(executing);       writeProperty("executing", value);    } }
开发者ID:AndreasGr,项目名称:rstudio,代码行数:8,


示例16: setSavePromptRequired

 void setSavePromptRequired(bool savePromptRequired) {    if (!empty())    {       std::string value = safe_convert::numberToString(savePromptRequired);       writeProperty("save_prompt_required", value);    } }
开发者ID:AndreasGr,项目名称:rstudio,代码行数:8,


示例17: setRunning

 void setRunning(bool running) {    if (!empty())    {       std::string value = safe_convert::numberToString(running);       writeProperty("running", value);    } }
开发者ID:AndreasGr,项目名称:rstudio,代码行数:8,


示例18: setInitial

 void setInitial(bool initial) {    if (!empty())    {       std::string value = safe_convert::numberToString(initial);       writeProperty("initial", value);    } }
开发者ID:AndreasGr,项目名称:rstudio,代码行数:8,


示例19: writeProperty

void Ottava::write(Xml& xml) const      {      xml.stag(QString("%1 id=/"%2/"").arg(name()).arg(id()));      writeProperty(xml, P_ID::NUMBERS_ONLY);      xml.tag("subtype", ottavaDefault[int(ottavaType())].name);      TextLine::writeProperties(xml);      xml.etag();      }
开发者ID:cynisright,项目名称:MuseScore,代码行数:8,


示例20: writeProperty

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);      writeProperty(xml, P_ID::ORNAMENT_STYLE);      Element::writeProperties(xml);      if (anchorStyle == PropertyStyle::UNSTYLED)            xml.tag("anchor", int(_anchor));      xml.etag();      }
开发者ID:FryderykChopin,项目名称:MuseScore,代码行数:18,


示例21: setLastUsed

 void setLastUsed() {    if (!empty())    {       double now = date_time::millisecondsSinceEpoch();       std::string value = safe_convert::numberToString(now);       writeProperty("last-used", value);    } }
开发者ID:AndreasGr,项目名称:rstudio,代码行数:9,


示例22: writeProperty

void Ottava::write(Xml& xml) const      {      if (!xml.canWrite(this))            return;      xml.stag(QString("%1 id=/"%2/"").arg(name()).arg(xml.spannerId(this)));      writeProperty(xml, P_ID::NUMBERS_ONLY);      xml.tag("subtype", ottavaDefault[int(ottavaType())].name);      TextLine::writeProperties(xml);      xml.etag();      }
开发者ID:FryderykChopin,项目名称:MuseScore,代码行数:10,


示例23: writeProperty

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,


示例24: writeProperty

void Jump::write(XmlWriter& xml) const      {      xml.stag(name());      Text::writeProperties(xml);      xml.tag("jumpTo", _jumpTo);      xml.tag("playUntil", _playUntil);      xml.tag("continueAt", _continueAt);      writeProperty(xml, P_ID::PLAY_REPEATS);      xml.etag();      }
开发者ID:AntonioBL,项目名称:MuseScore,代码行数:10,


示例25: writeStyledProperties

void Bend::write(XmlWriter& xml) const      {      xml.stag(this);      for (const PitchValue& v : _points) {            xml.tagE(QString("point time=/"%1/" pitch=/"%2/" vibrato=/"%3/"")               .arg(v.time).arg(v.pitch).arg(v.vibrato));            }      writeStyledProperties(xml);      writeProperty(xml, Pid::PLAY);      Element::writeProperties(xml);      xml.etag();      }
开发者ID:IsaacWeiss,项目名称:MuseScore,代码行数:12,


示例26: writeProperty

void TimeSig::write(XmlWriter& xml) const      {      xml.stag("TimeSig");      writeProperty(xml, P_ID::TIMESIG_TYPE);      Element::writeProperties(xml);      xml.tag("sigN",  _sig.numerator());      xml.tag("sigD",  _sig.denominator());      if (stretch() != Fraction(1,1)) {            xml.tag("stretchN", stretch().numerator());            xml.tag("stretchD", stretch().denominator());            }      writeProperty(xml, P_ID::NUMERATOR_STRING);      writeProperty(xml, P_ID::DENOMINATOR_STRING);      if (!_groups.empty())            _groups.write(xml);      writeProperty(xml, P_ID::SHOW_COURTESY);      writeProperty(xml, P_ID::SCALE);      xml.etag();      }
开发者ID:akdor1154,项目名称:MuseScore,代码行数:21,


示例27: writeProperty

void Ottava::write(XmlWriter& xml) const      {      if (!xml.canWrite(this))            return;      xml.stag(this);      xml.tag("subtype", ottavaDefault[int(ottavaType())].name);      writeProperty(xml, Pid::PLACEMENT);//      for (const StyledProperty& spp : *styledProperties())//            writeProperty(xml, spp.pid);      TextLineBase::writeProperties(xml);      xml.etag();      }
开发者ID:mmuman,项目名称:MuseScore,代码行数:12,


示例28: writeProperty

bool MaterialEditDialog::writeMaterial(){    if (lstProperties->currentItem())        m_properties.replace(lstProperties->currentRow(), writeProperty());    QFileInfo fileInfo(m_fileName);    if (fileInfo.baseName() != txtName->text())    {        bool move = true;        // rename file        QString newFilename = fileInfo.absolutePath() + "/" + txtName->text() + ".mat";        if (QFile::exists(newFilename))            move = (QMessageBox::question(this, tr("File exists"), tr("Material '%1' already exists. Do you wish replace this file?").arg(newFilename)) == 0);        if (move)        {            QFile::remove(m_fileName);            m_fileName = newFilename;        }    }    try    {        // general        XMLMaterial::general general(txtName->text().toStdString());        general.description().set(txtDescription->text().toStdString());        // properties        XMLMaterial::properties properties;        foreach(XMLMaterial::property prop, m_properties)        {            // add property            properties.property().push_back(prop);        }        // material        XMLMaterial::material material(general, properties);        std::string mesh_schema_location("");        // TODO: set path more general        mesh_schema_location.append(QString("%1/material_xml.xsd").arg(QFileInfo(datadir() + XSDROOT).absoluteFilePath()).toStdString());        ::xml_schema::namespace_info namespace_info_mesh("XMLMaterial", mesh_schema_location);        ::xml_schema::namespace_infomap namespace_info_map;        namespace_info_map.insert(std::pair<std::basic_string<char>, xml_schema::namespace_info>("material", namespace_info_mesh));        std::ofstream out(compatibleFilename(m_fileName).toStdString().c_str());        XMLMaterial::material_(out, material, namespace_info_map);        return true;    }
开发者ID:deniq,项目名称:agros2d,代码行数:53,



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


C++ writeRMI函数代码示例
C++ writePacket函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。