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,
27 #include <QMessageBox>
28 #include <QNetworkReply>
31 #include "application.h"
35 #include "facebookservice/facebookauthentication.h"
36 #include "gps/gpsposition.h"
37 #include "map/mapengine.h"
39 #include "network/networkaccessmanager.h"
40 #include "situareservice/situareservice.h"
41 #include "ui/mainwindow.h"
45 const QString SETTINGS_GPS_ENABLED = "GPS_ENABLED"; ///< GPS setting
46 const QString SETTINGS_AUTO_CENTERING_ENABLED = "AUTO_CENTERING_ENABLED";///< Auto centering setting
47 const int DEFAULT_ZOOM_LEVEL_WHEN_GPS_IS_AVAILABLE = 12; ///< Default zoom level when GPS available
48 const qreal USER_MOVEMENT_MINIMUM_LONGITUDE_DIFFERENCE = 0.003;///< Min value for user move latitude
49 const qreal USER_MOVEMENT_MINIMUM_LATITUDE_DIFFERENCE = 0.001;///< Min value for user move longitude
50 const int MIN_UPDATE_INTERVAL_MSECS = 5*60*1000;
52 SituareEngine::SituareEngine()
53 : m_autoCenteringEnabled(false),
54 m_automaticUpdateFirstStart(true),
55 m_automaticUpdateRequest(false),
57 m_automaticUpdateIntervalTimer(0),
58 m_lastUpdatedGPSPosition(GeoCoordinate())
60 qDebug() << __PRETTY_FUNCTION__;
62 m_ui = new MainWindow;
63 m_ui->updateItemVisibility();
66 m_app = static_cast<Application *>(qApp);
67 m_app->registerWindow(m_ui->winId());
69 connect(m_app, SIGNAL(topmostChanged(bool)),
70 this, SLOT(enablePowerSave(bool)));
73 m_networkAccessManager = new NetworkAccessManager(this);
76 m_mapEngine = new MapEngine(this);
77 m_ui->setMapViewScene(m_mapEngine->scene());
80 m_gps = new GPSPosition(this);
82 // build SituareService
83 m_situareService = new SituareService(this);
85 // build FacebookAuthenticator
86 m_facebookAuthenticator = new FacebookAuthentication(this);
89 signalsFromMapEngine();
91 signalsFromSituareService();
92 signalsFromMainWindow();
93 signalsFromFacebookAuthenticator();
95 connect(this, SIGNAL(userLocationReady(User*)),
96 m_ui, SIGNAL(userLocationReady(User*)));
98 connect(this, SIGNAL(friendsLocationsReady(QList<User*>&)),
99 m_ui, SIGNAL(friendsLocationsReady(QList<User*>&)));
101 connect(this, SIGNAL(userLocationReady(User*)),
102 m_mapEngine, SLOT(receiveOwnLocation(User*)));
104 connect(this, SIGNAL(friendsLocationsReady(QList<User*>&)),
105 m_mapEngine, SIGNAL(friendsLocationsReady(QList<User*>&)));
107 connect(this, SIGNAL(friendImageReady(User*)),
108 m_ui, SIGNAL(friendImageReady(User*)));
110 connect(this, SIGNAL(friendImageReady(User*)),
111 m_mapEngine, SIGNAL(friendImageReady(User*)));
113 m_automaticUpdateIntervalTimer = new QTimer(this);
114 connect(m_automaticUpdateIntervalTimer, SIGNAL(timeout()),
115 this, SLOT(startAutomaticUpdate()));
117 // signals connected, now it's time to show the main window
118 // but init the MapEngine before so starting location is set
122 m_facebookAuthenticator->start();
124 m_gps->setMode(GPSPosition::Default);
125 initializeGpsAndAutocentering();
127 m_mce = new MCE(this);
128 connect(m_mce, SIGNAL(displayOff(bool)), this, SLOT(enablePowerSave(bool)));
131 SituareEngine::~SituareEngine()
133 qDebug() << __PRETTY_FUNCTION__;
137 QSettings settings(DIRECTORY_NAME, FILE_NAME);
138 settings.setValue(SETTINGS_GPS_ENABLED, m_gps->isRunning());
139 settings.setValue(SETTINGS_AUTO_CENTERING_ENABLED, m_autoCenteringEnabled);
142 void SituareEngine::changeAutoCenteringSetting(bool enabled)
144 qDebug() << __PRETTY_FUNCTION__;
146 m_autoCenteringEnabled = enabled;
147 enableAutoCentering(enabled);
150 void SituareEngine::disableAutoCentering()
152 qDebug() << __PRETTY_FUNCTION__;
154 changeAutoCenteringSetting(false);
155 m_ui->buildInformationBox(tr("Auto centering disabled"));
158 void SituareEngine::enableAutoCentering(bool enabled)
160 qDebug() << __PRETTY_FUNCTION__;
162 m_ui->setAutoCenteringButtonEnabled(enabled);
163 m_mapEngine->setAutoCentering(enabled);
166 m_gps->requestLastPosition();
169 void SituareEngine::enableGPS(bool enabled)
171 qDebug() << __PRETTY_FUNCTION__;
173 m_ui->setOwnLocationCrosshairVisibility(!enabled);
175 if (m_gps->isInitialized()) {
176 m_ui->setGPSButtonEnabled(enabled);
177 m_mapEngine->setGPSEnabled(enabled);
179 if (enabled && !m_gps->isRunning()) {
181 enableAutoCentering(m_autoCenteringEnabled);
182 m_gps->requestLastPosition();
184 if(m_ui->loginState())
185 m_ui->readAutomaticLocationUpdateSettings();
187 else if (!enabled && m_gps->isRunning()) {
189 enableAutoCentering(false);
190 enableAutomaticLocationUpdate(false);
195 m_ui->buildInformationBox(tr("Unable to start GPS"));
196 m_ui->setGPSButtonEnabled(false);
197 m_mapEngine->setGPSEnabled(false);
201 void SituareEngine::enableAutomaticLocationUpdate(bool enabled, int updateIntervalMsecs)
203 qDebug() << __PRETTY_FUNCTION__;
205 //Show automatic update confirmation dialog
206 if (m_automaticUpdateFirstStart && m_gps->isRunning() && enabled) {
207 m_ui->showEnableAutomaticUpdateLocationDialog(
208 tr("Do you want to enable automatic location update with %1 min update interval?")
209 .arg(updateIntervalMsecs/1000/60));
210 m_automaticUpdateFirstStart = false;
212 if (enabled && m_gps->isRunning()) {
213 m_ui->buildInformationBox(tr("Automatic location update enabled"));
214 if (updateIntervalMsecs < MIN_UPDATE_INTERVAL_MSECS)
215 m_automaticUpdateIntervalTimer->setInterval(MIN_UPDATE_INTERVAL_MSECS);
217 m_automaticUpdateIntervalTimer->setInterval(updateIntervalMsecs);
219 connect(m_gps, SIGNAL(position(GeoCoordinate, qreal)),
220 this, SLOT(requestAutomaticUpdateIfMoved(GeoCoordinate)));
222 m_automaticUpdateIntervalTimer->start();
225 disconnect(m_gps, SIGNAL(position(GeoCoordinate, qreal)),
226 this, SLOT(requestAutomaticUpdateIfMoved(GeoCoordinate)));
228 m_automaticUpdateIntervalTimer->stop();
233 void SituareEngine::enablePowerSave(bool enabled)
235 qDebug() << __PRETTY_FUNCTION__;
237 m_gps->enablePowerSave(enabled);
239 if(m_autoCenteringEnabled)
240 m_mapEngine->setAutoCentering(!enabled);
243 void SituareEngine::error(const int context, const int error)
245 qDebug() << __PRETTY_FUNCTION__;
249 case SituareError::ERROR_GENERAL:
250 if(context == ErrorContext::SITUARE) {
251 m_ui->toggleProgressIndicator(false);
252 m_ui->buildInformationBox(tr("Unknown server error"), true);
255 case 1: //errors: SituareError::ERROR_MISSING_ARGUMENT and QNetworkReply::ConnectionRefusedError
256 m_ui->toggleProgressIndicator(false);
257 if(context == ErrorContext::SITUARE) {
258 m_ui->buildInformationBox(tr("Missing parameter from request"), true);
259 } else if(context == ErrorContext::NETWORK) {
260 m_ui->buildInformationBox(tr("Connection refused by the server"), true);
263 case QNetworkReply::RemoteHostClosedError:
264 if(context == ErrorContext::NETWORK) {
265 m_ui->toggleProgressIndicator(false);
266 m_ui->buildInformationBox(tr("Connection closed by the server"), true);
269 case QNetworkReply::HostNotFoundError:
270 if(context == ErrorContext::NETWORK) {
271 m_ui->toggleProgressIndicator(false);
272 m_ui->buildInformationBox(tr("Remote server not found"), true);
275 case QNetworkReply::TimeoutError:
276 if(context == ErrorContext::NETWORK) {
277 m_ui->toggleProgressIndicator(false);
278 m_ui->buildInformationBox(tr("Connection timed out"), true);
281 case QNetworkReply::UnknownNetworkError:
282 if(context == ErrorContext::NETWORK) {
283 m_ui->toggleProgressIndicator(false);
284 m_ui->buildInformationBox(tr("No network connection"), true);
287 case SituareError::SESSION_EXPIRED:
288 m_ui->buildInformationBox(tr("Session expired. Please login again"), true);
289 m_facebookAuthenticator->clearAccountInformation(true); // keep username = true
290 m_situareService->clearUserData();
291 m_ui->loggedIn(false);
294 case SituareError::LOGIN_FAILED:
295 m_ui->toggleProgressIndicator(false);
296 m_ui->buildInformationBox(tr("Invalid E-mail address or password"), true);
299 case SituareError::UPDATE_FAILED:
300 m_ui->toggleProgressIndicator(false);
301 m_ui->buildInformationBox(tr("Update failed, please try again"), true);
303 case SituareError::DATA_RETRIEVAL_FAILED:
304 m_ui->toggleProgressIndicator(false);
305 m_ui->buildInformationBox(tr("Data retrieval failed, please try again"), true);
307 case SituareError::ADDRESS_RETRIEVAL_FAILED:
308 case SituareError::ERROR_GEOLOCATION_REQUEST_FAIL:
309 case SituareError::ERROR_GEOLOCATION_LONLAT_INVALID:
310 m_ui->toggleProgressIndicator(false);
311 m_ui->buildInformationBox(tr("Address retrieval failed"), true);
313 case SituareError::IMAGE_DOWNLOAD_FAILED:
314 m_ui->buildInformationBox(tr("Image download failed"), true);
316 case SituareError::MAP_IMAGE_DOWNLOAD_FAILED:
317 m_ui->buildInformationBox(tr("Map image download failed"), true);
319 case SituareError::GPS_INITIALIZATION_FAILED:
321 m_ui->buildInformationBox(tr("GPS initialization failed"), true);
323 case SituareError::INVALID_JSON:
324 m_ui->buildInformationBox(tr("Malformatted reply from server"), true);
325 m_ui->loggedIn(false);
326 m_facebookAuthenticator->clearAccountInformation(false); // clean all
328 case SituareError::ERROR_GEOLOCATION_SERVER_UNAVAILABLE:
329 m_ui->toggleProgressIndicator(false);
330 m_ui->buildInformationBox(tr("Address server not responding"), true);
333 m_ui->toggleProgressIndicator(false);
334 if(context == ErrorContext::NETWORK)
335 qCritical() << "QNetworkReply::NetworkError: " << error;
337 qCritical() << "Unknown error: " << error;
343 void SituareEngine::fetchUsernameFromSettings()
345 qDebug() << __PRETTY_FUNCTION__;
347 m_ui->setUsername(m_facebookAuthenticator->loadUsername());
350 void SituareEngine::imageReady(User *user)
352 qDebug() << __PRETTY_FUNCTION__;
355 emit userLocationReady(user);
357 emit friendImageReady(user);
360 void SituareEngine::initializeGpsAndAutocentering()
362 qDebug() << __PRETTY_FUNCTION__;
364 QSettings settings(DIRECTORY_NAME, FILE_NAME);
365 QVariant gpsEnabled = settings.value(SETTINGS_GPS_ENABLED);
366 QVariant autoCenteringEnabled = settings.value(SETTINGS_AUTO_CENTERING_ENABLED);
368 if (m_gps->isInitialized()) {
370 if (gpsEnabled.toString().isEmpty()) { // First start. Situare.conf file does not exists
372 connect(m_gps, SIGNAL(position(GeoCoordinate, qreal)),
373 this, SLOT(setFirstStartZoomLevel()));
375 changeAutoCenteringSetting(true);
378 m_ui->buildInformationBox(tr("GPS enabled"));
379 m_ui->buildInformationBox(tr("Auto centering enabled"));
381 } else { // Normal start
382 changeAutoCenteringSetting(autoCenteringEnabled.toBool());
383 enableGPS(gpsEnabled.toBool());
385 if (gpsEnabled.toBool())
386 m_ui->buildInformationBox(tr("GPS enabled"));
388 if (gpsEnabled.toBool() && autoCenteringEnabled.toBool())
389 m_ui->buildInformationBox(tr("Auto centering enabled"));
396 void SituareEngine::loginActionPressed()
398 qDebug() << __PRETTY_FUNCTION__;
400 if (m_networkAccessManager->isConnected()) {
401 if(m_ui->loginState()) {
403 m_situareService->clearUserData();
405 m_facebookAuthenticator->start();
409 error(ErrorContext::NETWORK, QNetworkReply::UnknownNetworkError);
413 void SituareEngine::loginOk()
415 qDebug() << __PRETTY_FUNCTION__;
417 m_ui->loggedIn(true);
420 m_situareService->fetchLocations(); // request user locations
422 if (m_gps->isRunning())
423 m_ui->readAutomaticLocationUpdateSettings();
426 void SituareEngine::loginProcessCancelled()
428 qDebug() << __PRETTY_FUNCTION__;
430 m_ui->toggleProgressIndicator(false);
431 m_ui->updateItemVisibility();
434 void SituareEngine::logout()
436 qDebug() << __PRETTY_FUNCTION__;
438 m_ui->loggedIn(false);
440 // signal to clear locationUpdateDialog's data
441 connect(this, SIGNAL(clearUpdateLocationDialogData()),
442 m_ui, SIGNAL(clearUpdateLocationDialogData()));
443 emit clearUpdateLocationDialogData();
445 m_facebookAuthenticator->clearAccountInformation(); // clear all
446 m_automaticUpdateFirstStart = true;
449 void SituareEngine::refreshUserData()
451 qDebug() << __PRETTY_FUNCTION__;
453 if (m_networkAccessManager->isConnected()) {
454 m_ui->toggleProgressIndicator(true);
455 m_situareService->fetchLocations();
458 error(ErrorContext::NETWORK, QNetworkReply::UnknownNetworkError);
462 void SituareEngine::requestAddress()
464 qDebug() << __PRETTY_FUNCTION__;
466 if (m_networkAccessManager->isConnected()) {
467 if (m_gps->isRunning())
468 m_situareService->reverseGeo(m_gps->lastPosition());
470 m_situareService->reverseGeo(m_mapEngine->centerGeoCoordinate());
473 error(ErrorContext::NETWORK, QNetworkReply::UnknownNetworkError);
477 void SituareEngine::requestUpdateLocation(const QString &status, bool publish)
479 qDebug() << __PRETTY_FUNCTION__;
481 if (m_networkAccessManager->isConnected()) {
482 m_ui->toggleProgressIndicator(true);
484 if (m_gps->isRunning())
485 m_situareService->updateLocation(m_gps->lastPosition(), status, publish);
487 m_situareService->updateLocation(m_mapEngine->centerGeoCoordinate(), status, publish);
490 error(ErrorContext::NETWORK, QNetworkReply::UnknownNetworkError);
494 void SituareEngine::requestAutomaticUpdateIfMoved(GeoCoordinate position)
496 qDebug() << __PRETTY_FUNCTION__;
498 if ((fabs(m_lastUpdatedGPSPosition.longitude() - position.longitude()) >
499 USER_MOVEMENT_MINIMUM_LONGITUDE_DIFFERENCE) ||
500 (fabs(m_lastUpdatedGPSPosition.latitude() - position.latitude()) >
501 USER_MOVEMENT_MINIMUM_LATITUDE_DIFFERENCE)) {
503 m_lastUpdatedGPSPosition = position;
507 if (m_automaticUpdateRequest && m_userMoved) {
508 requestUpdateLocation(tr("Automatic location update"));
509 m_automaticUpdateRequest = false;
514 void SituareEngine::setFirstStartZoomLevel()
516 qDebug() << __PRETTY_FUNCTION__;
518 if (m_autoCenteringEnabled) // autocentering is disabled when map is scrolled
519 m_mapEngine->setZoomLevel(DEFAULT_ZOOM_LEVEL_WHEN_GPS_IS_AVAILABLE);
521 disconnect(m_gps, SIGNAL(position(GeoCoordinate, qreal)),
522 this, SLOT(setFirstStartZoomLevel()));
525 void SituareEngine::signalsFromFacebookAuthenticator()
527 qDebug() << __PRETTY_FUNCTION__;
529 connect(m_facebookAuthenticator, SIGNAL(error(int, int)),
530 this, SLOT(error(int, int)));
532 connect(m_facebookAuthenticator, SIGNAL(credentialsReady(FacebookCredentials)),
533 m_situareService, SLOT(credentialsReady(FacebookCredentials)));
535 connect(m_facebookAuthenticator, SIGNAL(credentialsReady(FacebookCredentials)),
536 this, SLOT(loginOk()));
538 connect(m_facebookAuthenticator, SIGNAL(newLoginRequest()),
539 m_ui, SLOT(startLoginProcess()));
541 connect(m_facebookAuthenticator, SIGNAL(saveCookiesRequest()),
542 m_ui, SLOT(saveCookies()));
544 connect(m_facebookAuthenticator, SIGNAL(loginUsingCookies()),
545 m_ui, SLOT(loginUsingCookies()));
548 void SituareEngine::signalsFromGPS()
550 qDebug() << __PRETTY_FUNCTION__;
552 connect(m_gps, SIGNAL(position(GeoCoordinate, qreal)),
553 m_mapEngine, SLOT(gpsPositionUpdate(GeoCoordinate, qreal)));
555 connect(m_gps, SIGNAL(timeout()),
556 m_ui, SLOT(gpsTimeout()));
558 connect(m_gps, SIGNAL(error(int, int)),
559 this, SLOT(error(int, int)));
562 void SituareEngine::signalsFromMainWindow()
564 qDebug() << __PRETTY_FUNCTION__;
566 connect(m_ui, SIGNAL(error(int, int)),
567 this, SLOT(error(int, int)));
569 connect(m_ui, SIGNAL(fetchUsernameFromSettings()),
570 this, SLOT(fetchUsernameFromSettings()));
572 connect(m_ui, SIGNAL(loginActionPressed()),
573 this, SLOT(loginActionPressed()));
575 connect(m_ui, SIGNAL(saveUsername(QString)),
576 m_facebookAuthenticator, SLOT(saveUsername(QString)));
578 connect(m_ui, SIGNAL(updateCredentials(QUrl)),
579 m_facebookAuthenticator, SLOT(updateCredentials(QUrl)));
581 // signals from map view
582 connect(m_ui, SIGNAL(mapViewScrolled(SceneCoordinate)),
583 m_mapEngine, SLOT(setCenterPosition(SceneCoordinate)));
585 connect(m_ui, SIGNAL(mapViewResized(QSize)),
586 m_mapEngine, SLOT(viewResized(QSize)));
588 connect(m_ui, SIGNAL(viewZoomFinished()),
589 m_mapEngine, SLOT(viewZoomFinished()));
591 // signals from zoom buttons (zoom panel and volume buttons)
592 connect(m_ui, SIGNAL(zoomIn()),
593 m_mapEngine, SLOT(zoomIn()));
595 connect(m_ui, SIGNAL(zoomOut()),
596 m_mapEngine, SLOT(zoomOut()));
598 // signals from menu buttons
599 connect(m_ui, SIGNAL(autoCenteringTriggered(bool)),
600 this, SLOT(changeAutoCenteringSetting(bool)));
602 connect(m_ui, SIGNAL(gpsTriggered(bool)),
603 this, SLOT(enableGPS(bool)));
605 //signals from dialogs
606 connect(m_ui, SIGNAL(cancelLoginProcess()),
607 this, SLOT(loginProcessCancelled()));
609 connect(m_ui, SIGNAL(requestReverseGeo()),
610 this, SLOT(requestAddress()));
612 connect(m_ui, SIGNAL(statusUpdate(QString,bool)),
613 this, SLOT(requestUpdateLocation(QString,bool)));
615 connect(m_ui, SIGNAL(enableAutomaticLocationUpdate(bool, int)),
616 this, SLOT(enableAutomaticLocationUpdate(bool, int)));
618 // signals from user info tab
619 connect(m_ui, SIGNAL(refreshUserData()),
620 this, SLOT(refreshUserData()));
622 connect(m_ui, SIGNAL(findUser(GeoCoordinate)),
623 m_mapEngine, SLOT(centerToCoordinates(GeoCoordinate)));
625 // signals from friend list tab
626 connect(m_ui, SIGNAL(findFriend(GeoCoordinate)),
627 m_mapEngine, SLOT(centerToCoordinates(GeoCoordinate)));
630 void SituareEngine::signalsFromMapEngine()
632 qDebug() << __PRETTY_FUNCTION__;
634 connect(m_mapEngine, SIGNAL(error(int, int)),
635 this, SLOT(error(int, int)));
637 connect(m_mapEngine, SIGNAL(locationChanged(SceneCoordinate)),
638 m_ui, SIGNAL(centerToSceneCoordinates(SceneCoordinate)));
640 connect(m_mapEngine, SIGNAL(zoomLevelChanged(int)),
641 m_ui, SIGNAL(zoomLevelChanged(int)));
643 connect(m_mapEngine, SIGNAL(mapScrolledManually()),
644 this, SLOT(disableAutoCentering()));
646 connect(m_mapEngine, SIGNAL(maxZoomLevelReached()),
647 m_ui, SIGNAL(maxZoomLevelReached()));
649 connect(m_mapEngine, SIGNAL(minZoomLevelReached()),
650 m_ui, SIGNAL(minZoomLevelReached()));
652 connect(m_mapEngine, SIGNAL(locationItemClicked(QList<QString>)),
653 m_ui, SIGNAL(locationItemClicked(QList<QString>)));
655 connect(m_mapEngine, SIGNAL(newMapResolution(qreal)),
656 m_ui, SIGNAL(newMapResolution(qreal)));
659 void SituareEngine::signalsFromSituareService()
661 qDebug() << __PRETTY_FUNCTION__;
663 connect(m_situareService, SIGNAL(error(int, int)),
664 this, SLOT(error(int, int)));
666 connect(m_situareService, SIGNAL(imageReady(User*)),
667 this, SLOT(imageReady(User*)));
669 connect(m_situareService, SIGNAL(reverseGeoReady(QString)),
670 m_ui, SIGNAL(reverseGeoReady(QString)));
672 connect(m_situareService, SIGNAL(userDataChanged(User*, QList<User*>&)),
673 this, SLOT(userDataChanged(User*, QList<User*>&)));
675 connect(m_situareService, SIGNAL(updateWasSuccessful()),
676 this, SLOT(updateWasSuccessful()));
678 connect(m_situareService, SIGNAL(updateWasSuccessful()),
679 m_ui, SIGNAL(clearUpdateLocationDialogData()));
682 void SituareEngine::startAutomaticUpdate()
684 qDebug() << __PRETTY_FUNCTION__;
686 m_gps->requestUpdate();
687 m_automaticUpdateRequest = true;
690 void SituareEngine::updateWasSuccessful()
692 qDebug() << __PRETTY_FUNCTION__;
694 if (m_networkAccessManager->isConnected())
695 m_situareService->fetchLocations();
697 error(ErrorContext::NETWORK, QNetworkReply::UnknownNetworkError);
700 void SituareEngine::userDataChanged(User *user, QList<User *> &friendsList)
702 qDebug() << __PRETTY_FUNCTION__;
704 m_ui->toggleProgressIndicator(false);
707 emit userLocationReady(user);
708 emit friendsLocationsReady(friendsList);