: QMainWindow(parent)
{
qDebug() << __PRETTY_FUNCTION__;
- m_loggedIn = false;
+
createViews();
setCentralWidget(m_situareViews);
createMenus();
setWindowTitle(tr("List view"));
this->hide();
- //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()),
this,SLOT(openLocationUpdateDialog()));
connect(this, SIGNAL(reverseGeoReady(QString)), m_locationDialog, SLOT(setAddress(QString)));
connect(m_locationDialog, SIGNAL(statusUpdate(QString,bool)), this,
SIGNAL(statusUpdate(QString,bool)));
-
- 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*>&)),
dialog->show();
}
-void MainWindow::loginScreenClosed()
-{
- qDebug() << __PRETTY_FUNCTION__ << m_loggedIn;
- if (m_loggedIn) {
- this->show();
- return;
- }
- else {
- this->close();
- }
-}
-
-void MainWindow::loginOK()
-{
- qDebug() << __PRETTY_FUNCTION__ << m_loggedIn;
- m_loggedIn = true;
- //m_facebookAuthenticator->close();
-}
-
-//void MainWindow::userLocationReady(User &user)
-//{
-// emit userLocationReady(user);
-//}
-//
-//void MainWindow::friendsLocationsReady(QList<User *>friendsList)
-//{
-// emit friendsLocationsReady(friendsList);
-//}
-