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)
{
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"));
/**
* @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
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
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)
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__;
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)));
class FacebookAuthentication;
class FullScreenButton;
class FriendListPanel;
+class IndicatorButton;
+ class GeoCoordinate;
class MapScale;
class MapScene;
class MapView;