2 Situare - A location system for Facebook
3 Copyright (C) 2010 Ixonos Plc. Authors:
5 Kaj Wallin - kaj.wallin@ixonos.com
6 Henri Lampela - henri.lampela@ixonos.com
7 Jussi Laitinen - jussi.laitinen@ixonos.com
8 Sami Rämö - sami.ramo@ixonos.com
10 Situare is free software; you can redistribute it and/or
11 modify it under the terms of the GNU General Public License
12 version 2 as published by the Free Software Foundation.
14 Situare is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with Situare; if not, write to the Free Software
21 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
25 #include <QMessageBox>
26 #include <QNetworkReply>
29 #include "application.h"
32 #include "facebookservice/facebookauthentication.h"
33 #include "gps/gpsposition.h"
34 #include "map/mapengine.h"
35 #include "routing/routingservice.h"
36 #include "situareservice/situareservice.h"
37 #include "ui/mainwindow.h"
38 #include "network/networkaccessmanager.h"
44 const QString SETTINGS_GPS_ENABLED = "GPS_ENABLED"; ///< GPS setting
45 const QString SETTINGS_AUTO_CENTERING_ENABLED = "AUTO_CENTERING_ENABLED";///< Auto centering setting
46 const int DEFAULT_ZOOM_LEVEL_WHEN_GPS_IS_AVAILABLE = 12; ///< Default zoom level when GPS available
47 const qreal USER_MOVEMENT_MINIMUM_LONGITUDE_DIFFERENCE = 0.003;///< Min value for user move latitude
48 const qreal USER_MOVEMENT_MINIMUM_LATITUDE_DIFFERENCE = 0.001;///< Min value for user move longitude
49 const int MIN_UPDATE_INTERVAL_MSECS = 5*60*1000;
51 SituareEngine::SituareEngine()
52 : m_autoCenteringEnabled(false),
53 m_automaticUpdateFirstStart(true),
54 m_automaticUpdateRequest(false),
56 m_automaticUpdateIntervalTimer(0),
57 m_lastUpdatedGPSPosition(QPointF())
59 qDebug() << __PRETTY_FUNCTION__;
61 m_ui = new MainWindow;
62 m_ui->updateItemVisibility();
65 m_app = static_cast<Application *>(qApp);
66 m_app->registerWindow(m_ui->winId());
68 connect(m_app, SIGNAL(topmostChanged(bool)),
69 this, SLOT(enablePowerSave(bool)));
72 m_networkAccessManager = NetworkAccessManager::instance();
75 m_mapEngine = new MapEngine(this);
76 m_ui->setMapViewScene(m_mapEngine->scene());
79 m_gps = new GPSPosition(this);
81 // build SituareService
82 m_situareService = new SituareService(this);
84 // build FacebookAuthenticator
85 m_facebookAuthenticator = new FacebookAuthentication(this);
87 // build routing service
88 m_routingService = new RoutingService(this); // create this when needed, not in constructor!
91 signalsFromMapEngine();
93 signalsFromSituareService();
94 signalsFromMainWindow();
95 signalsFromFacebookAuthenticator();
97 connect(this, SIGNAL(userLocationReady(User*)),
98 m_ui, SIGNAL(userLocationReady(User*)));
100 connect(this, SIGNAL(friendsLocationsReady(QList<User*>&)),
101 m_ui, SIGNAL(friendsLocationsReady(QList<User*>&)));
103 connect(this, SIGNAL(userLocationReady(User*)),
104 m_mapEngine, SLOT(receiveOwnLocation(User*)));
106 connect(this, SIGNAL(friendsLocationsReady(QList<User*>&)),
107 m_mapEngine, SIGNAL(friendsLocationsReady(QList<User*>&)));
109 connect(this, SIGNAL(friendImageReady(User*)),
110 m_ui, SIGNAL(friendImageReady(User*)));
112 connect(this, SIGNAL(friendImageReady(User*)),
113 m_mapEngine, SIGNAL(friendImageReady(User*)));
115 m_automaticUpdateIntervalTimer = new QTimer(this);
116 connect(m_automaticUpdateIntervalTimer, SIGNAL(timeout()),
117 this, SLOT(startAutomaticUpdate()));
119 // signals connected, now it's time to show the main window
120 // but init the MapEngine before so starting location is set
124 m_facebookAuthenticator->start();
126 m_gps->setMode(GPSPosition::Default);
127 initializeGpsAndAutocentering();
129 m_mce = new MCE(this);
130 connect(m_mce, SIGNAL(displayOff(bool)), this, SLOT(enablePowerSave(bool)));
133 SituareEngine::~SituareEngine()
135 qDebug() << __PRETTY_FUNCTION__;
139 QSettings settings(DIRECTORY_NAME, FILE_NAME);
140 settings.setValue(SETTINGS_GPS_ENABLED, m_gps->isRunning());
141 settings.setValue(SETTINGS_AUTO_CENTERING_ENABLED, m_autoCenteringEnabled);
144 void SituareEngine::changeAutoCenteringSetting(bool enabled)
146 qDebug() << __PRETTY_FUNCTION__;
148 m_autoCenteringEnabled = enabled;
149 enableAutoCentering(enabled);
152 void SituareEngine::disableAutoCentering()
154 qDebug() << __PRETTY_FUNCTION__;
156 changeAutoCenteringSetting(false);
157 m_ui->buildInformationBox(tr("Auto centering disabled"));
160 void SituareEngine::enableAutoCentering(bool enabled)
162 qDebug() << __PRETTY_FUNCTION__;
164 m_ui->setAutoCenteringButtonEnabled(enabled);
165 m_mapEngine->setAutoCentering(enabled);
168 m_gps->requestLastPosition();
171 void SituareEngine::enableGPS(bool enabled)
173 qDebug() << __PRETTY_FUNCTION__;
175 m_ui->setOwnLocationCrosshairVisibility(!enabled);
177 if (m_gps->isInitialized()) {
178 m_ui->setGPSButtonEnabled(enabled);
179 m_mapEngine->setGPSEnabled(enabled);
181 if (enabled && !m_gps->isRunning()) {
183 enableAutoCentering(m_autoCenteringEnabled);
184 m_gps->requestLastPosition();
186 if(m_ui->loginState())
187 m_ui->readAutomaticLocationUpdateSettings();
189 else if (!enabled && m_gps->isRunning()) {
191 enableAutoCentering(false);
192 enableAutomaticLocationUpdate(false);
197 m_ui->buildInformationBox(tr("Unable to start GPS"));
198 m_ui->setGPSButtonEnabled(false);
199 m_mapEngine->setGPSEnabled(false);
203 void SituareEngine::enableAutomaticLocationUpdate(bool enabled, int updateIntervalMsecs)
205 qDebug() << __PRETTY_FUNCTION__;
207 //Show automatic update confirmation dialog
208 if (m_automaticUpdateFirstStart && m_gps->isRunning() && enabled) {
209 m_ui->showEnableAutomaticUpdateLocationDialog(
210 tr("Do you want to enable automatic location update with %1 min update interval?")
211 .arg(updateIntervalMsecs/1000/60));
212 m_automaticUpdateFirstStart = false;
214 if (enabled && m_gps->isRunning()) {
215 m_ui->buildInformationBox(tr("Automatic location update enabled"));
216 if (updateIntervalMsecs < MIN_UPDATE_INTERVAL_MSECS)
217 m_automaticUpdateIntervalTimer->setInterval(MIN_UPDATE_INTERVAL_MSECS);
219 m_automaticUpdateIntervalTimer->setInterval(updateIntervalMsecs);
221 connect(m_gps, SIGNAL(position(QPointF,qreal)),
222 this, SLOT(requestAutomaticUpdateIfMoved(QPointF)));
224 m_automaticUpdateIntervalTimer->start();
227 disconnect(m_gps, SIGNAL(position(QPointF,qreal)),
228 this, SLOT(requestAutomaticUpdateIfMoved(QPointF)));
230 m_automaticUpdateIntervalTimer->stop();
235 void SituareEngine::enablePowerSave(bool enabled)
237 qDebug() << __PRETTY_FUNCTION__;
239 m_gps->enablePowerSave(enabled);
241 if(m_autoCenteringEnabled)
242 m_mapEngine->setAutoCentering(!enabled);
245 void SituareEngine::error(const int context, const int error)
247 qDebug() << __PRETTY_FUNCTION__;
251 case SituareError::ERROR_GENERAL:
252 if(context == ErrorContext::SITUARE) {
253 m_ui->toggleProgressIndicator(false);
254 m_ui->buildInformationBox(tr("Unknown server error"), true);
257 case 1: //errors: SituareError::ERROR_MISSING_ARGUMENT and QNetworkReply::ConnectionRefusedError
258 m_ui->toggleProgressIndicator(false);
259 if(context == ErrorContext::SITUARE) {
260 m_ui->buildInformationBox(tr("Missing parameter from request"), true);
261 } else if(context == ErrorContext::NETWORK) {
262 m_ui->buildInformationBox(tr("Connection refused by the server"), true);
265 case QNetworkReply::RemoteHostClosedError:
266 if(context == ErrorContext::NETWORK) {
267 m_ui->toggleProgressIndicator(false);
268 m_ui->buildInformationBox(tr("Connection closed by the server"), true);
271 case QNetworkReply::HostNotFoundError:
272 if(context == ErrorContext::NETWORK) {
273 m_ui->toggleProgressIndicator(false);
274 m_ui->buildInformationBox(tr("Remote server not found"), true);
277 case QNetworkReply::TimeoutError:
278 if(context == ErrorContext::NETWORK) {
279 m_ui->toggleProgressIndicator(false);
280 m_ui->buildInformationBox(tr("Connection timed out"), true);
283 case QNetworkReply::UnknownNetworkError:
284 if(context == ErrorContext::NETWORK) {
285 m_ui->toggleProgressIndicator(false);
286 m_ui->buildInformationBox(tr("No network connection"), true);
289 case SituareError::SESSION_EXPIRED:
290 m_ui->buildInformationBox(tr("Session expired. Please login again"), true);
291 m_facebookAuthenticator->clearAccountInformation(true); // keep username = true
292 m_situareService->clearUserData();
293 m_ui->loggedIn(false);
296 case SituareError::LOGIN_FAILED:
297 m_ui->toggleProgressIndicator(false);
298 m_ui->buildInformationBox(tr("Invalid E-mail address or password"), true);
301 case SituareError::UPDATE_FAILED:
302 m_ui->toggleProgressIndicator(false);
303 m_ui->buildInformationBox(tr("Update failed, please try again"), true);
305 case SituareError::DATA_RETRIEVAL_FAILED:
306 m_ui->toggleProgressIndicator(false);
307 m_ui->buildInformationBox(tr("Data retrieval failed, please try again"), true);
309 case SituareError::ADDRESS_RETRIEVAL_FAILED:
310 case SituareError::ERROR_GEOLOCATION_REQUEST_FAIL:
311 case SituareError::ERROR_GEOLOCATION_LONLAT_INVALID:
312 m_ui->toggleProgressIndicator(false);
313 m_ui->buildInformationBox(tr("Address retrieval failed"), true);
315 case SituareError::IMAGE_DOWNLOAD_FAILED:
316 m_ui->buildInformationBox(tr("Image download failed"), true);
318 case SituareError::MAP_IMAGE_DOWNLOAD_FAILED:
319 m_ui->buildInformationBox(tr("Map image download failed"), true);
321 case SituareError::GPS_INITIALIZATION_FAILED:
323 m_ui->buildInformationBox(tr("GPS initialization failed"), true);
325 case SituareError::INVALID_JSON:
326 m_ui->buildInformationBox(tr("Malformatted reply from server"), true);
327 m_ui->loggedIn(false);
328 m_facebookAuthenticator->clearAccountInformation(false); // clean all
330 case SituareError::ERROR_GEOLOCATION_SERVER_UNAVAILABLE:
331 m_ui->toggleProgressIndicator(false);
332 m_ui->buildInformationBox(tr("Address server not responding"), true);
335 m_ui->toggleProgressIndicator(false);
336 if(context == ErrorContext::NETWORK)
337 qCritical() << "QNetworkReply::NetworkError: " << error;
339 qCritical() << "Unknown error: " << error;
345 void SituareEngine::fetchUsernameFromSettings()
347 qDebug() << __PRETTY_FUNCTION__;
349 m_ui->setUsername(m_facebookAuthenticator->loadUsername());
352 void SituareEngine::imageReady(User *user)
354 qDebug() << __PRETTY_FUNCTION__;
357 emit userLocationReady(user);
359 emit friendImageReady(user);
362 void SituareEngine::initializeGpsAndAutocentering()
364 qDebug() << __PRETTY_FUNCTION__;
366 QSettings settings(DIRECTORY_NAME, FILE_NAME);
367 QVariant gpsEnabled = settings.value(SETTINGS_GPS_ENABLED);
368 QVariant autoCenteringEnabled = settings.value(SETTINGS_AUTO_CENTERING_ENABLED);
370 if (m_gps->isInitialized()) {
372 if (gpsEnabled.toString().isEmpty()) { // First start. Situare.conf file does not exists
374 connect(m_gps, SIGNAL(position(QPointF,qreal)),
375 this, SLOT(setFirstStartZoomLevel(QPointF,qreal)));
377 changeAutoCenteringSetting(true);
380 m_ui->buildInformationBox(tr("GPS enabled"));
381 m_ui->buildInformationBox(tr("Auto centering enabled"));
383 } else { // Normal start
384 changeAutoCenteringSetting(autoCenteringEnabled.toBool());
385 enableGPS(gpsEnabled.toBool());
387 if (gpsEnabled.toBool())
388 m_ui->buildInformationBox(tr("GPS enabled"));
390 if (gpsEnabled.toBool() && autoCenteringEnabled.toBool())
391 m_ui->buildInformationBox(tr("Auto centering enabled"));
398 void SituareEngine::loginActionPressed()
400 qDebug() << __PRETTY_FUNCTION__;
402 if (m_networkAccessManager->isConnected()) {
403 if(m_ui->loginState()) {
405 m_situareService->clearUserData();
407 m_facebookAuthenticator->start();
411 error(ErrorContext::NETWORK, QNetworkReply::UnknownNetworkError);
415 void SituareEngine::loginOk()
417 qDebug() << __PRETTY_FUNCTION__;
419 m_ui->loggedIn(true);
422 m_situareService->fetchLocations(); // request user locations
424 if (m_gps->isRunning())
425 m_ui->readAutomaticLocationUpdateSettings();
428 void SituareEngine::loginProcessCancelled()
430 qDebug() << __PRETTY_FUNCTION__;
432 m_ui->toggleProgressIndicator(false);
433 m_ui->updateItemVisibility();
436 void SituareEngine::logout()
438 qDebug() << __PRETTY_FUNCTION__;
440 m_ui->loggedIn(false);
442 // signal to clear locationUpdateDialog's data
443 connect(this, SIGNAL(clearUpdateLocationDialogData()),
444 m_ui, SIGNAL(clearUpdateLocationDialogData()));
445 emit clearUpdateLocationDialogData();
447 m_facebookAuthenticator->clearAccountInformation(); // clear all
448 m_automaticUpdateFirstStart = true;
451 void SituareEngine::refreshUserData()
453 qDebug() << __PRETTY_FUNCTION__;
455 if (m_networkAccessManager->isConnected()) {
456 m_ui->toggleProgressIndicator(true);
457 m_situareService->fetchLocations();
460 error(ErrorContext::NETWORK, QNetworkReply::UnknownNetworkError);
464 void SituareEngine::requestAddress()
466 qDebug() << __PRETTY_FUNCTION__;
468 if (m_networkAccessManager->isConnected()) {
469 if (m_gps->isRunning())
470 m_situareService->reverseGeo(m_gps->lastPosition());
472 m_situareService->reverseGeo(m_mapEngine->centerGeoCoordinate());
475 error(ErrorContext::NETWORK, QNetworkReply::UnknownNetworkError);
479 void SituareEngine::requestUpdateLocation(const QString &status, bool publish)
481 qDebug() << __PRETTY_FUNCTION__;
483 if (m_networkAccessManager->isConnected()) {
484 m_ui->toggleProgressIndicator(true);
486 if (m_gps->isRunning())
487 m_situareService->updateLocation(m_gps->lastPosition(), status, publish);
489 m_situareService->updateLocation(m_mapEngine->centerGeoCoordinate(), status, publish);
492 error(ErrorContext::NETWORK, QNetworkReply::UnknownNetworkError);
496 void SituareEngine::requestAutomaticUpdateIfMoved(QPointF position)
498 qDebug() << __PRETTY_FUNCTION__;
500 if ((fabs(m_lastUpdatedGPSPosition.x() - position.x()) >
501 USER_MOVEMENT_MINIMUM_LONGITUDE_DIFFERENCE) ||
502 (fabs(m_lastUpdatedGPSPosition.y() - position.y()) >
503 USER_MOVEMENT_MINIMUM_LATITUDE_DIFFERENCE)) {
505 m_lastUpdatedGPSPosition = position;
509 if (m_automaticUpdateRequest && m_userMoved) {
510 requestUpdateLocation(tr("Automatic location update"));
511 m_automaticUpdateRequest = false;
516 void SituareEngine::setFirstStartZoomLevel(QPointF latLonCoordinate, qreal accuracy)
518 qDebug() << __PRETTY_FUNCTION__;
520 Q_UNUSED(latLonCoordinate);
523 if (m_autoCenteringEnabled) // autocentering is disabled when map is scrolled
524 m_mapEngine->setZoomLevel(DEFAULT_ZOOM_LEVEL_WHEN_GPS_IS_AVAILABLE);
526 disconnect(m_gps, SIGNAL(position(QPointF,qreal)),
527 this, SLOT(setFirstStartZoomLevel(QPointF,qreal)));
530 void SituareEngine::signalsFromFacebookAuthenticator()
532 qDebug() << __PRETTY_FUNCTION__;
534 connect(m_facebookAuthenticator, SIGNAL(error(int, int)),
535 this, SLOT(error(int, int)));
537 connect(m_facebookAuthenticator, SIGNAL(credentialsReady(FacebookCredentials)),
538 m_situareService, SLOT(credentialsReady(FacebookCredentials)));
540 connect(m_facebookAuthenticator, SIGNAL(credentialsReady(FacebookCredentials)),
541 this, SLOT(loginOk()));
543 connect(m_facebookAuthenticator, SIGNAL(newLoginRequest()),
544 m_ui, SLOT(startLoginProcess()));
546 connect(m_facebookAuthenticator, SIGNAL(saveCookiesRequest()),
547 m_ui, SLOT(saveCookies()));
549 connect(m_facebookAuthenticator, SIGNAL(loginUsingCookies()),
550 m_ui, SLOT(loginUsingCookies()));
553 void SituareEngine::signalsFromGPS()
555 qDebug() << __PRETTY_FUNCTION__;
557 connect(m_gps, SIGNAL(position(QPointF,qreal)),
558 m_mapEngine, SLOT(gpsPositionUpdate(QPointF,qreal)));
560 connect(m_gps, SIGNAL(timeout()),
561 m_ui, SLOT(gpsTimeout()));
563 connect(m_gps, SIGNAL(error(int, int)),
564 this, SLOT(error(int, int)));
567 void SituareEngine::signalsFromMainWindow()
569 qDebug() << __PRETTY_FUNCTION__;
571 connect(m_ui, SIGNAL(error(int, int)),
572 this, SLOT(error(int, int)));
574 connect(m_ui, SIGNAL(fetchUsernameFromSettings()),
575 this, SLOT(fetchUsernameFromSettings()));
577 connect(m_ui, SIGNAL(loginActionPressed()),
578 this, SLOT(loginActionPressed()));
580 connect(m_ui, SIGNAL(saveUsername(QString)),
581 m_facebookAuthenticator, SLOT(saveUsername(QString)));
583 connect(m_ui, SIGNAL(updateCredentials(QUrl)),
584 m_facebookAuthenticator, SLOT(updateCredentials(QUrl)));
586 // signals from map view
587 connect(m_ui, SIGNAL(mapViewScrolled(QPoint)),
588 m_mapEngine, SLOT(setCenterPosition(QPoint)));
590 connect(m_ui, SIGNAL(mapViewResized(QSize)),
591 m_mapEngine, SLOT(viewResized(QSize)));
593 connect(m_ui, SIGNAL(viewZoomFinished()),
594 m_mapEngine, SLOT(viewZoomFinished()));
596 // signals from zoom buttons (zoom panel and volume buttons)
597 connect(m_ui, SIGNAL(zoomIn()),
598 m_mapEngine, SLOT(zoomIn()));
600 connect(m_ui, SIGNAL(zoomOut()),
601 m_mapEngine, SLOT(zoomOut()));
603 // signals from menu buttons
604 connect(m_ui, SIGNAL(autoCenteringTriggered(bool)),
605 this, SLOT(changeAutoCenteringSetting(bool)));
607 connect(m_ui, SIGNAL(gpsTriggered(bool)),
608 this, SLOT(enableGPS(bool)));
610 //signals from dialogs
611 connect(m_ui, SIGNAL(cancelLoginProcess()),
612 this, SLOT(loginProcessCancelled()));
614 connect(m_ui, SIGNAL(requestReverseGeo()),
615 this, SLOT(requestAddress()));
617 connect(m_ui, SIGNAL(statusUpdate(QString,bool)),
618 this, SLOT(requestUpdateLocation(QString,bool)));
620 connect(m_ui, SIGNAL(enableAutomaticLocationUpdate(bool, int)),
621 this, SLOT(enableAutomaticLocationUpdate(bool, int)));
623 // signals from user info tab
624 connect(m_ui, SIGNAL(refreshUserData()),
625 this, SLOT(refreshUserData()));
627 connect(m_ui, SIGNAL(findUser(QPointF)),
628 m_mapEngine, SLOT(centerToCoordinates(QPointF)));
630 // signals from friend list tab
631 connect(m_ui, SIGNAL(findFriend(QPointF)),
632 m_mapEngine, SLOT(centerToCoordinates(QPointF)));
635 void SituareEngine::signalsFromMapEngine()
637 qDebug() << __PRETTY_FUNCTION__;
639 connect(m_mapEngine, SIGNAL(error(int, int)),
640 this, SLOT(error(int, int)));
642 connect(m_mapEngine, SIGNAL(locationChanged(QPoint)),
643 m_ui, SIGNAL(centerToSceneCoordinates(QPoint)));
645 connect(m_mapEngine, SIGNAL(zoomLevelChanged(int)),
646 m_ui, SIGNAL(zoomLevelChanged(int)));
648 connect(m_mapEngine, SIGNAL(mapScrolledManually()),
649 this, SLOT(disableAutoCentering()));
651 connect(m_mapEngine, SIGNAL(maxZoomLevelReached()),
652 m_ui, SIGNAL(maxZoomLevelReached()));
654 connect(m_mapEngine, SIGNAL(minZoomLevelReached()),
655 m_ui, SIGNAL(minZoomLevelReached()));
657 connect(m_mapEngine, SIGNAL(locationItemClicked(QList<QString>)),
658 m_ui, SIGNAL(locationItemClicked(QList<QString>)));
660 connect(m_mapEngine, SIGNAL(newMapResolution(qreal)),
661 m_ui, SIGNAL(newMapResolution(qreal)));
664 void SituareEngine::signalsFromSituareService()
666 qDebug() << __PRETTY_FUNCTION__;
668 connect(m_situareService, SIGNAL(error(int, int)),
669 this, SLOT(error(int, int)));
671 connect(m_situareService, SIGNAL(imageReady(User*)),
672 this, SLOT(imageReady(User*)));
674 connect(m_situareService, SIGNAL(reverseGeoReady(QString)),
675 m_ui, SIGNAL(reverseGeoReady(QString)));
677 connect(m_situareService, SIGNAL(userDataChanged(User*, QList<User*>&)),
678 this, SLOT(userDataChanged(User*, QList<User*>&)));
680 connect(m_situareService, SIGNAL(updateWasSuccessful()),
681 this, SLOT(updateWasSuccessful()));
683 connect(m_situareService, SIGNAL(updateWasSuccessful()),
684 m_ui, SIGNAL(clearUpdateLocationDialogData()));
687 void SituareEngine::startAutomaticUpdate()
689 qDebug() << __PRETTY_FUNCTION__;
691 m_gps->requestUpdate();
692 m_automaticUpdateRequest = true;
695 void SituareEngine::updateWasSuccessful()
697 qDebug() << __PRETTY_FUNCTION__;
699 if (m_networkAccessManager->isConnected())
700 m_situareService->fetchLocations();
702 error(ErrorContext::NETWORK, QNetworkReply::UnknownNetworkError);
705 void SituareEngine::userDataChanged(User *user, QList<User *> &friendsList)
707 qDebug() << __PRETTY_FUNCTION__;
709 m_ui->toggleProgressIndicator(false);
712 emit userLocationReady(user);
713 emit friendsLocationsReady(friendsList);