Merge branch 'master' into indicator
authorKatri Kaikkonen <katri.kaikkonen@ixonos.com>
Thu, 22 Jul 2010 07:06:25 +0000 (10:06 +0300)
committerKatri Kaikkonen <katri.kaikkonen@ixonos.com>
Thu, 22 Jul 2010 07:06:25 +0000 (10:06 +0300)
Conflicts:
src/engine/engine.cpp
src/src.pro
src/ui/mainwindow.h

1  2 
src/engine/engine.cpp
src/engine/engine.h
src/src.pro
src/ui/mainwindow.cpp
src/ui/mainwindow.h
src/ui/userinfopanel.h

@@@ -117,45 -145,35 +145,35 @@@ SituareEngine::~SituareEngine(
  
      QSettings settings(DIRECTORY_NAME, FILE_NAME);
      settings.setValue(SETTINGS_GPS_ENABLED, m_gps->isRunning());
 -    settings.setValue(SETTINGS_AUTO_CENTERING_ENABLED, m_autoCenteringEnabled);
 +//    settings.setValue(SETTINGS_AUTO_CENTERING_ENABLED, m_autoCenteringEnabled);
  }
  
 -void SituareEngine::changeAutoCenteringSetting(bool enabled)
 -{
 -    qDebug() << __PRETTY_FUNCTION__;
 +//void SituareEngine::changeAutoCenteringSetting(bool enabled)
 +//{
 +//    qDebug() << __PRETTY_FUNCTION__;
  
 -    m_autoCenteringEnabled = enabled;
 -    enableAutoCentering(enabled);
 -}
 +//    m_autoCenteringEnabled = enabled;
 +//    enableAutoCentering(enabled);
 +//}
  
 -void SituareEngine::disableAutoCentering()
 -{
 -    qDebug() << __PRETTY_FUNCTION__;
 +//void SituareEngine::disableAutoCentering()
 +//{
 +//    qDebug() << __PRETTY_FUNCTION__;
  
 -    changeAutoCenteringSetting(false);
 -    m_ui->buildInformationBox(tr("Auto centering disabled"));
 -}
 +//    changeAutoCenteringSetting(false);
 +//    m_ui->buildInformationBox(tr("Auto centering disabled"));
 +//}
  
