1 #include "location_p.h"
3 #include <QXmlStreamReader>
7 LocationPrivate::LocationPrivate( QString x, QString y ) :
14 LocationPrivate::LocationPrivate() :
21 void LocationPrivate::parseReply( const QByteArray &reply )
23 QXmlStreamReader xml( reply );
25 while ( !xml.atEnd() ) {
27 if ( xml.isStartElement() && xml.name() == "LOC" ) {
28 QXmlStreamAttributes attributes( xml.attributes() );
29 QStringRef xAttribute( attributes.value("x") );
30 QStringRef yAttribute( attributes.value("y") );
31 QString newX( xAttribute.toString() );
32 QString newY( yAttribute.toString() );
39 if ( xml.hasError() ) {
40 qDebug() << "xml error";
46 void LocationPrivate::setX( QString x )
51 QString LocationPrivate::x() const
56 void LocationPrivate::setY( QString y )
61 QString LocationPrivate::y() const
66 void LocationPrivate::setValid( bool valid )
71 bool LocationPrivate::isValid() const