connect(this, SIGNAL(friendsLocationsReady(QList<User*>&)),
m_mapEngine, SIGNAL(friendsLocationsReady(QList<User*>&)));
- connect(this, SIGNAL(friendImageReady(User*)),
- m_ui, SIGNAL(friendImageReady(User*)));
+ connect(this, SIGNAL(userImageReady(QString,QPixmap)),
+ m_ui, SIGNAL(userImageReady(QString,QPixmap)));
- connect(this, SIGNAL(friendImageReady(User*)),
- m_mapEngine, SIGNAL(friendImageReady(User*)));
+ connect(this, SIGNAL(friendImageReady(QString,QPixmap)),
+ m_ui, SIGNAL(friendImageReady(QString,QPixmap)));
+
+ connect(this, SIGNAL(friendImageReady(QString,QPixmap)),
+ m_mapEngine, SIGNAL(friendImageReady(QString,QPixmap)));
m_automaticUpdateIntervalTimer = new QTimer(this);
connect(m_automaticUpdateIntervalTimer, SIGNAL(timeout()),
m_ui->setUsername(m_facebookAuthenticator->loadUsername());
}
-void SituareEngine::imageReady(User *user)
+void SituareEngine::imageReady(const QString &id, const QPixmap &image)
{
qDebug() << __PRETTY_FUNCTION__;
- if(user->type())
- emit userLocationReady(user);
+ if(m_facebookAuthenticator->loginCredentials().userID() == id)
+ emit userImageReady(id, image);
else
- emit friendImageReady(user);
+ emit friendImageReady(id, image);
}
void SituareEngine::initializeGpsAndAutocentering()
}
}
+void SituareEngine::requestInterestingPeople()
+{
+ qDebug() << __PRETTY_FUNCTION__;
+
+ QRectF currentSceneRect = m_mapEngine->currentViewSceneRect();
+ SceneCoordinate bottomLeftSceneCoordinate(currentSceneRect.left(), currentSceneRect.bottom());
+ SceneCoordinate topRightSceneCoordinate(currentSceneRect.right(), currentSceneRect.top());
+
+ m_situareService->fetchPeopleWithSimilarInterest(GeoCoordinate(bottomLeftSceneCoordinate),
+ GeoCoordinate(topRightSceneCoordinate));
+}
+
void SituareEngine::routeParsed(Route &route)
{
qDebug() << __PRETTY_FUNCTION__;
connect(m_ui, SIGNAL(routeTo(const GeoCoordinate&)),
this, SLOT(routeTo(const GeoCoordinate&)));
+ connect(m_ui, SIGNAL(requestContactDialog(const QString &)),
+ this, SLOT(showContactDialog(const QString &)));
+
// signals from location search panel
connect(m_ui,
SIGNAL(locationItemClicked(const GeoCoordinate&, const GeoCoordinate&)),
connect(m_ui, SIGNAL(searchForLocation(QString)),
this, SLOT(locationSearch(QString)));
- // signal from friend list panel
- connect(m_ui, SIGNAL(requestContactDialog(const QString &)),
- this, SLOT(showContactDialog(const QString &)));
+ // signals from meet people panel
+ connect(m_ui, SIGNAL(requestInterestingPeople()),
+ this, SLOT(requestInterestingPeople()));
+
+ // signals from notifications panel
+ connect(m_ui, SIGNAL(requestNotifications()),
+ m_situareService, SLOT(fetchNotifications()));
}
void SituareEngine::signalsFromMapEngine()
connect(m_situareService, SIGNAL(error(int, int)),
this, SLOT(error(int, int)));
- connect(m_situareService, SIGNAL(imageReady(User*)),
- this, SLOT(imageReady(User*)));
+ connect(m_situareService, SIGNAL(imageReady(QString,QPixmap)),
+ this, SLOT(imageReady(QString,QPixmap)));
connect(m_situareService, SIGNAL(reverseGeoReady(QString)),
m_ui, SIGNAL(reverseGeoReady(QString)));
connect(m_situareService, SIGNAL(updateWasSuccessful()),
m_ui, SIGNAL(clearUpdateLocationDialogData()));
+
+ connect(m_situareService, SIGNAL(interestingPeopleReceived(QList<User>&)),
+ m_ui, SIGNAL(interestingPeopleReceived(QList<User>&)));
+
+ connect(m_situareService, SIGNAL(notificationsReceived(QList<Notification>&)),
+ m_ui, SIGNAL(notificationsReceived(QList<Notification>&)));
}
void SituareEngine::startAutomaticUpdate()