#include "engine.h"
#include "ui/mainwindow.h"
+#include "gps/gpsposition.h"
SituareEngine::SituareEngine(QMainWindow *parent)
: QObject(parent)
m_facebookAuthenticator = new FacebookAuthentication();
+ m_gps = new GPSPosition(this);
+
connect(m_facebookAuthenticator, SIGNAL(credentialsReady(FacebookCredentials)),
m_situareService, SLOT(credentialsReady(FacebookCredentials)));
connect(m_facebookAuthenticator, SIGNAL(credentialsReady(FacebookCredentials)),
connect(m_ui, SIGNAL(refreshUserData()), this, SLOT(refreshUserData()));
- m_facebookAuthenticator->start();
+ connect(m_gps, SIGNAL(position(QPointF)),
+ m_ui, SIGNAL(positionReceived(QPointF)));
+
+ m_facebookAuthenticator->start();
}
SituareEngine::~SituareEngine()
m_facebookAuthenticator->hide();
m_ui->show();
m_situareService->fetchLocations(); // request user locations
+ m_gps->start();
}
void SituareEngine::requestAddress()