Changed InfoTab from public to private and made proper changes to
authorKaj Wallin <kaj.wallin@ixonos.com>
Fri, 30 Apr 2010 06:55:23 +0000 (09:55 +0300)
committerKaj Wallin <kaj.wallin@ixonos.com>
Fri, 30 Apr 2010 06:55:23 +0000 (09:55 +0300)
signals

Reviewed by:

images.qrc
src/ui/listviewscreen.cpp
src/ui/listviewscreen.h
src/ui/mainwindow.cpp

index 246a602..0f0ce86 100644 (file)
@@ -25,6 +25,5 @@
         <file>res/images/led_red_g.png</file>
         <file>res/images/led_red_h.png</file>
         <file>res/images/led_red_s.png</file>
-        <file>res/images/indicator_update1.png</file>
     </qresource>
 </RCC>
index 7d89b82..a23ac98 100644 (file)
@@ -195,7 +195,10 @@ ListViewScreen::ListViewScreen(QWidget *parent)
     m_vbox->addWidget(view);
     m_vbox->setMargin(0);
 
-//    connect(m_personalInfo,SIGNAL(launchMessageUpdate()),this,SLOT(updateMessage()));
+    connect(m_personalInfo,SIGNAL(launchMessageUpdate()),
+            this,SIGNAL(launchUpdateDialog()));
+    connect(m_personalInfo,SIGNAL(launchUpdateFriendsStatus()),
+            this, SIGNAL(updateFriendsData()));
     setObjectName("List view");
 }
 
@@ -226,13 +229,6 @@ ListViewScreen::~ListViewScreen()
     delete m_vbox;
 }
 
-void ListViewScreen::updateMessage()
-{
-   qDebug() << __PRETTY_FUNCTION__;
-
-   m_locationDialog->exec();
-}
-
 void ListViewScreen::userDataChanged(User *user, QList<User *> &friends)
 {
     qDebug() << __PRETTY_FUNCTION__;
index c1a388c..e407b6e 100644 (file)
@@ -57,23 +57,24 @@ public:
  * MEMBER FUNCTIONS AND SLOTS
  ******************************************************************************/
 public slots:
-    /**
-    * @brief Slot to open Location update dialog
-    */
-    void updateMessage();
-
     void userDataChanged(User* user,QList<User*>& friends);
 
 signals:
     void toggleProgressIndicator(bool state);
+    /**
+    * @brief Forwarding signal from InfoTab to parent to open update dialog
+    */
+    void launchUpdateDialog();
+    /**
+    * @brief  Forwarding signal from InfoTab to parent to update friends list data
+    */
+    void updateFriendsData();
 
 /*******************************************************************************
  * DATA MEMBERS
  ******************************************************************************/
-public:
-    InfoTab *m_personalInfo;    ///< Personal info tab
-
 private:
+    InfoTab *m_personalInfo;    ///< Personal info tab
     QVBoxLayout *m_vbox;    ///< Holds the graphics view
     Pixmap *m_arrowbutton;    ///< Button which reveals/hides the info tab when pressed
     Pixmap *m_leftSideBar;
index 6924422..951b9c7 100644 (file)
@@ -40,7 +40,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)));
@@ -50,7 +50,7 @@ MainWindow::MainWindow(QWidget *parent)
     connect(this, SIGNAL(userDataChanged(User*,QList<User*>&)), m_listViewScreen,
             SLOT(userDataChanged(User*,QList<User*>&)));
 
-    connect(m_listViewScreen->m_personalInfo, SIGNAL(launchUpdateFriendsStatus()),
+    connect(m_listViewScreen, SIGNAL(updateFriendsData()),
             this, SIGNAL(refreshUserData()));
 
     connect(m_listViewScreen, SIGNAL(toggleProgressIndicator(bool)), this,