本文整理汇总了C++中QXmlStreamWriter类的典型用法代码示例。如果您正苦于以下问题:C++ QXmlStreamWriter类的具体用法?C++ QXmlStreamWriter怎么用?C++ QXmlStreamWriter使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了QXmlStreamWriter类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: dumpGPX
void CLandmarkPoint::dumpGPX( QXmlStreamWriter & _rqXmlStreamWriter ) const
{
// GPX format reference: see http://www.topografix.com/GPX/1/1/
// Data
_rqXmlStreamWriter.writeStartElement( "wpt" );
// ... position
_rqXmlStreamWriter.writeAttribute( "lon", QString::number( CDataPosition::getLongitude() ) );
_rqXmlStreamWriter.writeAttribute( "lat", QString::number( CDataPosition::getLatitude() ) );
// ... name
if( !qsName.isEmpty() )
{
_rqXmlStreamWriter.writeStartElement( "name" );
_rqXmlStreamWriter.writeCharacters( qsName );
_rqXmlStreamWriter.writeEndElement(); // name
}
// ... elevation
if( CDataPosition::getElevation() != CDataPosition::UNDEFINED_ELEVATION )
{
_rqXmlStreamWriter.writeStartElement( "ele" );
_rqXmlStreamWriter.writeCharacters( QString::number( CDataPosition::getElevation() ) );
_rqXmlStreamWriter.writeEndElement(); // ele
}
// ... type
if( !qsType.isEmpty() )
{
_rqXmlStreamWriter.writeStartElement( "type" );
_rqXmlStreamWriter.writeCharacters( qsType );
_rqXmlStreamWriter.writeEndElement(); // type
}
// ... description
if( !qsDescription.isEmpty() )
{
_rqXmlStreamWriter.writeStartElement( "desc" );
_rqXmlStreamWriter.writeCDATA( qsDescription );
_rqXmlStreamWriter.writeEndElement(); // desc
}
// ... comment
if( !qsComment.isEmpty() )
{
_rqXmlStreamWriter.writeStartElement( "cmt" );
_rqXmlStreamWriter.writeCDATA( qsComment );
_rqXmlStreamWriter.writeEndElement(); // cmt
}
// ... symbol
if( !qsSymbol.isEmpty() )
{
_rqXmlStreamWriter.writeStartElement( "sym" );
_rqXmlStreamWriter.writeCharacters( qsSymbol );
_rqXmlStreamWriter.writeEndElement(); // sym
}
// ... url
if( !qsUrl.isEmpty() )
{
_rqXmlStreamWriter.writeStartElement( "link" );
_rqXmlStreamWriter.writeAttribute( "href", qsUrl );
_rqXmlStreamWriter.writeEndElement(); // link
}
// ... [end]
_rqXmlStreamWriter.writeEndElement(); // wpt
}
示例2: saveTopbarItemsSchemas
void radeon_profile::saveTopbarItemsSchemas(QXmlStreamWriter &xml) {
xml.writeStartElement("TopbarItems");
for (const TopbarItemDefinitionSchema &tis : topbarManager.schemas) {
xml.writeStartElement("topbarItem");
xml.writeAttribute("type", QString::number(tis.type));
xml.writeAttribute("primaryValueId", QString::number(tis.primaryValueId));
xml.writeAttribute("primaryColor", tis.primaryColor.name());
xml.writeAttribute("secondaryValueIdEnabled", QString::number(tis.secondaryValueIdEnabled));
xml.writeAttribute("secondaryValueId", QString::number(tis.secondaryValueId));
xml.writeAttribute("secondaryColor", tis.secondaryColor.name());
xml.writeAttribute("pieMaxValue", QString::number(tis.pieMaxValue));
xml.writeEndElement();
}
xml.writeEndElement();
}
示例3: tr
void ProfileManagement::on_pushButton_4_clicked()
{
int AllRowNumber;
AllRowNumber = ui->tableWidget->rowCount();
QDateTime DateTime = QDateTime::currentDateTime();
QString DateTime11 = DateTime.toString();
if(AllRowNumber==0)
{
ui->textEdit->setText("<"+DateTime11+"> Brak danych do zapisu!\n");
return;
}
QString fileName = QFileDialog::getSaveFileName(this, tr("Save File"),
"",
tr("Files (*.xml)"));
if(fileName==0)
{
ui->textEdit->setText("<"+DateTime11+"> Brak sciezki!\n");
return;
}
else
{
ui->textEdit->setText("<"+DateTime11+"> Plik pomyślnie wczytany!\n");
}
QFile file(fileName);
file.open(QIODevice::WriteOnly);
QXmlStreamWriter *xmlWriter = new QXmlStreamWriter(&file);
xmlWriter->writeStartDocument();
xmlWriter->setAutoFormatting(true);
int tmpsila;
int tmpkat;
int tmppozycja;
QString tmprotacja;
int tmpprocent;
int hitss;
for(int i2=0; i2<AllRowNumber; i2++)
{
hitss = Profil::Profile_Array.at(i2)->Hits;
xmlWriter->writeStartElement("Uderzenia");
xmlWriter->writeAttribute("Ilosc", QString::number(hitss));
xmlWriter->writeTextElement("Nazwa", ui->tableWidget->item(i2,0)->text());
for(int i=0;i<Profil::Profile_Array.at(i2)->Rows;i++)
{
tmppozycja = Profil::Profile_Array.at(i2)->Position.at(i);
tmpkat = Profil::Profile_Array.at(i2)->Angle.at(i);
tmpsila = Profil::Profile_Array.at(i2)->Power.at(i);
tmprotacja = Profil::Profile_Array.at(i2)->Rotation.at(i);
tmpprocent = (float)Profil::Profile_Array.at(i2)->Percent.at(i);
xmlWriter->writeStartElement("Uderzenie");
xmlWriter->writeTextElement("Procent", QString::number(tmpprocent/100.0));
xmlWriter->writeTextElement("Sila",QString::number(tmpsila));
QString Rotacja = tmprotacja;
if(Rotacja=="Boczna")
{
xmlWriter->writeTextElement("Rotacja","Boczna");
}
if(Rotacja=="Wsteczna")
{
xmlWriter->writeTextElement("Rotacja","Wsteczna");
}
if(Rotacja=="Gorna")
{
xmlWriter->writeTextElement("Rotacja","Gorna");
}
if(Rotacja=="Brak")
{
xmlWriter->writeTextElement("Rotacja","Brak");
}
xmlWriter->writeTextElement("Kat",QString::number(tmpkat));
xmlWriter->writeTextElement("Pozycja",QString::number(tmppozycja));
xmlWriter->writeEndElement();
}
}
xmlWriter->writeEndElement();
xmlWriter->writeEndDocument();
ui->textEdit->setText("<"+DateTime11+">Plik pomyślnie zapisany!\n");
file.close();
}
示例4: Default
void Generate_Xml::appendXMLFile(QLineEdit *s,QVector<QLineEdit *> p,int track_subfield,int track_tabchild,int track_tabsibling)
{
int j=0;
QFile Default("default1.xml");
std::cout << "You are now inside appendXmlFile";
QXmlStreamWriter *xmlWriter = new QXmlStreamWriter();
QXmlStreamWriter *xmlWriter2 = new QXmlStreamWriter();
if (!Default.open(QIODevice::Append))
{
/* show wrror message if not able to open file */
QMessageBox::warning(0, "Read only", "The file is in read only mode");
}
else
{
QString tem;
QString temp1;
xmlWriter->setAutoFormatting (true);
xmlWriter->setDevice(&Default);
xmlWriter2->setDevice(&Default);
xmlWriter->autoFormatting();
tem=s->displayText();
xmlWriter2->writeEndDocument();
for(int i=0;i<track_tabchild;i++)
{
xmlWriter->writeCharacters("\t");
}
xmlWriter->writeStartElement(tem);
/* std::cout << "You are now appending to the file";*/
/*xmlWriter1->setDevice(&Default);*/
/*xmlWriter1->autoFormatting();*/
/*xmlWriter1->setAutoFormatting (true);*/
//while(i<t)
//{
// if(p.at(i)==0 && i != (t-1))
// {
// i++;
//
// tem=(p.at(i))->displayText();
// /*temp=tem.toStdString();*/
// xmlWriter->writeStartElement(tem);
// i++;
//
//
// }
// if(p.at(i-1)!= 0 && p.at(i)== 0)
// {
// //xmlWriter1->writeCharacters(" ");
// xmlWriter->writeEndDocument();
// i++;
//
// if(i=t)
// break;
//
// }
// if(p.at(i)!= 0)
// {
// tem=(p.at(i))->displayText();
// i++;
//
// temp1=(p.at(i))->displayText();
// i++;
//
// xmlWriter->writeAttribute(tem,temp1);
//
// }
//}
xmlWriter->writeCharacters(" ");
Default.close();
for(int i=0;i<track_subfield;++i)
j=rewriteXMLFile(p,j+1,track_tabsibling);
//xmlWriter->writeStartDocument();
//xmlWriter->writeAttribute("name"," ");//This is only useful
//xmlWriter->writeEndDocument();
}
//.........这里部分代码省略.........
示例5: saveOcProfiles
void radeon_profile::saveOcProfiles(QXmlStreamWriter &xml) {
xml.writeStartElement("OcProfiles");
for (QString k : ocProfiles.keys()) {
xml.writeStartElement("ocProfile");
xml.writeAttribute("name", k);
auto oct = ocProfiles.value(k);
xml.writeAttribute("powerCap", QString::number(oct.powerCap));
for (auto tk : oct.tables.keys()) {
const FVTable &fvt = oct.tables.value(tk);
xml.writeStartElement("table");
xml.writeAttribute("tableName", tk);
for (auto fvtk : fvt.keys()) {
const FreqVoltPair &fvp = fvt.value(fvtk);
xml.writeStartElement("state");
xml.writeAttribute("enabled", QString::number(true));
xml.writeAttribute("stateNumber", QString::number(fvtk));
xml.writeAttribute("frequency", QString::number(fvp.frequency));
xml.writeAttribute("voltage", QString::number(fvp.voltage));
xml.writeEndElement();
}
xml.writeEndElement();
}
xml.writeEndElement();
}
xml.writeEndElement();
}
示例6: writeXml
void Distance::writeXml(QXmlStreamWriter& writer) const {
writer.writeStartElement("distance");
writer.writeTextElement("dist", QString::number(dist));
writer.writeTextElement("unit", unitToQString(unit));
writer.writeEndElement();
}
示例7:
/** Writes <tagName>Base64_encoded_value</tagName> to the XML stream. */
void PwStreamUtilsV4::writeBase64(QXmlStreamWriter& xml, const QString& tagName, const QByteArray& value) {
xml.writeTextElement(tagName, value.toBase64());
}
示例8: _writeRelations
void OsmWriter::_writeRelations(shared_ptr<const OsmMap> map, QXmlStreamWriter& writer)
{
RelationMap::const_iterator it = map->getRelationMap().begin();
while (it != map->getRelationMap().end())
{
const shared_ptr<Relation>& r = it->second;
writer.writeStartElement("relation");
writer.writeAttribute("visible", "true");
writer.writeAttribute("id", QString::number(r->getId()));
_writeMetadata(writer, r.get());
const vector<RelationData::Entry>& members = r->getMembers();
for (size_t j = 0; j < members.size(); j++)
{
const RelationData::Entry& e = members[j];
writer.writeStartElement("member");
writer.writeAttribute("type", _typeName(e.getElementId().getType()));
writer.writeAttribute("ref", QString::number(e.getElementId().getId()));
writer.writeAttribute("role", _e(e.role));
writer.writeEndElement();
}
const Tags& tags = r->getTags();
for (Tags::const_iterator tit = tags.constBegin(); tit != tags.constEnd(); ++tit)
{
if (tit.key().isEmpty() == false && tit.value().isEmpty() == false)
{
writer.writeStartElement("tag");
writer.writeAttribute("k", _e(tit.key()));
writer.writeAttribute("v", _e(tit.value()));
writer.writeEndElement();
}
}
if (r->getType() != "")
{
writer.writeStartElement("tag");
writer.writeAttribute("k", "type");
writer.writeAttribute("v", _e(r->getType()));
writer.writeEndElement();
}
if (r->getCircularError() >= 0)
{
writer.writeStartElement("tag");
writer.writeAttribute("k", "error:circular");
writer.writeAttribute("v", QString("%1").arg(r->getCircularError()));
writer.writeEndElement();
}
if (_includeDebug || _includeIds)
{
writer.writeStartElement("tag");
writer.writeAttribute("k", "hoot:id");
writer.writeAttribute("v", QString("%1").arg(r->getId()));
writer.writeEndElement();
}
if (_includeDebug)
{
writer.writeStartElement("tag");
writer.writeAttribute("k", "hoot:status");
writer.writeAttribute("v", QString("%1").arg(r->getStatus().getEnum()));
writer.writeEndElement();
}
writer.writeEndElement();
++it;
}
}
示例9: _writeWays
void OsmWriter::_writeWays(shared_ptr<const OsmMap> map, QXmlStreamWriter& writer)
{
WayMap::const_iterator it = map->getWays().begin();
while (it != map->getWays().end())
{
const Way* w = it->second.get();
writer.writeStartElement("way");
writer.writeAttribute("visible", "true");
writer.writeAttribute("id", QString::number(w->getId()));
_writeMetadata(writer, w);
for (size_t j = 0; j < w->getNodeCount(); j++)
{
writer.writeStartElement("nd");
long nid = w->getNodeId(j);
writer.writeAttribute("ref", QString::number(w->getNodeId(j)));
if (_includePointInWays)
{
shared_ptr<const Node> n = map->getNode(nid);
writer.writeAttribute("x", QString::number(n->getX(), 'g', _precision));
writer.writeAttribute("y", QString::number(n->getY(), 'g', _precision));
}
writer.writeEndElement();
}
const Tags& tags = w->getTags();
for (Tags::const_iterator tit = tags.constBegin(); tit != tags.constEnd(); ++tit)
{
if (tit.key().isEmpty() == false && tit.value().isEmpty() == false)
{
writer.writeStartElement("tag");
writer.writeAttribute("k", _e(tit.key()));
writer.writeAttribute("v", _e(tit.value()));
writer.writeEndElement();
}
}
if (w->getCircularError() >= 0)
{
writer.writeStartElement("tag");
writer.writeAttribute("k", "error:circular");
writer.writeAttribute("v", QString("%1").arg(w->getCircularError()));
writer.writeEndElement();
}
if (_includeDebug || _includeIds)
{
writer.writeStartElement("tag");
writer.writeAttribute("k", "hoot:id");
writer.writeAttribute("v", QString("%1").arg(w->getId()));
writer.writeEndElement();
}
if (_includeDebug)
{
writer.writeStartElement("tag");
writer.writeAttribute("k", "hoot:status");
writer.writeAttribute("v", QString("%1").arg(w->getStatus().getEnum()));
writer.writeEndElement();
}
writer.writeEndElement();
++it;
}
}
示例10: _writeNodes
void OsmWriter::_writeNodes(shared_ptr<const OsmMap> map, QXmlStreamWriter& writer)
{
QList<long> nids;
NodeMap::const_iterator it = map->getNodeMap().begin();
while (it != map->getNodeMap().end()) {
nids.append(it->first);
++it;
}
// sort the values to give consistent results.
qSort(nids.begin(), nids.end(), qGreater<long>());
for (int i = 0; i < nids.size(); i++)
{
const Node* n = map->getNode(nids[i]).get();
writer.writeStartElement("node");
writer.writeAttribute("visible", "true");
writer.writeAttribute("id", QString::number(n->getId()));
_writeMetadata(writer, n);
writer.writeAttribute("lat", QString::number(n->getY(), 'f', _precision));
writer.writeAttribute("lon", QString::number(n->getX(), 'f', _precision));
const Tags& tags = n->getTags();
for (Tags::const_iterator it = tags.constBegin(); it != tags.constEnd(); it++)
{
if (it.key().isEmpty() == false && it.value().isEmpty() == false)
{
writer.writeStartElement("tag");
writer.writeAttribute("k", _e(it.key()));
writer.writeAttribute("v", _e(it.value()));
writer.writeEndElement();
}
}
// turn this on when we start using node circularError.
if (n->getCircularError() >= 0 && n->getTags().getNonDebugCount() > 0)
{
writer.writeStartElement("tag");
writer.writeAttribute("k", "error:circular");
writer.writeAttribute("v", QString("%1").arg(n->getCircularError()));
writer.writeEndElement();
}
if (_includeDebug || _includeIds)
{
writer.writeStartElement("tag");
writer.writeAttribute("k", "hoot:id");
writer.writeAttribute("v", QString("%1").arg(n->getId()));
writer.writeEndElement();
}
if (_includeDebug)
{
writer.writeStartElement("tag");
writer.writeAttribute("k", "hoot:status");
writer.writeAttribute("v", QString("%1").arg(n->getStatus().getEnum()));
writer.writeEndElement();
}
writer.writeEndElement();
}
}
示例11: writeRichStringPart_rPr
void SharedStrings::writeRichStringPart_rPr(QXmlStreamWriter &writer, const Format &format) const
{
if (!format.hasFontData())
return;
if (format.fontBold())
writer.writeEmptyElement(QStringLiteral("b"));
if (format.fontItalic())
writer.writeEmptyElement(QStringLiteral("i"));
if (format.fontStrikeOut())
writer.writeEmptyElement(QStringLiteral("strike"));
if (format.fontOutline())
writer.writeEmptyElement(QStringLiteral("outline"));
if (format.boolProperty(FormatPrivate::P_Font_Shadow))
writer.writeEmptyElement(QStringLiteral("shadow"));
if (format.hasProperty(FormatPrivate::P_Font_Underline)) {
Format::FontUnderline u = format.fontUnderline();
if (u != Format::FontUnderlineNone) {
writer.writeEmptyElement(QStringLiteral("u"));
if (u== Format::FontUnderlineDouble)
writer.writeAttribute(QStringLiteral("val"), QStringLiteral("double"));
else if (u == Format::FontUnderlineSingleAccounting)
writer.writeAttribute(QStringLiteral("val"), QStringLiteral("singleAccounting"));
else if (u == Format::FontUnderlineDoubleAccounting)
writer.writeAttribute(QStringLiteral("val"), QStringLiteral("doubleAccounting"));
}
}
if (format.hasProperty(FormatPrivate::P_Font_Script)) {
Format::FontScript s = format.fontScript();
if (s != Format::FontScriptNormal) {
writer.writeEmptyElement(QStringLiteral("vertAlign"));
if (s == Format::FontScriptSuper)
writer.writeAttribute(QStringLiteral("val"), QStringLiteral("superscript"));
else
writer.writeAttribute(QStringLiteral("val"), QStringLiteral("subscript"));
}
}
if (format.hasProperty(FormatPrivate::P_Font_Size)) {
writer.writeEmptyElement(QStringLiteral("sz"));
writer.writeAttribute(QStringLiteral("val"), QString::number(format.fontSize()));
}
if (format.hasProperty(FormatPrivate::P_Font_Color)) {
XlsxColor color = format.property(FormatPrivate::P_Font_Color).value<XlsxColor>();
color.saveToXml(writer);
}
if (!format.fontName().isEmpty()) {
writer.writeEmptyElement(QStringLiteral("rFont"));
writer.writeAttribute(QStringLiteral("val"), format.fontName());
}
if (format.hasProperty(FormatPrivate::P_Font_Family)) {
writer.writeEmptyElement(QStringLiteral("family"));
writer.writeAttribute(QStringLiteral("val"), QString::number(format.intProperty(FormatPrivate::P_Font_Family)));
}
if (format.hasProperty(FormatPrivate::P_Font_Scheme)) {
writer.writeEmptyElement(QStringLiteral("scheme"));
writer.writeAttribute(QStringLiteral("val"), format.stringProperty(FormatPrivate::P_Font_Scheme));
}
}
示例12: sauvegarde
void Film::sauvegarde(QXmlStreamWriter & stream)
{
qDebug()<<"Sauvegade de "<<nom();
stream.writeStartElement("media");
stream.writeTextElement("nom", nom());
stream.writeTextElement("genre", genre());
stream.writeTextElement("date", date().toString("d/M/yyyy"));
stream.writeTextElement("vue", QString::number(isFini()));
stream.writeTextElement("url", url().toString());
stream.writeTextElement("type", getType());
stream.writeTextElement("realisateur", getRealisateur());
stream.writeTextElement("scenariste", getScenariste());
stream.writeTextElement("support", QString::number(getSupport()));
stream.writeTextElement("duree", getDuree().toString());
foreach(QString jupiter, getActeursPrincipaux())
{
stream.writeTextElement("acteur", jupiter);
}
示例13: file
void
SoundSettings::saveXML (
const QString &xmlFileName,
const QString &origFileName,
const QString ©FileName,
const QString &title)
{
QXmlStreamWriter *writer;
QFile file (xmlFileName);
SYS_DEBUG ("-----------------------------------------------------");
SYS_DEBUG ("*** xmlFileName = %s", SYS_STR(xmlFileName));
if (!file.open(QIODevice::WriteOnly)) {
SYS_WARNING ("Unable to open file for writing: %s",
SYS_STR(xmlFileName));
return;
}
/*
*
*/
writer = new QXmlStreamWriter();
writer->setDevice (&file);
writer->setAutoFormatting(true);
writer->setCodec ("UTF-8");
writer->writeStartDocument ();
writer->writeStartElement ("soundsettings-applet");
writer->writeStartElement("orig-file");
writer->writeCharacters (origFileName);
writer->writeEndElement ();
writer->writeStartElement("copy-file");
writer->writeCharacters (copyFileName);
writer->writeEndElement ();
writer->writeStartElement("title");
writer->writeCharacters (title);
writer->writeEndElement ();
/*
*
*/
writer->writeEndElement();
writer->writeEndDocument();
delete writer;
file.close ();
}
示例14: dumpQVCT
void CVesselContainer::dumpQVCT( QXmlStreamWriter & _rqXmlStreamWriter, bool bOnlySelected ) const
{
// Data
_rqXmlStreamWriter.writeStartElement( "Flotilla" );
// ... name
if( !qsName.isEmpty() ) _rqXmlStreamWriter.writeAttribute( "name", qsName );
// ... visibility
_rqXmlStreamWriter.writeAttribute( "visibility", QString::number( COverlayVisibility::getVisibility() ) );
// ... type
if( !qsType.isEmpty() ) _rqXmlStreamWriter.writeAttribute( "type", qsType );
// ... url
if( !qsUrl.isEmpty() ) _rqXmlStreamWriter.writeAttribute( "url", qsUrl );
// ... description
if( !qsDescription.isEmpty() )
{
_rqXmlStreamWriter.writeStartElement( "Description" );
_rqXmlStreamWriter.writeCDATA( qsDescription );
_rqXmlStreamWriter.writeEndElement(); // Description
}
// ... comment
if( !qsComment.isEmpty() )
{
_rqXmlStreamWriter.writeStartElement( "Comment" );
_rqXmlStreamWriter.writeCDATA( qsComment );
_rqXmlStreamWriter.writeEndElement(); // Comment
}
// ... points
if( !bDynamic )
{
int __iCount = QTreeWidgetItem::childCount();
for( int __i = 0; __i < __iCount; __i++ )
{
CVesselPoint* __poVesselPoint = (CVesselPoint*)QTreeWidgetItem::child( __i );
if( bOnlySelected && !__poVesselPoint->isMultiSelected() ) continue;
__poVesselPoint->dumpQVCT( _rqXmlStreamWriter );
}
}
else
{
CVesselContainerDevice* __poVesselContainerDevice = (CVesselContainerDevice*)QTreeWidgetItem::child( 0 );
__poVesselContainerDevice->dumpQVCT( _rqXmlStreamWriter );
}
// ... [end]
_rqXmlStreamWriter.writeEndElement(); // Flotilla
}
示例15: toGPX
bool TrackNode::toGPX(QXmlStreamWriter& stream, QProgressDialog * progress, QString element, bool forExport)
{
bool OK = true;
if (isVirtual())
return OK;
if (!tagValue("_waypoint_","").isEmpty() ||!sizeParents())
stream.writeStartElement("wpt");
else
stream.writeStartElement(element);
if (!forExport)
stream.writeAttribute("xml:id", xmlId());
stream.writeAttribute("lon",COORD2STRING(BBox.topRight().x()));
stream.writeAttribute("lat", COORD2STRING(BBox.topRight().y()));
stream.writeTextElement("time", time().toString(Qt::ISODate)+"Z");
QString s = tagValue("name","");
if (!s.isEmpty()) {
stream.writeTextElement("name", s);
}
if (elevation()) {
stream.writeTextElement("ele", QString::number(elevation(),'f',6));
}
if (speed()) {
stream.writeTextElement("speed", QString::number(speed(),'f',6));
}
s = tagValue("_comment_","");
if (!s.isEmpty()) {
stream.writeTextElement("cmt", s);
}
s = tagValue("_description_","");
if (!s.isEmpty()) {
stream.writeTextElement("desc", s);
}
// OpenStreetBug
s = tagValue("_special_","");
if (!s.isEmpty() && id().type & IFeature::Special) {
stream.writeStartElement("extensions");
QString sid = stripToOSMId(id());
stream.writeTextElement("id", sid);
stream.writeEndElement();
}
stream.writeEndElement();
if (progress)
progress->setValue(progress->value()+1);
return OK;
}