From: Katri Kaikkonen Date: Thu, 22 Jul 2010 07:06:25 +0000 (+0300) Subject: Merge branch 'master' into indicator X-Git-Tag: v2.0b-1~132^2~5 X-Git-Url: https://vcs.maemo.org/git/?a=commitdiff_plain;h=748d3f799acfd8fb3933264e9d1e9ae50547caa8;p=situare Merge branch 'master' into indicator Conflicts: src/engine/engine.cpp src/src.pro src/ui/mainwindow.h --- 748d3f799acfd8fb3933264e9d1e9ae50547caa8 diff --cc src/engine/engine.cpp index 86f3f15,035e793..53bc0ce --- a/src/engine/engine.cpp +++ b/src/engine/engine.cpp @@@ -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")); diff --cc src/engine/engine.h index 4914942,677021f..5fe1293 --- a/src/engine/engine.h +++ b/src/engine/engine.h @@@ -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 index ff30302,599d831..d03ee27 --- a/src/src.pro +++ b/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 \ @@@ -106,7 -115,19 +116,20 @@@ 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 diff --cc src/ui/mainwindow.cpp index c158b9b,b197454..8050556 --- a/src/ui/mainwindow.cpp +++ b/src/ui/mainwindow.cpp @@@ -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))); diff --cc src/ui/mainwindow.h index 16efacf,5a97afb..47aec72 --- a/src/ui/mainwindow.h +++ b/src/ui/mainwindow.h @@@ -38,7 -40,7 +40,8 @@@ class QWebView class FacebookAuthentication; class FullScreenButton; class FriendListPanel; +class IndicatorButton; + class GeoCoordinate; class MapScale; class MapScene; class MapView;