Changes: Changed the route table to a layout of buttons and tamed the layouts a bit.
[ptas] / zouba / src / location.cpp
index 90f71c4..d7761fd 100644 (file)
@@ -33,7 +33,6 @@ Location::Location( const QString &x, const QString &y, const QString &label ) :
   q( new LocationPrivate( x, y, label ) ),
   manager( new QNetworkAccessManager(this) )
 {
-  qDebug() << "Location::Location(" << x << "," << y << "," << label <<")";
   connect(
       manager, SIGNAL( finished(QNetworkReply*) ),
       this, SLOT( replyFinished(QNetworkReply*) )
@@ -44,7 +43,11 @@ Location::Location( const QGeoPositionInfo &positionInfo, const QString &label )
   q( new LocationPrivate( label ) ),
   manager(0)
 {
-  qDebug() << "Location::Location( QGeoPositionInfo, label=" << label << " )";
+  setLocation( positionInfo );
+}
+
+void Location::setLocation( const QGeoPositionInfo &positionInfo )
+{
   qreal latitude = positionInfo.coordinate().latitude();
   qreal longitude = positionInfo.coordinate().longitude();
 
@@ -63,7 +66,6 @@ Location::Location( const Location &from ) :
   q( new LocationPrivate( from.label() ) ),
   manager(0)
 {
-  qDebug() << "Location::Location( const Location [" << from.label() << "] )";
   q->setAddress( from.address() );
   q->setX( from.x() );
   q->setY( from.y() );
@@ -78,7 +80,6 @@ Location::Location( const QString &label ) :
   q( new LocationPrivate( label ) ),
   manager( new QNetworkAccessManager(this) )
 {
-  qDebug() << "Location::Location( const QString &label=" << label << " )";
   connect( manager, SIGNAL( finished(QNetworkReply*) ), this, SLOT( replyFinished(QNetworkReply*) ) );
 }
 
@@ -92,7 +93,6 @@ Location::~Location()
 
 Location &Location::operator=( const Location &from )
 {
-  qDebug() << "Location::Location( const Location &from )";
   q = new LocationPrivate( from.label() );
   q->setAddress( from.address() );
   q->setX( from.x() );
@@ -111,8 +111,7 @@ Location &Location::operator=( const Location &from )
 
 void Location::resolveAddress( const QString &address )
 {
-  qDebug() << "resolving address";
-  qDebug() << address;
+  qDebug() << "resolving address (" << address << ")";
 
   q->setAddress( address );
   q->setValid( false );