本文整理汇总了C++中writeProperty函数的典型用法代码示例。如果您正苦于以下问题:C++ writeProperty函数的具体用法?C++ writeProperty怎么用?C++ writeProperty使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了writeProperty函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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();
}
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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);
}
}
示例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();
}
示例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();
}
示例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();
}
示例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;
}
示例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();
}
示例15: setExecuting
void setExecuting(bool executing)
{
if (!empty())
{
std::string value = safe_convert::numberToString(executing);
writeProperty("executing", value);
}
}