Kaj Wallin - kaj.wallin@ixonos.com
Henri Lampela - henri.lampela@ixonos.com
Jussi Laitinen jussi.laitinen@ixonos.com
+ Sami Rämö - sami.ramo@ixonos.com
Situare is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
m_ui = new MainWindow;
// build MapEngine
-
m_mapEngine = new MapEngine(this);
m_ui->setMapViewScene(m_mapEngine->scene());
// build GPS
-
#ifdef Q_WS_MAEMO_5
m_gps = new GPSPosition(this);
#else
m_gps->setMode(GPSPositionInterface::Default);
// build SituareService
-
m_situareService = new SituareService(this);
// build FacebookAuthenticator
-
m_facebookAuthenticator = new FacebookAuthentication(this);
// connect signals
-
signalsFromMapEngine();
signalsFromGPS();
signalsFromSituareService();
signalsFromMainWindow();
-
- connect(m_facebookAuthenticator, SIGNAL(credentialsReady(FacebookCredentials)),
- m_situareService, SLOT(credentialsReady(FacebookCredentials)));
- connect(m_facebookAuthenticator, SIGNAL(credentialsReady(FacebookCredentials)),
- this, SLOT(loginOk()));
+ signalsFromFacebookAuthenticator();
connect(this, SIGNAL(userLocationReady(User*)),
m_ui, SIGNAL(userLocationReady(User*)));
+
connect(this, SIGNAL(friendsLocationsReady(QList<User*>&)),
m_ui, SIGNAL(friendsLocationsReady(QList<User*>&)));
- connect(m_facebookAuthenticator, SIGNAL(newLoginRequest(QUrl)),
- m_ui, SLOT(startLoginProcess(QUrl)));
- connect(m_ui, SIGNAL(updateCredentials(QUrl)),
- m_facebookAuthenticator, SLOT(updateCredentials(QUrl)));
- connect(m_facebookAuthenticator, SIGNAL(loginFailure()),
- m_ui, SLOT(loginFailed()));
-
QSettings settings(DIRECTORY_NAME, FILE_NAME);
QVariant gpsEnabled = settings.value(SETTINGS_GPS_ENABLED);
QVariant autoCenteringEnabled = settings.value(SETTINGS_AUTO_CENTERING_ENABLED);
}
}
+void SituareEngine::signalsFromFacebookAuthenticator()
+{
+ connect(m_facebookAuthenticator, SIGNAL(credentialsReady(FacebookCredentials)),
+ m_situareService, SLOT(credentialsReady(FacebookCredentials)));
+
+ connect(m_facebookAuthenticator, SIGNAL(credentialsReady(FacebookCredentials)),
+ this, SLOT(loginOk()));
+
+ connect(m_facebookAuthenticator, SIGNAL(newLoginRequest(QUrl)),
+ m_ui, SLOT(startLoginProcess(QUrl)));
+
+ connect(m_facebookAuthenticator, SIGNAL(loginFailure()),
+ m_ui, SLOT(loginFailed()));
+}
+
void SituareEngine::signalsFromGPS()
{
connect(m_gps, SIGNAL(position(QPointF,qreal)),
void SituareEngine::signalsFromMainWindow()
{
- // signals from map view
+ connect(m_ui, SIGNAL(updateCredentials(QUrl)),
+ m_facebookAuthenticator, SLOT(updateCredentials(QUrl)));
+ // signals from map view
connect(m_ui, SIGNAL(mapViewScrolled(QPoint)),
m_mapEngine, SLOT(setLocation(QPoint)));
connect(m_ui, SIGNAL(mapViewResized(QSize)),
m_mapEngine, SLOT(viewResized(QSize)));
- connect(m_ui, SIGNAL(updateMapViewContent(QRect)),
- m_mapEngine, SLOT(receiveViewSceneRect(QRect)));
-
connect(m_ui, SIGNAL(viewZoomFinished()),
m_mapEngine, SLOT(viewZoomFinished()));
// signals from zoom buttons (zoom panel and volume buttons)
-
connect(m_ui, SIGNAL(zoomIn()),
m_mapEngine, SLOT(zoomIn()));
m_mapEngine, SLOT(zoomOut()));
// signals from menu buttons
-
connect(m_ui, SIGNAL(autoCenteringTriggered(bool)),
this, SLOT(changeAutoCenteringSetting(bool)));
this, SLOT(enableGPS(bool)));
//signals from dialogs
-
connect(m_ui, SIGNAL(cancelLoginProcess()),
this, SLOT(loginProcessCancelled()));
this, SLOT(requestUpdateLocation(QString,bool)));
// signals from user info tab
-
connect(m_ui, SIGNAL(refreshUserData()),
this, SLOT(refreshUserData()));
// signals from friend list tab
-
connect(m_ui, SIGNAL(findFriend(QPointF)),
m_mapEngine, SLOT(setViewLocation(QPointF)));
}
connect(m_mapEngine, SIGNAL(mapScrolledManually()),
this, SLOT(disableAutoCentering()));
-// connect(m_mapEngine, SIGNAL(ownLocation(QPointF)),
-// this, SIGNAL(ownLocation(QPointF)));
-
connect(m_mapEngine, SIGNAL(maxZoomLevelReached()),
m_ui, SIGNAL(maxZoomLevelReached()));
Kaj Wallin - kaj.wallin@ixonos.com
Henri Lampela - henri.lampela@ixonos.com
Jussi Laitinen - jussi.laitinen@ixonos.com
+ Sami Rämö - sami.ramo@ixonos.com
Situare is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
*
* This class handles all the underlaying login of the Situare
* application.
-*
-* @class SituareEngine engine.h "engine/engine.h"
*/
class SituareEngine : public QObject
{
void loginOk();
/**
+ * @brief Slot to intercept signal when user has cancelled login process
+ */
+ void loginProcessCancelled();
+
+ /**
* @brief Calls reverseGeo from SituareService to translate coordinates to street address
*
*/
*/
void userDataChanged(User *user, QList<User *> &friendsList);
+private:
/**
- * @brief Slot for auto centering enabling.
- *
- * Calls gps to send last known position
- * @param enabled true if auto centering was enabled, false otherwise
- */
- void enableAutoCentering(bool enabled);
-
- /**
- * @brief Slot for gps enabling.
- *
- * @param enabled true if gps should be enabled, false otherwise
- */
- void enableGPS(bool enabled);
-
- /**
- * @brief Slot to intercept signal when user has cancelled login process
- */
- void loginProcessCancelled();
-
-private slots:
-
- void changeAutoCenteringSetting(bool enabled);
-
- /**
- * @brief Slot for disabling automatic centering when map is scrolled manually
+ * @brief Connect signals coming from Facdebook authenticator
*/
- void disableAutoCentering();
+ void signalsFromFacebookAuthenticator();
-private:
/**
* @brief Connect signals coming from GPS
*/
*/
void signalsFromSituareService();
+private slots:
+ /**
+ * @brief Set auto centering feature enabled / disabled
+ */
+ void changeAutoCenteringSetting(bool enabled);
+
+ /**
+ * @brief Slot for disabling automatic centering when map is scrolled manually
+ */
+ void disableAutoCentering();
+
+ /**
+ * @brief Slot for auto centering enabling.
+ *
+ * Calls gps to send last known position
+ *
+ * @param enabled true if auto centering was enabled, false otherwise
+ */
+ void enableAutoCentering(bool enabled);
+
+ /**
+ * @brief Slot for gps enabling.
+ *
+ * @param enabled true if gps should be enabled, false otherwise
+ */
+ void enableGPS(bool enabled);
+
/*******************************************************************************
* SIGNALS
******************************************************************************/
* DATA MEMBERS
******************************************************************************/
private:
- bool m_autoCenteringEnabled; ///< Auto centering enabled
+ bool m_autoCenteringEnabled; ///< Auto centering enabled
- QPointF m_latestLocation; ///< Placeholder for user's latest asked location
+ QPointF m_latestLocation; ///< Placeholder for user's latest asked location
FacebookAuthentication *m_facebookAuthenticator; ///< Instance for facebook authenticator
- GPSPositionInterface *m_gps; ///< Instance of the gps position
- MainWindow *m_ui; ///< Instance of the MainWindow UI
- MapEngine *m_mapEngine; ///< MapEngine
- SituareService *m_situareService; ///< Instance of the situare server communication service
+ GPSPositionInterface *m_gps; ///< Instance of the gps position
+ MainWindow *m_ui; ///< Instance of the MainWindow UI
+ MapEngine *m_mapEngine; ///< MapEngine
+ SituareService *m_situareService; ///< Instance of the situare server communication service
};
#endif // ENGINE_H
#include "maptile.h"
MapEngine::MapEngine(QObject *parent)
- : QObject(parent)
- , m_autoCenteringEnabled(false)
- , m_centerTile(QPoint(UNDEFINED, UNDEFINED))
- , m_lastManualPosition(QPoint(0, 0))
- , m_viewSize(QSize(DEFAULT_SCREEN_WIDTH, DEFAULT_SCREEN_HEIGHT))
- , m_zoomedIn(false)
- , m_zoomLevel(DEFAULT_ZOOM_LEVEL)
+ : QObject(parent),
+ m_autoCenteringEnabled(false),
+ m_zoomedIn(false),
+ m_zoomLevel(DEFAULT_ZOOM_LEVEL),
+ m_centerTile(QPoint(UNDEFINED, UNDEFINED)),
+ m_lastManualPosition(QPoint(0, 0)),
+ m_viewSize(QSize(DEFAULT_SCREEN_WIDTH, DEFAULT_SCREEN_HEIGHT))
{
qDebug() << __PRETTY_FUNCTION__;
return convertSceneCoordinateToLatLon(m_zoomLevel, m_sceneCoordinate);
}
-
-void MapEngine::receiveViewSceneRect(QRect viewSceneRect)
-{
- qDebug() << __PRETTY_FUNCTION__;
-
- m_viewArea = viewSceneRect;
-}
* MEMBER FUNCTIONS AND SLOTS
******************************************************************************/
public:
+ /**
+ * @brief Coordinates of the current center point
+ *
+ * @return Current coordinates (latitude & longitude)
+ */
QPointF centerGeoCoordinate();
/**
static QPoint convertLatLonToSceneCoordinate(QPointF latLonCoordinate);
/**
+ * @brief converts scene coordinates to latitude and longitude
+ *
+ * @param zoomLevel current zoom level
+ * @param sceneCoordinate that will be converted
+ */
+ QPointF convertSceneCoordinateToLatLon(int zoomLevel, QPoint sceneCoordinate);
+
+ /**
* @brief Convert MapScene coordinate to tile x & y numbers.
*
* @param zoomLevel ZoomLevel
*/
static QString tilePath(int zoomLevel, int x, int y);
+public slots:
/**
- * @brief converts scene coordinates to latitude and longitude
+ * @brief Slot to catch user own location data
*
- * @param current zoom level
- * @param sceneCoordinate that will be converted
+ * @param user User info
*/
- QPointF convertSceneCoordinateToLatLon(int zoomLevel, QPoint sceneCoordinate);
+ void receiveOwnLocation(User *user);
-public slots:
/**
* @brief Set auto centering.
*
*/
void viewResized(const QSize &size);
- /**
- * @brief Slot to catch user own location data
- *
- * @param user User info
- */
- void receiveOwnLocation(User *user);
-
- /**
- * @brief Slot to receive visible area of map scene
- *
- * @param visible area of map scene
- */
- void receiveViewSceneRect(QRect viewSceneRect);
-
private:
/**
* @brief Calculate grid of tile coordinates from current scene coordinate.
QRect calculateTileGrid(QPoint sceneCoordinate);
/**
+ * @brief Check if auto centering should be disabled.
+ *
+ * @param sceneCoordinate scene's center coordinate
+ * @return bool true if auto centering should be disabled
+ */
+ bool disableAutoCentering(QPoint sceneCoordinate);
+
+ /**
* @brief Get new tiles.
*
* Calculates which tiles has to be fetched. Does emit fetchImage for tiles which
bool isCenterTileChanged(QPoint sceneCoordinate);
/**
- * @brief Check if auto centering should be disabled.
- *
- * @param sceneCoordinate scene's center coordinate
- * @return bool true if auto centering should be disabled
- */
- bool disableAutoCentering(QPoint sceneCoordinate);
-
- /**
* @brief Calculate maximum value for tile in this zoom level.
*
* @param zoomLevel zoom level
/**
* @brief Slot for zooming in
- *
*/
void zoomIn();
/**
* @brief Slot for zooming out
- *
*/
void zoomOut();
void friendsLocationsReady(QList<User *> &friendsList);
/**
- * @brief Signal for view location change
+ * @brief Request view centering to new locaiton
*
* @param sceneCoordinate New scene coordinates
*/
void minZoomLevelReached();
/**
- * @brief Signal for zoom level change
+ * @brief Request view changing zoom level
*
* @param newZoomLevel New zoom level
*/
* DATA MEMBERS
******************************************************************************/
private:
- bool m_autoCenteringEnabled; ///< Auto centering enabled
- QPoint m_centerTile; ///< Current center tile
- FriendItemsHandler *m_friendItemsHandler; ///< Handler for friend and group items
- GPSLocationItem *m_gpsLocationItem; ///< Item pointing current location from GPS
- QPoint m_lastManualPosition; ///< Last manually set position in scene coordinate
- MapFetcher *m_mapFetcher; ///< Fetcher for map tiles
- MapScene *m_mapScene; ///< Scene for map tiles
- OwnLocationItem *m_ownLocation; ///< Item to show own location
- QPoint m_sceneCoordinate; ///< Current center coordinate
- QRect m_viewTilesGrid; ///< Current grid of tiles in view (includes margin)
- QSize m_viewSize; ///< Current view size
- bool m_zoomedIn; ///< Flag for checking if zoomed in when zoom is finished
- int m_zoomLevel; ///< Current zoom level
- QRect m_viewArea; ///< Visible area of map scene
+ bool m_autoCenteringEnabled; ///< Auto centering enabled
+ bool m_zoomedIn; ///< Flag for checking if zoomed in when zoom is finished
+
+ int m_zoomLevel; ///< Current zoom level
+
+ QPoint m_centerTile; ///< Current center tile
+ QPoint m_lastManualPosition; ///< Last manually set position in scene coordinate
+ QPoint m_sceneCoordinate; ///< Current center coordinate
+
+ QRect m_viewTilesGrid; ///< Current grid of tiles in view (includes margin)
+
+ QSize m_viewSize; ///< Current view size
+
+ FriendItemsHandler *m_friendItemsHandler; ///< Handler for friend and group items
+ GPSLocationItem *m_gpsLocationItem; ///< Item pointing current location from GPS
+ MapFetcher *m_mapFetcher; ///< Fetcher for map tiles
+ MapScene *m_mapScene; ///< Scene for map tiles
+ OwnLocationItem *m_ownLocation; ///< Item to show own location
};
#endif // MAPENGINE_H
this, SIGNAL(viewZoomFinished()));
}
-void MapView::setZoomLevel(int zoomLevel)
-{
- qDebug() << __PRETTY_FUNCTION__;
-
- if (m_zoomAnimation) {
- m_zoomAnimation->stop();
- m_zoomAnimation->setDuration(ZOOM_TIME);
- m_zoomAnimation->setStartValue(viewScale());
- m_zoomAnimation->setEndValue(pow(2, zoomLevel - MAX_MAP_ZOOM_LEVEL));
-
- m_zoomAnimation->start();
- }
-}
-
-qreal MapView::viewScale()
-{
- qDebug() << __PRETTY_FUNCTION__;
-
- return transform().m11();
-}
-
-void MapView::setViewScale(qreal viewScale)
+void MapView::centerToSceneCoordinates(QPoint sceneCoordinate)
{
- qDebug() << __PRETTY_FUNCTION__;
+ qDebug() << __PRETTY_FUNCTION__ << "sceneCoordinate" << sceneCoordinate;
- QTransform transform;
- transform.scale(viewScale, viewScale);
- setTransform(transform);
+ centerOn(sceneCoordinate);
}
void MapView::mouseMoveEvent(QMouseEvent *event)
m_scenePosition = mapToScene(width() / 2 - 1, height() / 2 - 1).toPoint();
}
-void MapView::centerToSceneCoordinates(QPoint sceneCoordinate)
-{
- qDebug() << __PRETTY_FUNCTION__ << "sceneCoordinate" << sceneCoordinate;
-
- centerOn(sceneCoordinate);
-}
-
void MapView::resizeEvent(QResizeEvent *event)
{
qDebug() << __PRETTY_FUNCTION__ << "Resize:" << event->size();
emit viewResizedNewSize(viewport()->width(), viewport()->height());
}
-QRect MapView::viewportContent()
+void MapView::setViewScale(qreal viewScale)
+{
+ qDebug() << __PRETTY_FUNCTION__;
+
+ QTransform transform;
+ transform.scale(viewScale, viewScale);
+ setTransform(transform);
+}
+
+void MapView::setZoomLevel(int zoomLevel)
{
- QPoint topLeft = mapToScene(viewport()->contentsRect().topLeft()).toPoint();
- QPoint bottomRight = mapToScene(viewport()->contentsRect().bottomRight()).toPoint();
- emit updateViewContent(QRect(topLeft, bottomRight));
+ qDebug() << __PRETTY_FUNCTION__;
+
+ if (m_zoomAnimation) {
+ m_zoomAnimation->stop();
+ m_zoomAnimation->setDuration(ZOOM_TIME);
+ m_zoomAnimation->setStartValue(viewScale());
+ m_zoomAnimation->setEndValue(pow(2, zoomLevel - MAX_MAP_ZOOM_LEVEL));
- return QRect(topLeft, bottomRight);
+ m_zoomAnimation->start();
+ }
}
+qreal MapView::viewScale()
+{
+ qDebug() << __PRETTY_FUNCTION__;
+
+ return transform().m11();
+}
*/
void setZoomLevel(int zoomLevel);
- /**
- * @brief Slot for catching request to get view port contents.
- * implementation of this slot sends signal that includes visble area of view port.
- */
- QRect viewportContent();
-
private:
/**
* @brief Set new view scale
void viewResized(const QSize &size);
/**
+ * @brief Signal for drawing OSM license
+ *
+ * Signal is emitted when view is resized.
+ * @param width Viewport width
+ * @param height Viewport height
+ */
+ void viewResizedNewSize(int width, int height);
+
+ /**
* @brief Signal for view scroll events
*
* Signal is emitted when view is scrolled.
*/
void viewZoomFinished();
- /**
- * @brief Signal for updating view content
- *
- * Signal is emitted when view content needs an update.
- * @param viewTopLeft Scene coordinate of the viewport top left corner
- */
- void viewContentChanged(QPoint viewTopLeft);
-
- /**
- * @brief Signal that sends visible area of map scene
- *
- * @param viewArea visible area of map scene
- */
- void updateViewContent(QRect viewArea);
-
- /**
- * @brief Signal for drawing OSM license
- *
- * Signal is emitted when view is resized.
- * @param width Viewport width
- * @param height Viewport height
- */
- void viewResizedNewSize(int width, int height);
-
/*******************************************************************************
* DATA MEMBERS
******************************************************************************/
private:
- QPoint m_mousePosition; ///< Previous mouse event position
- QPoint m_scenePosition; ///< New center position
- QPropertyAnimation *m_zoomAnimation; ///< Zoom animation
+ QPoint m_mousePosition; ///< Previous mouse event position
+ QPoint m_scenePosition; ///< New center position
+ QPropertyAnimation *m_zoomAnimation; ///< Zoom animation
};
#endif // MAPVIEW_H
RESOURCES += ../images.qrc
SOURCES += main.cpp \
ui/mainwindow.cpp \
- ui/mapviewscreen.cpp \
situareservice/situareservice.cpp \
situareservice/imagefetcher.cpp \
facebookservice/facebookcredentials.cpp \
ui/zoombuttonpanel.cpp \
ui/userinfo.cpp
HEADERS += ui/mainwindow.h \
- ui/mapviewscreen.h \
map/mapengine.h \
map/mapview.h \
map/mapscene.h \
Henri Lampela - henri.lampela@ixonos.com
Kaj Wallin - kaj.wallin@ixonos.com
Jussi Laitinen jussi.laitinen@ixonos.com
+ Sami Rämö - sami.ramo@ixonos.com
Situare is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
#endif // Q_WS_MAEMO_5
#include "mainwindow.h"
-//#include "mapviewscreen.h"
#include "settingsdialog.h"
#include "facebookservice/facebookauthentication.h"
#include "common.h"
#include "friendlistpanel.h"
-#include "map/mapengine.h"
#include "map/mapview.h"
#include "panelsidebar.h"
#include "userpanel.h"
#include "zoombuttonpanel.h"
-
-
#include <QtGui/QX11Info>
#include <X11/Xlib.h>
#include <X11/Xatom.h>
connect(this, SIGNAL(zoomLevelChanged(int)),
m_mapView, SLOT(setZoomLevel(int)));
+
+ connect(m_mapView, SIGNAL(viewZoomFinished()),
+ this, SIGNAL(viewZoomFinished()));
}
void MainWindow::buildOsmLicense()
#endif
}
-void MainWindow::toggleProgressIndicator(bool value)
-{
- qDebug() << __PRETTY_FUNCTION__;
-#ifdef Q_WS_MAEMO_5
- setAttribute(Qt::WA_Maemo5ShowProgressIndicator, value);
-#else
- Q_UNUSED(value);
-#endif // Q_WS_MAEMO_5
-}
-
void MainWindow::startLoginProcess(const QUrl &url)
{
qDebug() << __PRETTY_FUNCTION__;
m_refresh = true;
}
}
+
+void MainWindow::toggleProgressIndicator(bool value)
+{
+ qDebug() << __PRETTY_FUNCTION__;
+#ifdef Q_WS_MAEMO_5
+ setAttribute(Qt::WA_Maemo5ShowProgressIndicator, value);
+#else
+ Q_UNUSED(value);
+#endif // Q_WS_MAEMO_5
+}
Henri Lampela - henri.lampela@ixonos.com
Kaj Wallin - kaj.wallin@ixonos.com
+ Sami Rämö - sami.ramo@ixonos.com
Situare is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
/**
* @brief Main Window Class
-*
-* @class MainWindow mainwindow.h "src/ui/mainwindow.h"
*/
class MainWindow : public QMainWindow
{
*/
void openSettingsDialog();
- //////////////////////
-
/**
* @brief Public slot to intercept signal when old cerdentials are invalid or credentials
* doesn't exist yet
void toggleProgressIndicator(bool state);
private:
-
+ /**
+ * @brief Build friend list panel and connect slots
+ */
void buildFriendListPanel();
+ /**
+ * @brief Build manual location setting cross hair and connect slots
+ */
void buildManualLocationCrosshair();
+ /**
+ * @brief Build map and connect slots
+ */
void buildMap();
+ /**
+ * @brief Build OSM license and connect slots
+ */
void buildOsmLicense();
+ /**
+ * @brief Build user info panel and connect slots
+ */
void buildUserInfoPanel();
+ /**
+ * @brief Build zoom button panel and connect slots
+ */
void buildZoomButtonPanel();
/**
void grabZoomKeys(bool grab);
/**
- * @brief Set own location crosshair visibility
- *
- * @param visibility
- */
+ * @brief Set own location crosshair visibility
+ *
+ * @param visible
+ */
void setOwnLocationCrosshairVisibility(bool visible);
private slots:
-// void autoCenteringToggledActions(bool enabled);
-
/**
* @brief Slot for drawing the Open Street Map license text
*
*/
void gpsTimeout();
-// void gpsToggledActions(bool enabled);
-
/**
* @brief Slot to intercept signal when webview has finished loading webpage
*
*/
void gpsTriggered(bool enabled);
-// /**
-// * @brief Signal for auto centering enabling.
-// *
-// * @param enabled if auto centering should be enabled
-// */
-// void enableAutoCentering(bool enabled);
-
/**
* @brief Signal for finding friend.
*
*/
void mapViewResized(const QSize &size);
+ /**
+ * @brief Forwarding signal from MapView to MapEngine
+ *
+ * @param sceneCoordinate
+ */
void mapViewScrolled(QPoint sceneCoordinate);
+ /**
+ * @brief Forwarding signal from MapEngine to MapView
+ */
void maxZoomLevelReached();
+ /**
+ * @brief Forwarding signal from MapEngine to MapView
+ */
void minZoomLevelReached();
/**
void refreshUserData();
/**
- * @brief Signal from SituareEngine to MapEngine is travelling here
- */
- void requestOwnLocation();
-
- /**
* @brief Signal for requesting reverseGeo from SituareEngine
*
*/
void updateCredentials(const QUrl &url);
/**
- * @brief Map view port content update
- *
- * @param viewArea visible area of map scene
- */
- void updateMapViewContent(QRect viewArea);
-
- /**
* @brief MapView has finished zooming
*/
void viewZoomFinished();
*/
void zoomIn();
+ /**
+ * @brief Forwarding signal from MapEngine to MapView
+ */
void zoomLevelChanged(int zoomLevel);
/**
+++ /dev/null
-/*
- Situare - A location system for Facebook
- Copyright (C) 2010 Ixonos Plc. Authors:
-
- Kaj Wallin - kaj.wallin@ixonos.com
-
- Situare is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License
- version 2 as published by the Free Software Foundation.
-
- Situare is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with Situare; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
- USA.
-*/
-
-#include "mapviewscreen.h"
-#include "map/mapview.h"
-#include "panelcommon.h"
-#include "panelsidebar.h"
-
-MapViewScreen::MapViewScreen(QWidget *parent)
- : QWidget(parent)
-
-{
-
-
-// QHBoxLayout *mapViewLayout = new QHBoxLayout;
-
-
-
-// mapViewLayout->addWidget(mapView);
-// setLayout(mapViewLayout);
-
-// mapViewLayout->setMargin(0);
-
-
-
-// setObjectName("Map view");
-}
-
-
-
-
-
-
-
-
-
+++ /dev/null
- /*
- Situare - A location system for Facebook
- Copyright (C) 2010 Ixonos Plc. Authors:
-
- Kaj Wallin - kaj.wallin@ixonos.com
-
- Situare is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License
- version 2 as published by the Free Software Foundation.
-
- Situare is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with Situare; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
- USA.
- */
-
-
-#ifndef MAPVIEWTAB_H
-#define MAPVIEWTAB_H
-
-#include <QtGui>
-
-#include "map/mapengine.h"
-#include "friendlistpanel.h"
-#include "userpanel.h"
-#include "zoombuttonpanel.h"
-
-/**
-* @brief Map View class. Used to display Map
-*/
-class MapViewScreen : public QWidget
-{
- Q_OBJECT
-
-public:
- /**
- * @brief Constructor
- *
- * @param parent Parent
- */
- MapViewScreen(QWidget *parent = 0);
-
-/*******************************************************************************
- * MEMBER FUNCTIONS AND SLOTS
- ******************************************************************************/
-public slots:
-
-
-private slots:
-
-
-
-
-// /**
-// * @brief Slot for map location change.
-// */
-// void locationChanged();
-
-
-/*******************************************************************************
- * SIGNALS
- ******************************************************************************/
-signals:
- /**
- * @brief Signal for enabling auto centering.
- *
- * @param enabled true if map should center to GPS position, false otherwise
- */
- void enableAutoCentering(bool enabled);
-
- /**
- * @brief Signal when friend list locations are fetched
- *
- * Forwarded to map engine and friends list panel
- *
- * @param friendsList Friends list data
- */
- 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();
-
- /**
- * @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
- */
- void userLocationReady(User *user);
-
- /**
- * @brief Signal for HW increase button
- */
- void zoomInKeyPressed();
-
- /**
- * @brief Signal for HW decrease button
- */
- void zoomOutKeyPressed();
-
-/*******************************************************************************
- * DATA MEMBERS
- ******************************************************************************/
-private:
-
-};
-
-#endif // MAPVIEWTAB_H