Merge branch 'master' into save_message
authorVille Tiensuu <ville.tiensuu@ixonos.com>
Thu, 3 Jun 2010 12:19:43 +0000 (15:19 +0300)
committerVille Tiensuu <ville.tiensuu@ixonos.com>
Thu, 3 Jun 2010 12:19:43 +0000 (15:19 +0300)
src/engine/engine.cpp
src/engine/engine.h
src/src.pro
src/ui/mainwindow.cpp
src/ui/mainwindow.h
src/ui/updatelocation/updatelocationdialog.cpp
src/ui/updatelocation/updatelocationdialog.h
src/ui/userinfo.cpp
src/ui/userinfo.h
src/ui/userinfopanel.cpp
src/ui/userinfopanel.h

index 534a4c9..2457c1f 100644 (file)
@@ -486,6 +486,12 @@ void SituareEngine::signalsFromSituareService()
 
     connect(m_situareService, SIGNAL(updateWasSuccessful()),
             this, SLOT(updateWasSuccessful()));
+
+    connect(m_situareService, SIGNAL(updateWasSuccessful()),
+            this, SIGNAL(messageUpdatedToSituare()));
+
+    connect(this, SIGNAL(messageUpdatedToSituare()),
+            m_ui, SIGNAL(messageUpdatedToSituare()));
 }
 
 void SituareEngine::updateWasSuccessful()
index c568bc9..5f21a61 100644 (file)
@@ -254,6 +254,7 @@ signals:
     * @param friendList List of User instances (friends)
     */
     void friendsLocationsReady(QList<User *> &friendList);
+    void messageUpdatedToSituare();
 
     /**
     * @brief Signals when new user data is ready
index ceb28fe..2b065e2 100644 (file)
@@ -95,7 +95,7 @@ HEADERS += ui/mainwindow.h \
     network/networkreply.h
 QT += network \
     webkit
-DEFINES += QT_NO_DEBUG_OUTPUT
+#DEFINES += QT_NO_DEBUG_OUTPUT
 
 maemo5 | simulator {
     armel {
index 2ec3199..475f9b6 100644 (file)
@@ -243,6 +243,9 @@ void MainWindow::buildUserInfoPanel()
 
     connect(m_mapView, SIGNAL(viewResized(QSize)),
             m_userPanel, SLOT(screenResized(QSize)));
+
+    connect(this, SIGNAL(messageUpdatedToSituare()),
+            m_userPanel, SIGNAL(messageUpdatedToSituare()));
 }
 
 void MainWindow::buildWebView()
index e4b78fe..02bec91 100644 (file)
@@ -444,6 +444,8 @@ signals:
     */
     void updateCredentials(const QUrl &url);
 
+    void messageUpdatedToSituare();
+
     /**
     * @brief MapView has finished zooming
     */
index a578bb5..34bc85c 100755 (executable)
@@ -66,6 +66,8 @@ UpdateLocationDialog::UpdateLocationDialog(QWidget *parent)
 UpdateLocationDialog::~UpdateLocationDialog()
 {
     qDebug() << __PRETTY_FUNCTION__;
+
+    // emit m_textEdit sisältö userInfo luokalle talteen
 }
 
 void UpdateLocationDialog::setAddress(const QString &address)
@@ -76,10 +78,10 @@ void UpdateLocationDialog::setAddress(const QString &address)
 
 void UpdateLocationDialog::sendUpdate()
 {
-    qDebug() << __PRETTY_FUNCTION__;
+    qDebug() << __PRETTY_FUNCTION__;   
 
     // coordinates for this call will be get from somewhere, map etc...
-    emit statusUpdate(m_textEdit->toPlainText(), m_checkBox->isChecked());
+    emit statusUpdate(m_textEdit->toPlainText(), m_checkBox->isChecked());    
 
-    this->close();
+    //this->close();
 }
index 1464886..efb4546 100755 (executable)
@@ -69,7 +69,7 @@ public slots:
     *
     * @param address Street address, result from SituareService's reverseGeo
     */
-    void setAddress(const QString &address);
+    void setAddress(const QString &address);   
 
 private slots:
 
@@ -84,6 +84,7 @@ private slots:
  ******************************************************************************/
 
 signals:
+    void saveMessage(const QString &message);
 
     /**
     * @brief Signal Signal for requestLocationUpdate from SituareEngine via MainWindow class
@@ -98,6 +99,7 @@ signals:
  ******************************************************************************/
 
 private:
+    //bool m_messageReceivedOnSituareServer; ///< Indicates when message is received on Situare server
 
     QCheckBox *m_checkBox; ///< Pointer to CheckBox
     QLabel *m_locationLabel; ///< Pointer to locationLabel
index f0bec2f..3ab3afe 100644 (file)
@@ -267,7 +267,8 @@ void UserInfo::messageUpdate()
             &updateLocationDialog, SLOT(setAddress(QString)));
     connect(&updateLocationDialog, SIGNAL(statusUpdate(QString, bool)),
             this, SIGNAL(statusUpdate(QString, bool)));
+    connect(this, SIGNAL(messageUpdatedToSituare()),
+            &updateLocationDialog, SLOT(close()));
 
     updateLocationDialog.exec();
 }
-
index 7e3684f..c309695 100644 (file)
@@ -182,6 +182,7 @@ signals:
     * @param publish Publish on Facebook
     */
     void statusUpdate(const QString &status, const bool &publish);
+    void messageUpdatedToSituare();
 
 /******************************************************************************
 * DATA MEMBERS
index 33afd5e..a674e2d 100644 (file)
@@ -62,6 +62,9 @@ UserInfoPanel::UserInfoPanel(QWidget *parent)
 
     connect(m_userInfo, SIGNAL(refreshUserData()),
             this, SIGNAL(refreshUserData()));
+
+    connect(this, SIGNAL(messageUpdatedToSituare()),
+            m_userInfo, SIGNAL(messageUpdatedToSituare()));
 }
 
 void UserInfoPanel::userDataReceived(User *user)
index c0ab604..a539a10 100644 (file)
@@ -95,6 +95,7 @@ signals:
     * @param publish Publish on Facebook
     */
     void statusUpdate(const QString &status, const bool &publish);
+    void messageUpdatedToSituare();
 
 /*******************************************************************************
  * DATA MEMBERS