Merge branch 'friendlist' into integration
[situare] / src / ui / mainwindow.cpp
index bab4fe5..70e4a58 100644 (file)
@@ -4,6 +4,7 @@
 
       Henri Lampela - henri.lampela@ixonos.com
       Kaj Wallin - kaj.wallin@ixonos.com
+      Jussi Laitinen jussi.laitinen@ixonos.com
 
    Situare is free software; you can redistribute it and/or
    modify it under the terms of the GNU General Public License
@@ -40,7 +41,7 @@ MainWindow::MainWindow(QWidget *parent)
     this->hide();
 
     m_locationDialog = new UpdateLocationDialog(this);
-    connect(m_listViewScreen->m_personalInfo,SIGNAL(launchMessageUpdate()),
+    connect(m_listViewScreen,SIGNAL(launchUpdateDialog()),
             this,SLOT(openLocationUpdateDialog()));
 
     connect(this, SIGNAL(reverseGeoReady(QString)), m_locationDialog, SLOT(setAddress(QString)));
@@ -51,6 +52,17 @@ MainWindow::MainWindow(QWidget *parent)
             m_mapViewScreen, SLOT(userLocationReady(User*)));
     connect(this, SIGNAL(friendsLocationsReady(QList<User*>&)),
             m_mapViewScreen, SLOT(friendsLocationsReady(QList<User*>&)));
+
+    connect(this, SIGNAL(userLocationReady(User*)), m_listViewScreen,
+            SLOT(userDataReceived(User*)));
+    connect(this, SIGNAL(friendsLocationsReady(QList<User*>&)), m_listViewScreen,
+            SLOT(friendInfoReceived(QList<User*>&)));
+    connect(m_listViewScreen, SIGNAL(updateFriendsData()),
+            this, SIGNAL(refreshUserData()));
+    connect(m_listViewScreen, SIGNAL(toggleProgressIndicator(bool)), this,
+            SLOT(toggleProgressIndicator(bool)));
+
+    this->toggleProgressIndicator(true);
 }
 
 MainWindow::~MainWindow()
@@ -62,6 +74,14 @@ MainWindow::~MainWindow()
     delete m_situareViews;
 }
 
+void MainWindow::toggleProgressIndicator(bool value)
+{
+    qDebug() << __PRETTY_FUNCTION__;
+#ifdef Q_WS_MAEMO_5
+    setAttribute(Qt::WA_Maemo5ShowProgressIndicator, value);
+#endif // Q_WS_MAEMO_5
+}
+
 void MainWindow::createMenus()
 {
     qDebug() << __PRETTY_FUNCTION__;
@@ -139,4 +159,3 @@ void MainWindow::openSettingsDialog()
     SettingsDialog *dialog = new SettingsDialog(this);
     dialog->show();
 }
-