* Xml writer
*
* @author Tiina Kivilinna-Korhola
+ * @author Toni Jussila <toni.jussila@fudeco.com>
* @copyright (c) 2010 Speed Freak team
* license http://opensource.org/licenses/gpl-license.php GNU Public License
*/
#include "xmlwriter.h"
-
-
/**
*@brief Constructor, connects object to GUI
*@param Pointer to carmainwindow, which is temporarily used during development
*/
XmlWriter::XmlWriter()
{
- tmpvalue = 3010;
+
}
/**
xmlwriter.writeEndDocument();
}
-
/**
*@brief Writes Speed Freek results items as tags and contents into a buffer.
*@todo Consider looping when writing many values.
*@todo Replace test value to finally used variables.
*/
-void XmlWriter::writeResult(QBuffer *netbuf)
+void XmlWriter::writeResult(QBuffer *netbuf, double result)
{
qDebug() << "_writeResult";
xmlwriter.writeStartDocument();
xmlwriter.writeStartElement("result");
- tmpvalue++;
- qDebug() << tmpvalue;
- xmlwriter.writeAttribute("value", QString::number(tmpvalue));
+ xmlwriter.writeAttribute("value", QString::number(result));
xmlwriter.writeEndElement();
xmlwriter.writeEndDocument();
}
-
/**
*@brief Write track to server.
*@param netbuf where to write.
xmlwriter.writeEndDocument();
}
-
/**
*@brief Opens and closes a file, when xml information is written into a file,
*and passes file to writeXmlFile()
return true;
}
-
/**
*@brief Writes Speed Freek results items as tags and contents to earlier defined target.
*@todo Consider looping when writing many values.
xmlwriter.writeAttribute("date", QDateTime::currentDateTime().toString());
xmlwriter.writeEndElement();
}
-