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*) )
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();
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() );
q( new LocationPrivate( label ) ),
manager( new QNetworkAccessManager(this) )
{
- qDebug() << "Location::Location( const QString &label=" << label << " )";
connect( manager, SIGNAL( finished(QNetworkReply*) ), this, SLOT( replyFinished(QNetworkReply*) ) );
}
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() );
void Location::resolveAddress( const QString &address )
{
- qDebug() << "resolving address";
- qDebug() << address;
+ qDebug() << "resolving address (" << address << ")";
q->setAddress( address );
q->setValid( false );