Merge branch 'userinfo' of https://vcs.maemo.org/git/situare into userinfo
authorlampehe-local <henri.lampela@ixonos.com>
Tue, 18 May 2010 05:17:59 +0000 (08:17 +0300)
committerlampehe-local <henri.lampela@ixonos.com>
Tue, 18 May 2010 05:17:59 +0000 (08:17 +0300)
Conflicts:
src/src.pro
src/ui/mainwindow.cpp

1  2 
src/src.pro
src/ui/mainwindow.cpp
src/ui/mainwindow.h
src/ui/mapviewscreen.cpp
src/ui/mapviewscreen.h

diff --cc src/src.pro
@@@ -39,8 -39,8 +39,9 @@@ SOURCES += main.cpp 
      map/friendgroupitem.cpp \
      map/frienditemshandler.cpp \
      gps/gpspositioninterface.cpp \
 +    map/gpslocationitem.cpp \
-     ui/zoombuttonpanel.cpp
+     ui/zoombuttonpanel.cpp \
+     ui/userinfo.cpp
  HEADERS += ui/mainwindow.h \
      ui/mapviewscreen.h \
      map/mapengine.h \
      map/friendgroupitem.h \
      map/frienditemshandler.h \
      gps/gpspositioninterface.h \
 +    map/gpslocationitem.h \
 +    gps/gpscommon.h \
      ui/zoombuttonpanel.h \
-     common.h
 -    situarecommon.h \
++    common.h \
+     ui/userinfo.h
  QT += network \
      webkit
 -#DEFINES += QT_NO_DEBUG_OUTPUT
 +DEFINES += QT_NO_DEBUG_OUTPUT
  
  !maemo5 {
      SOURCES += gps/gpspositionmockup.cpp
@@@ -77,11 -77,12 +77,17 @@@ MainWindow::MainWindow(QWidget *parent
      connect(this, SIGNAL(zoomOutKeyPressed()),
              m_mapViewScreen, SIGNAL(zoomOutKeyPressed()));
  
 +    connect(this, SIGNAL(requestOwnLocation()),
 +            m_mapViewScreen, SIGNAL(requestOwnLocation()));
 +    connect(m_mapViewScreen, SIGNAL(ownLocation(QPointF)),
 +            this, SIGNAL(ownLocation(QPointF)));
 +
+     connect(m_mapViewScreen, SIGNAL(requestReverseGeo()),
+             this, SIGNAL(requestReverseGeo()));
+     connect(m_mapViewScreen, SIGNAL(refreshUserData()),
+             this, SIGNAL(refreshUserData()));
      this->toggleProgressIndicator(true);
  
      grabZoomKeys(true);
Simple merge
@@@ -89,31 -84,24 +91,46 @@@ MapViewScreen::MapViewScreen(QWidget *p
      connect(this, SIGNAL(friendsLocationsReady(QList<User*>&)),
              m_mapEngine, SIGNAL(friendsLocationsReady(QList<User*>&)));
  
 -    connect(m_mapEngine, SIGNAL(mapScrolled()),
 -            this, SLOT(locationChanged()));
 +    connect(m_mapEngine, SIGNAL(mapScrolledManually()),
 +            this, SIGNAL(mapLocationChanged()));
 +
 +    connect(this, SIGNAL(positionReceived(QPointF,qreal)),
 +            m_mapEngine, SLOT(gpsPositionUpdate(QPointF,qreal)));
 +    connect(this, SIGNAL(enableAutoCentering(bool)),
 +            m_mapEngine, SLOT(setAutoCentering(bool)));
 +    connect(this, SIGNAL(gpsEnabled(bool)),
 +            m_mapEngine, SLOT(gpsEnabled(bool)));
 +
 +    connect(mapView, SIGNAL(viewResizedNewSize(int, int)),
 +            this, SLOT(drawOwnLocationCrosshair(int, int)));
 +
 +    connect(mapView, SIGNAL(viewResizedNewSize(int, int)),
 +             this, SLOT(setViewPortSize(int, int)));
 +
 +    connect(m_mapEngine, SIGNAL(requestToGetViewPortContents()),
 +            mapView, SLOT(viewportContent()));
 +    connect(mapView, SIGNAL(updateViewContent(QRect)),
 +            m_mapEngine, SLOT(receiveViewSceneRect(QRect)));
 +    connect(this, SIGNAL(requestOwnLocation()),
 +            m_mapEngine, SLOT(ownLocation()));
 +    connect(m_mapEngine, SIGNAL(ownLocation(QPointF)),
 +            this, SIGNAL(ownLocation(QPointF)));
  
+     connect(this, SIGNAL(userLocationReady(User*)),
+             m_userPanel, SLOT(userDataReceived(User*)));
+     connect(m_userPanel, SIGNAL(requestReverseGeo()),
+             this, SIGNAL(requestReverseGeo()));
+     connect(this, SIGNAL(reverseGeoReady(QString)),
+             m_userPanel, SIGNAL(reverseGeoReady(QString)));
+     connect(m_userPanel, SIGNAL(statusUpdate(QString,bool)),
+             this, SIGNAL(statusUpdate(QString,bool)));
+     connect(m_userPanel, SIGNAL(refreshUserData()),
+             this, SIGNAL(refreshUserData()));
      QHBoxLayout *mapViewLayout = new QHBoxLayout;
  
      m_osmLicense = new QLabel(this);
@@@ -106,37 -92,39 +106,64 @@@ signals
      */
      void friendsLocationsReady(QList<User *> &friendsList);
  
 -      /**
 +    /**
 +      * @brief Signal for GPS enabling / disabling
 +      *
 +      * @param enabled True is GPS is enabled, otherwise false
 +      */
 +    void gpsEnabled(bool enabled);
 +
 +    /**
      * @brief Signal for map location change.
      */
 -    void mapLocationChanged();  
 +    void mapLocationChanged();
 +
 +    /**
 +    * @brief Slot for GPS position.
 +    *
 +    * @param position latitude and longitude values
 +    * @param accuracy coordinate accuracy in metres
 +    */
 +    void positionReceived(QPointF position, qreal accuracy);
 +
 +    /**
 +    * @brief Signal from MapEngine to SituareEngine is travelling here
 +    */
 +    void ownLocation(QPointF ownLatitudeLongitudeLocation);
 +
 +    /**
 +    * @brief Signal from SituareEngine to MapEngine is travelling here
 +    */
 +    void requestOwnLocation();
  
      /**
+     * @brief Signal for refreshing user data.
+     *
+     */
+     void refreshUserData();
+     /**
+     * @brief Signal for requesting reverseGeo from SituareEngine
+     *
+     */
+     void requestReverseGeo();
+     /**
+     * @brief Signals, when address data is ready
+     *
+     * @param address Street address
+     */
+     void reverseGeoReady(const QString &address);
+     /**
+     * @brief Signal Signal for requestLocationUpdate from SituareEngine via MainWindow class
+     *
+     * @param status Status message
+     * @param publish Publish on Facebook
+     */
+     void statusUpdate(const QString &status, const bool &publish);
+     /**
      * @brief Signal when user location is fetched
      *
      * @param user User data