added base class for own and friend locations. added new class for
[situare] / src / ui / mainwindow.cpp
index e0c3e03..0202682 100644 (file)
@@ -39,10 +39,10 @@ MainWindow::MainWindow(QWidget *parent)
     setWindowTitle(tr("List view"));
     this->hide();
 
-    m_facebookAuthenticator = new FacebookAuthentication(this);
-    connect(m_facebookAuthenticator, SIGNAL(credentialsReady()), this, SLOT(loginOK()));
-    connect(m_facebookAuthenticator, SIGNAL(userExit()), this, SLOT(loginScreenClosed()));
-    m_facebookAuthenticator->start();
+    //m_facebookAuthenticator = new FacebookAuthentication(this);
+    //connect(m_facebookAuthenticator, SIGNAL(credentialsReady(FacebookCredentials)), this, SLOT(loginOK()));
+    //connect(m_facebookAuthenticator, SIGNAL(userExit()), this, SLOT(loginScreenClosed()));
+   // m_facebookAuthenticator->start();
 
     m_locationDialog = new UpdateLocationDialog(this);
     connect(m_listViewScreen->m_personalInfo,SIGNAL(launchMessageUpdate()),
@@ -54,6 +54,11 @@ MainWindow::MainWindow(QWidget *parent)
     
     m_networkManager = new QNetworkAccessManager;
     m_situareService = new SituareService(this,m_networkManager);
+
+    connect(this, SIGNAL(userLocationReady(User*)),
+            m_mapViewScreen, SLOT(userLocationReady(User*)));
+    connect(this, SIGNAL(friendsLocationsReady(QList<User*>&)),
+            m_mapViewScreen, SLOT(friendsLocationsReady(QList<User*>&)));
 }
 
 MainWindow::~MainWindow()
@@ -159,5 +164,16 @@ void MainWindow::loginOK()
 {
     qDebug() << __PRETTY_FUNCTION__ << m_loggedIn;
     m_loggedIn = true;
-    m_facebookAuthenticator->close();
+    //m_facebookAuthenticator->close();
 }
+
+//void MainWindow::userLocationReady(User &user)
+//{
+//    emit userLocationReady(user);
+//}
+//
+//void MainWindow::friendsLocationsReady(QList<User *>friendsList)
+//{
+//    emit friendsLocationsReady(friendsList);
+//}
+