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 "situareservice/situareservice.h"
36 #include "ui/mainwindow.h"
37 #include "network/networkaccessmanager.h"
43 const QString SETTINGS_GPS_ENABLED = "GPS_ENABLED"; ///< GPS setting
44 const QString SETTINGS_AUTO_CENTERING_ENABLED = "AUTO_CENTERING_ENABLED";///< Auto centering setting
45 const int DEFAULT_ZOOM_LEVEL_WHEN_GPS_IS_AVAILABLE = 12; ///< Default zoom level when GPS available
46 const qreal USER_MOVEMENT_MINIMUM_LONGITUDE_DIFFERENCE = 0.003;///< Min value for user move latitude
47 const qreal USER_MOVEMENT_MINIMUM_LATITUDE_DIFFERENCE = 0.001;///< Min value for user move longitude
48 const int MIN_UPDATE_INTERVAL_MSECS = 5*60*1000;
50 SituareEngine::SituareEngine()
51 : m_autoCenteringEnabled(false),
52 m_automaticUpdateFirstStart(true),
53 m_automaticUpdateRequest(false),
55 m_automaticUpdateIntervalTimer(0),
56 m_lastUpdatedGPSPosition(QPointF())
58 qDebug() << __PRETTY_FUNCTION__;
60 m_ui = new MainWindow;
61 m_ui->updateItemVisibility();
64 m_app = static_cast<Application *>(qApp);
65 m_app->registerWindow(m_ui->winId());
67 connect(m_app, SIGNAL(topmostChanged(bool)),
68 this, SLOT(enablePowerSave(bool)));
71 m_networkAccessManager = NetworkAccessManager::instance();
74 m_mapEngine = new MapEngine(this);
75 m_ui->setMapViewScene(m_mapEngine->scene());
78 m_gps = new GPSPosition(this);
80 // build SituareService
81 m_situareService = new SituareService(this);
83 // build FacebookAuthenticator
84 m_facebookAuthenticator = new FacebookAuthentication(this);
87 signalsFromMapEngine();
89 signalsFromSituareService();
90 signalsFromMainWindow();
91 signalsFromFacebookAuthenticator();
93 connect(this, SIGNAL(userLocationReady(User*)),
94 m_ui, SIGNAL(userLocationReady(User*)));
96 connect(this, SIGNAL(friendsLocationsReady(QList<User*>&)),
97 m_ui, SIGNAL(friendsLocationsReady(QList<User*>&)));
99 connect(this, SIGNAL(userLocationReady(User*)),
100 m_mapEngine, SLOT(receiveOwnLocation(User*)));
102 connect(this, SIGNAL(friendsLocationsReady(QList<User*>&)),
103 m_mapEngine, SIGNAL(friendsLocationsReady(QList<User*>&)));
105 connect(this, SIGNAL(friendImageReady(User*)),
106 m_ui, SIGNAL(friendImageReady(User*)));
108 connect(this, SIGNAL(friendImageReady(User*)),
109 m_mapEngine, SIGNAL(friendImageReady(User*)));
111 m_automaticUpdateIntervalTimer = new QTimer(this);
112 connect(m_automaticUpdateIntervalTimer, SIGNAL(timeout()),
113 this, SLOT(startAutomaticUpdate()));
115 // signals connected, now it's time to show the main window
116 // but init the MapEngine before so starting location is set
120 m_facebookAuthenticator->start();
122 m_gps->setMode(GPSPosition::Default);
123 initializeGpsAndAutocentering();
125 m_mce = new MCE(this);
126 connect(m_mce, SIGNAL(displayOff(bool)), this, SLOT(enablePowerSave(bool)));
129 SituareEngine::~SituareEngine()
131 qDebug() << __PRETTY_FUNCTION__;
135 QSettings settings(DIRECTORY_NAME, FILE_NAME);
136 settings.setValue(SETTINGS_GPS_ENABLED, m_gps->isRunning());
137 settings.setValue(SETTINGS_AUTO_CENTERING_ENABLED, m_autoCenteringEnabled);
140 void SituareEngine::changeAutoCenteringSetting(bool enabled)
142 qDebug() << __PRETTY_FUNCTION__;
144 m_autoCenteringEnabled = enabled;
145 enableAutoCentering(enabled);
148 void SituareEngine::disableAutoCentering()
150 qDebug() << __PRETTY_FUNCTION__;
152 changeAutoCenteringSetting(false);
153 m_ui->buildInformationBox(tr("Auto centering disabled"));
156 void SituareEngine::enableAutoCentering(bool enabled)
158 qDebug() << __PRETTY_FUNCTION__;
160 m_ui->setAutoCenteringButtonEnabled(enabled);
161 m_mapEngine->setAutoCentering(enabled);
164 m_gps->requestLastPosition();
167 void SituareEngine::enableGPS(bool enabled)
169 qDebug() << __PRETTY_FUNCTION__;
171 m_ui->setOwnLocationCrosshairVisibility(!enabled);
173 if (m_gps->isInitialized()) {
174 m_ui->setGPSButtonEnabled(enabled);
175 m_mapEngine->setGPSEnabled(enabled);
177 if (enabled && !m_gps->isRunning()) {
179 enableAutoCentering(m_autoCenteringEnabled);
180 m_gps->requestLastPosition();
182 if(m_ui->loginState())
183 m_ui->readAutomaticLocationUpdateSettings();
185 else if (!enabled && m_gps->isRunning()) {
187 enableAutoCentering(false);
188 enableAutomaticLocationUpdate(false);
193 m_ui->buildInformationBox(tr("Unable to start GPS"));
194 m_ui->setGPSButtonEnabled(false);
195 m_mapEngine->setGPSEnabled(false);
199 void SituareEngine::enableAutomaticLocationUpdate(bool enabled, int updateIntervalMsecs)
201 qDebug() << __PRETTY_FUNCTION__;
203 //Show automatic update confirmation dialog
204 if (m_automaticUpdateFirstStart && m_gps->isRunning() && enabled) {
205 m_ui->showEnableAutomaticUpdateLocationDialog(
206 tr("Do you want to enable automatic location update with %1 min update interval?")
207 .arg(updateIntervalMsecs/1000/60));
208 m_automaticUpdateFirstStart = false;
210 if (enabled && m_gps->isRunning()) {
211 m_ui->buildInformationBox(tr("Automatic location update enabled"));
212 if (updateIntervalMsecs < MIN_UPDATE_INTERVAL_MSECS)
213 m_automaticUpdateIntervalTimer->setInterval(MIN_UPDATE_INTERVAL_MSECS);
215 m_automaticUpdateIntervalTimer->setInterval(updateIntervalMsecs);
217 connect(m_gps, SIGNAL(position(QPointF,qreal)),
218 this, SLOT(requestAutomaticUpdateIfMoved(QPointF)));
220 m_automaticUpdateIntervalTimer->start();
223 disconnect(m_gps, SIGNAL(position(QPointF,qreal)),
224 this, SLOT(requestAutomaticUpdateIfMoved(QPointF)));
226 m_automaticUpdateIntervalTimer->stop();
231 void SituareEngine::enablePowerSave(bool enabled)
233 qDebug() << __PRETTY_FUNCTION__;
235 m_gps->enablePowerSave(enabled);
237 if(m_autoCenteringEnabled)
238 m_mapEngine->setAutoCentering(!enabled);
241 void SituareEngine::error(const int context, const int error)
243 qDebug() << __PRETTY_FUNCTION__;
247 case SituareError::ERROR_GENERAL:
248 if(context == ErrorContext::SITUARE) {
249 m_ui->toggleProgressIndicator(false);
250 m_ui->buildInformationBox(tr("Unknown server error"), true);
253 case 1: //errors: SituareError::ERROR_MISSING_ARGUMENT and QNetworkReply::ConnectionRefusedError
254 m_ui->toggleProgressIndicator(false);
255 if(context == ErrorContext::SITUARE) {
256 m_ui->buildInformationBox(tr("Missing parameter from request"), true);
257 } else if(context == ErrorContext::NETWORK) {
258 m_ui->buildInformationBox(tr("Connection refused by the server"), true);
261 case QNetworkReply::RemoteHostClosedError:
262 if(context == ErrorContext::NETWORK) {
263 m_ui->toggleProgressIndicator(false);
264 m_ui->buildInformationBox(tr("Connection closed by the server"), true);
267 case QNetworkReply::HostNotFoundError:
268 if(context == ErrorContext::NETWORK) {
269 m_ui->toggleProgressIndicator(false);
270 m_ui->buildInformationBox(tr("Remote server not found"), true);
273 case QNetworkReply::TimeoutError:
274 if(context == ErrorContext::NETWORK) {
275 m_ui->toggleProgressIndicator(false);
276 m_ui->buildInformationBox(tr("Connection timed out"), true);
279 case QNetworkReply::UnknownNetworkError:
280 if(context == ErrorContext::NETWORK) {
281 m_ui->toggleProgressIndicator(false);
282 m_ui->buildInformationBox(tr("No network connection"), true);
285 case SituareError::SESSION_EXPIRED:
286 m_ui->buildInformationBox(tr("Session expired. Please login again"), true);
287 m_facebookAuthenticator->clearAccountInformation(true); // keep username = true
288 m_situareService->clearUserData();
289 m_ui->loggedIn(false);
292 case SituareError::LOGIN_FAILED:
293 m_ui->toggleProgressIndicator(false);
294 m_ui->buildInformationBox(tr("Invalid E-mail address or password"), true);
297 case SituareError::UPDATE_FAILED:
298 m_ui->toggleProgressIndicator(false);
299 m_ui->buildInformationBox(tr("Update failed, please try again"), true);
301 case SituareError::DATA_RETRIEVAL_FAILED:
302 m_ui->toggleProgressIndicator(false);
303 m_ui->buildInformationBox(tr("Data retrieval failed, please try again"), true);
305 case SituareError::ADDRESS_RETRIEVAL_FAILED:
306 case SituareError::ERROR_GEOLOCATION_REQUEST_FAIL:
307 case SituareError::ERROR_GEOLOCATION_LONLAT_INVALID:
308 m_ui->toggleProgressIndicator(false);
309 m_ui->buildInformationBox(tr("Address retrieval failed"), true);
311 case SituareError::IMAGE_DOWNLOAD_FAILED:
312 m_ui->buildInformationBox(tr("Image download failed"), true);
314 case SituareError::MAP_IMAGE_DOWNLOAD_FAILED:
315 m_ui->buildInformationBox(tr("Map image download failed"), true);
317 case SituareError::GPS_INITIALIZATION_FAILED:
319 m_ui->buildInformationBox(tr("GPS initialization failed"), true);
321 case SituareError::INVALID_JSON:
322 m_ui->buildInformationBox(tr("Malformatted reply from server"), true);
323 m_ui->loggedIn(false);
324 m_facebookAuthenticator->clearAccountInformation(false); // clean all
326 case SituareError::ERROR_GEOLOCATION_SERVER_UNAVAILABLE:
327 m_ui->toggleProgressIndicator(false);
328 m_ui->buildInformationBox(tr("Address server not responding"), true);
331 m_ui->toggleProgressIndicator(false);
332 if(context == ErrorContext::NETWORK)
333 qCritical() << "QNetworkReply::NetworkError: " << error;
335 qCritical() << "Unknown error: " << error;
341 void SituareEngine::fetchUsernameFromSettings()
343 qDebug() << __PRETTY_FUNCTION__;
345 m_ui->setUsername(m_facebookAuthenticator->loadUsername());
348 void SituareEngine::imageReady(User *user)
350 qDebug() << __PRETTY_FUNCTION__;
353 emit userLocationReady(user);
355 emit friendImageReady(user);
358 void SituareEngine::initializeGpsAndAutocentering()
360 qDebug() << __PRETTY_FUNCTION__;
362 QSettings settings(DIRECTORY_NAME, FILE_NAME);
363 QVariant gpsEnabled = settings.value(SETTINGS_GPS_ENABLED);
364 QVariant autoCenteringEnabled = settings.value(SETTINGS_AUTO_CENTERING_ENABLED);
366 if (m_gps->isInitialized()) {
368 if (gpsEnabled.toString().isEmpty()) { // First start. Situare.conf file does not exists
370 connect(m_gps, SIGNAL(position(QPointF,qreal)),
371 this, SLOT(setFirstStartZoomLevel(QPointF,qreal)));
373 changeAutoCenteringSetting(true);
376 m_ui->buildInformationBox(tr("GPS enabled"));
377 m_ui->buildInformationBox(tr("Auto centering enabled"));
379 } else { // Normal start
380 changeAutoCenteringSetting(autoCenteringEnabled.toBool());
381 enableGPS(gpsEnabled.toBool());
383 if (gpsEnabled.toBool())
384 m_ui->buildInformationBox(tr("GPS enabled"));
386 if (gpsEnabled.toBool() && autoCenteringEnabled.toBool())
387 m_ui->buildInformationBox(tr("Auto centering enabled"));
394 void SituareEngine::loginActionPressed()
396 qDebug() << __PRETTY_FUNCTION__;
398 if (m_networkAccessManager->isConnected()) {
399 if(m_ui->loginState()) {
401 m_situareService->clearUserData();
403 m_facebookAuthenticator->start();
407 error(ErrorContext::NETWORK, QNetworkReply::UnknownNetworkError);
411 void SituareEngine::loginOk()
413 qDebug() << __PRETTY_FUNCTION__;
415 m_ui->loggedIn(true);
418 m_situareService->fetchLocations(); // request user locations
420 if (m_gps->isRunning())
421 m_ui->readAutomaticLocationUpdateSettings();
424 void SituareEngine::loginProcessCancelled()
426 qDebug() << __PRETTY_FUNCTION__;
428 m_ui->toggleProgressIndicator(false);
429 m_ui->updateItemVisibility();
432 void SituareEngine::logout()
434 qDebug() << __PRETTY_FUNCTION__;
436 m_ui->loggedIn(false);
438 // signal to clear locationUpdateDialog's data
439 connect(this, SIGNAL(clearUpdateLocationDialogData()),
440 m_ui, SIGNAL(clearUpdateLocationDialogData()));
441 emit clearUpdateLocationDialogData();
443 m_facebookAuthenticator->clearAccountInformation(); // clear all
444 m_automaticUpdateFirstStart = true;
447 void SituareEngine::refreshUserData()
449 qDebug() << __PRETTY_FUNCTION__;
451 if (m_networkAccessManager->isConnected()) {
452 m_ui->toggleProgressIndicator(true);
453 m_situareService->fetchLocations();
456 error(ErrorContext::NETWORK, QNetworkReply::UnknownNetworkError);
460 void SituareEngine::requestAddress()
462 qDebug() << __PRETTY_FUNCTION__;
464 if (m_networkAccessManager->isConnected()) {
465 if (m_gps->isRunning())
466 m_situareService->reverseGeo(m_gps->lastPosition());
468 m_situareService->reverseGeo(m_mapEngine->centerGeoCoordinate());
471 error(ErrorContext::NETWORK, QNetworkReply::UnknownNetworkError);
475 void SituareEngine::requestUpdateLocation(const QString &status, bool publish)
477 qDebug() << __PRETTY_FUNCTION__;
479 if (m_networkAccessManager->isConnected()) {
480 m_ui->toggleProgressIndicator(true);
482 if (m_gps->isRunning())
483 m_situareService->updateLocation(m_gps->lastPosition(), status, publish);
485 m_situareService->updateLocation(m_mapEngine->centerGeoCoordinate(), status, publish);
488 error(ErrorContext::NETWORK, QNetworkReply::UnknownNetworkError);
492 void SituareEngine::requestAutomaticUpdateIfMoved(QPointF position)
494 qDebug() << __PRETTY_FUNCTION__;
496 if ((fabs(m_lastUpdatedGPSPosition.x() - position.x()) >
497 USER_MOVEMENT_MINIMUM_LONGITUDE_DIFFERENCE) ||
498 (fabs(m_lastUpdatedGPSPosition.y() - position.y()) >
499 USER_MOVEMENT_MINIMUM_LATITUDE_DIFFERENCE)) {
501 m_lastUpdatedGPSPosition = position;
505 if (m_automaticUpdateRequest && m_userMoved) {
506 requestUpdateLocation(tr("Automatic location update"));
507 m_automaticUpdateRequest = false;
512 void SituareEngine::setFirstStartZoomLevel(QPointF latLonCoordinate, qreal accuracy)
514 qDebug() << __PRETTY_FUNCTION__;
516 Q_UNUSED(latLonCoordinate);
519 if (m_autoCenteringEnabled) // autocentering is disabled when map is scrolled
520 m_mapEngine->setZoomLevel(DEFAULT_ZOOM_LEVEL_WHEN_GPS_IS_AVAILABLE);
522 disconnect(m_gps, SIGNAL(position(QPointF,qreal)),
523 this, SLOT(setFirstStartZoomLevel(QPointF,qreal)));
526 void SituareEngine::signalsFromFacebookAuthenticator()
528 qDebug() << __PRETTY_FUNCTION__;
530 connect(m_facebookAuthenticator, SIGNAL(error(int, int)),
531 this, SLOT(error(int, int)));
533 connect(m_facebookAuthenticator, SIGNAL(credentialsReady(FacebookCredentials)),
534 m_situareService, SLOT(credentialsReady(FacebookCredentials)));
536 connect(m_facebookAuthenticator, SIGNAL(credentialsReady(FacebookCredentials)),
537 this, SLOT(loginOk()));
539 connect(m_facebookAuthenticator, SIGNAL(newLoginRequest()),
540 m_ui, SLOT(startLoginProcess()));
542 connect(m_facebookAuthenticator, SIGNAL(saveCookiesRequest()),
543 m_ui, SLOT(saveCookies()));
545 connect(m_facebookAuthenticator, SIGNAL(loginUsingCookies()),
546 m_ui, SLOT(loginUsingCookies()));
549 void SituareEngine::signalsFromGPS()
551 qDebug() << __PRETTY_FUNCTION__;
553 connect(m_gps, SIGNAL(position(QPointF,qreal)),
554 m_mapEngine, SLOT(gpsPositionUpdate(QPointF,qreal)));
556 connect(m_gps, SIGNAL(timeout()),
557 m_ui, SLOT(gpsTimeout()));
559 connect(m_gps, SIGNAL(error(int, int)),
560 this, SLOT(error(int, int)));
563 void SituareEngine::signalsFromMainWindow()
565 qDebug() << __PRETTY_FUNCTION__;
567 connect(m_ui, SIGNAL(error(int, int)),
568 this, SLOT(error(int, int)));
570 connect(m_ui, SIGNAL(fetchUsernameFromSettings()),
571 this, SLOT(fetchUsernameFromSettings()));
573 connect(m_ui, SIGNAL(loginActionPressed()),
574 this, SLOT(loginActionPressed()));
576 connect(m_ui, SIGNAL(saveUsername(QString)),
577 m_facebookAuthenticator, SLOT(saveUsername(QString)));
579 connect(m_ui, SIGNAL(updateCredentials(QUrl)),
580 m_facebookAuthenticator, SLOT(updateCredentials(QUrl)));
582 // signals from map view
583 connect(m_ui, SIGNAL(mapViewScrolled(QPoint)),
584 m_mapEngine, SLOT(setCenterPosition(QPoint)));
586 connect(m_ui, SIGNAL(mapViewResized(QSize)),
587 m_mapEngine, SLOT(viewResized(QSize)));
589 connect(m_ui, SIGNAL(viewZoomFinished()),
590 m_mapEngine, SLOT(viewZoomFinished()));
592 // signals from zoom buttons (zoom panel and volume buttons)
593 connect(m_ui, SIGNAL(zoomIn()),
594 m_mapEngine, SLOT(zoomIn()));
596 connect(m_ui, SIGNAL(zoomOut()),
597 m_mapEngine, SLOT(zoomOut()));
599 // signals from menu buttons
600 connect(m_ui, SIGNAL(autoCenteringTriggered(bool)),
601 this, SLOT(changeAutoCenteringSetting(bool)));
603 connect(m_ui, SIGNAL(gpsTriggered(bool)),
604 this, SLOT(enableGPS(bool)));
606 //signals from dialogs
607 connect(m_ui, SIGNAL(cancelLoginProcess()),
608 this, SLOT(loginProcessCancelled()));
610 connect(m_ui, SIGNAL(requestReverseGeo()),
611 this, SLOT(requestAddress()));
613 connect(m_ui, SIGNAL(statusUpdate(QString,bool)),
614 this, SLOT(requestUpdateLocation(QString,bool)));
616 connect(m_ui, SIGNAL(enableAutomaticLocationUpdate(bool, int)),
617 this, SLOT(enableAutomaticLocationUpdate(bool, int)));
619 // signals from user info tab
620 connect(m_ui, SIGNAL(refreshUserData()),
621 this, SLOT(refreshUserData()));
623 connect(m_ui, SIGNAL(findUser(QPointF)),
624 m_mapEngine, SLOT(centerToCoordinates(QPointF)));
626 // signals from friend list tab
627 connect(m_ui, SIGNAL(findFriend(QPointF)),
628 m_mapEngine, SLOT(centerToCoordinates(QPointF)));
631 void SituareEngine::signalsFromMapEngine()
633 qDebug() << __PRETTY_FUNCTION__;
635 connect(m_mapEngine, SIGNAL(error(int, int)),
636 this, SLOT(error(int, int)));
638 connect(m_mapEngine, SIGNAL(locationChanged(QPoint)),
639 m_ui, SIGNAL(centerToSceneCoordinates(QPoint)));
641 connect(m_mapEngine, SIGNAL(zoomLevelChanged(int)),
642 m_ui, SIGNAL(zoomLevelChanged(int)));
644 connect(m_mapEngine, SIGNAL(mapScrolledManually()),
645 this, SLOT(disableAutoCentering()));
647 connect(m_mapEngine, SIGNAL(maxZoomLevelReached()),
648 m_ui, SIGNAL(maxZoomLevelReached()));
650 connect(m_mapEngine, SIGNAL(minZoomLevelReached()),
651 m_ui, SIGNAL(minZoomLevelReached()));
653 connect(m_mapEngine, SIGNAL(locationItemClicked(QList<QString>)),
654 m_ui, SIGNAL(locationItemClicked(QList<QString>)));
656 connect(m_mapEngine, SIGNAL(newMapResolution(qreal)),
657 m_ui, SIGNAL(newMapResolution(qreal)));
660 void SituareEngine::signalsFromSituareService()
662 qDebug() << __PRETTY_FUNCTION__;
664 connect(m_situareService, SIGNAL(error(int, int)),
665 this, SLOT(error(int, int)));
667 connect(m_situareService, SIGNAL(imageReady(User*)),
668 this, SLOT(imageReady(User*)));
670 connect(m_situareService, SIGNAL(reverseGeoReady(QString)),
671 m_ui, SIGNAL(reverseGeoReady(QString)));
673 connect(m_situareService, SIGNAL(userDataChanged(User*, QList<User*>&)),
674 this, SLOT(userDataChanged(User*, QList<User*>&)));
676 connect(m_situareService, SIGNAL(updateWasSuccessful()),
677 this, SLOT(updateWasSuccessful()));
679 connect(m_situareService, SIGNAL(updateWasSuccessful()),
680 m_ui, SIGNAL(clearUpdateLocationDialogData()));
683 void SituareEngine::startAutomaticUpdate()
685 qDebug() << __PRETTY_FUNCTION__;
687 m_gps->requestUpdate();
688 m_automaticUpdateRequest = true;
691 void SituareEngine::updateWasSuccessful()
693 qDebug() << __PRETTY_FUNCTION__;
695 if (m_networkAccessManager->isConnected())
696 m_situareService->fetchLocations();
698 error(ErrorContext::NETWORK, QNetworkReply::UnknownNetworkError);
701 void SituareEngine::userDataChanged(User *user, QList<User *> &friendsList)
703 qDebug() << __PRETTY_FUNCTION__;
705 m_ui->toggleProgressIndicator(false);
708 emit userLocationReady(user);
709 emit friendsLocationsReady(friendsList);