- void SituareEngine::displayStateChanged(bool enabled)
- {
-     qDebug() << __PRETTY_FUNCTION__;
-     m_gps->enablePowerSave(!enabled);
- //    if (m_autoCenteringEnabled)
- //        enableAutoCentering(enabled);
- }
 -void SituareEngine::enableAutoCentering(bool enabled)
 -{
 -    qDebug() << __PRETTY_FUNCTION__;
 +//void SituareEngine::enableAutoCentering(bool enabled)
 +//{
 +//    qDebug() << __PRETTY_FUNCTION__;
  
 -    m_ui->setAutoCenteringButtonEnabled(enabled);
 -    m_mapEngine->setAutoCentering(enabled);
 +//    m_ui->setAutoCenteringButtonEnabled(enabled);
 +//    m_mapEngine->setAutoCentering(enabled);
  
 -    if (enabled)
 -        m_gps->requestLastPosition();
 -}
 +//    if (enabled)
 +//        m_gps->requestLastPosition();
 +//}
  
  void SituareEngine::enableGPS(bool enabled)
  {
@@@ -340,10 -378,10 +378,10 @@@ void SituareEngine::initializeGpsAndAut
  
          if (gpsEnabled.toString().isEmpty()) { // First start. Situare.conf file does not exists
  
-             connect(m_gps, SIGNAL(position(QPointF,qreal)),
-                     this, SLOT(setFirstStartZoomLevel(QPointF,qreal)));
+             connect(m_gps, SIGNAL(position(GeoCoordinate, qreal)),
+                     this, SLOT(setFirstStartZoomLevel()));
  
 -            changeAutoCenteringSetting(true);
 +//            changeAutoCenteringSetting(true);
              enableGPS(true);
  
              m_ui->buildInformationBox(tr("GPS enabled"));
@@@ -190,16 -192,9 +192,9 @@@ private slots
      /**
      * @brief Slot for disabling automatic centering when map is scrolled manually
      */
 -    void disableAutoCentering();
 +//    void disableAutoCentering();
  
      /**
-     * @brief Slot for display state changed.
-     *
-     * @param enabled true if enabled, false otherwise
-     */
-     void displayStateChanged(bool enabled);
-     /**
      * @brief Slot for auto centering enabling.
      *
      * Calls gps to send last known position
diff --cc src/src.pro
@@@ -54,8 -54,18 +54,19 @@@ SOURCES += main.cpp 
      user/user.cpp \
      ui/fullscreenbutton.cpp \
      engine/mce.cpp \
-     ui/indicatorbutton.cpp
- HEADERS += common.h \
++    ui/indicatorbutton.cpp \
+     routing/routingservice.cpp \
+     routing/routesegment.cpp \
+     routing/route.cpp \
+     map/maprouteitem.cpp \
+     coordinates/scenecoordinate.cpp \
+     coordinates/geocoordinate.cpp \
+     ui/listview.cpp \
+     ui/listitem.cpp \
+     ui/listitemdelegate.cpp \
+     ui/friendlistitemdelegate.cpp
+ HEADERS += application.h \
+     common.h \
      engine/engine.h \
      facebookservice/facebookauthentication.h \
      facebookservice/facebookcommon.h \
      user/user.h \
      ui/fullscreenbutton.h \
      engine/mce.h \
-     ui/indicatorbutton.h
++    ui/indicatorbutton.h \
+     routing/routingservice.h \
+     routing/routingcommon.h \
+     routing/routesegment.h \
+     routing/route.h \
+     map/maprouteitem.h \
+     map/osm.h \
+     coordinates/scenecoordinate.h \
+     coordinates/geocoordinate.h \
+     ui/listview.h \
+     ui/listitem.h \
+     ui/listitemdelegate.h \
+     ui/friendlistitemdelegate.h \
+     ui/listcommon.h
  QT += network \
      webkit
  
@@@ -58,10 -57,9 +58,10 @@@ MainWindow::MainWindow(QWidget *parent
      m_refresh(false),
      m_progressIndicatorCount(0),
      m_ownLocationCrosshair(0),
-     m_email(),    
+     m_email(),
      m_password(),
      m_fullScreenButton(0),
 +    m_indicatorButton(0),
      m_webView(0),
      m_mapScale(0),
      m_cookieJar(0)
@@@ -171,21 -167,13 +171,24 @@@ void MainWindow::buildFriendListPanel(
      connect(m_mapView, SIGNAL(viewResized(QSize)),
              m_friendsListPanelSidebar, SLOT(resizeSideBar(QSize)));
  
-     connect(m_friendsListPanel, SIGNAL(findFriend(QPointF)),
-             this, SIGNAL(findFriend(QPointF)));
+     connect(m_friendsListPanel, SIGNAL(findFriend(GeoCoordinate)),
+             this, SIGNAL(findFriend(GeoCoordinate)));
+     connect(this, SIGNAL(friendImageReady(User*)),
+             m_friendsListPanel, SLOT(friendImageReady(User*)));
  }
  
 +void MainWindow::buildIndicatorButton()
 +{
 +    qDebug() << __PRETTY_FUNCTION__;
 +
 +    m_indicatorButton = new IndicatorButton(this);
 +
 +    connect(m_indicatorButton, SIGNAL(triggered(bool)),
 +        this, SIGNAL(autoCenteringTriggered(bool)));
 +
 +}
 +
  void MainWindow::buildInformationBox(const QString &message, bool modal)
  {
      qDebug() << __PRETTY_FUNCTION__;
@@@ -243,14 -231,13 +246,14 @@@ void MainWindow::buildMap(
      buildOsmLicense();
      buildManualLocationCrosshair();
      buildFullScreenButton();
 +    buildIndicatorButton();
      buildMapScale();
  
-     connect(m_mapView, SIGNAL(viewScrolled(QPoint)),
-             this, SIGNAL(mapViewScrolled(QPoint)));
+     connect(m_mapView, SIGNAL(viewScrolled(SceneCoordinate)),
+             this, SIGNAL(mapViewScrolled(SceneCoordinate)));
  
-     connect(this, SIGNAL(centerToSceneCoordinates(QPoint)),
-             m_mapView, SLOT(centerToSceneCoordinates(QPoint)));
+     connect(this, SIGNAL(centerToSceneCoordinates(SceneCoordinate)),
+             m_mapView, SLOT(centerToSceneCoordinates(SceneCoordinate)));
  
      connect(m_mapView, SIGNAL(viewResized(QSize)),
              this, SIGNAL(mapViewResized(QSize)));
@@@ -38,7 -40,7 +40,8 @@@ class QWebView
  class FacebookAuthentication;
  class FullScreenButton;
  class FriendListPanel;
 +class IndicatorButton;
+ class GeoCoordinate;
  class MapScale;
  class MapScene;
  class MapView;
Simple merge