const int MIN_VIEW_ZOOM_LEVEL = 2; ///< Minimum zoom level for MapView
const int MIN_MAP_SCENE_NORMAL_LEVEL = MAX_MAP_ZOOM_LEVEL + 1;
+/**
- * \var FRIEND_LOCATION_ICON_Z_LEVEL
- * \brief layer of friend location icon
++* @var FRIEND_LOCATION_ICON_Z_LEVEL
++* @brief layer of friend location icon
+*/
+const int FRIEND_LOCATION_ICON_Z_LEVEL = MIN_MAP_SCENE_NORMAL_LEVEL + MAX_MAP_ZOOM_LEVEL + 1;
+
+/**
- * \var OWN_LOCATION_ICON_Z_LEVEL
- * \brief layer of own location icon
++* @var OWN_LOCATION_ICON_Z_LEVEL
++* @brief layer of own location icon
+*/
+const int OWN_LOCATION_ICON_Z_LEVEL = FRIEND_LOCATION_ICON_Z_LEVEL + 1;
+
+const int MAP_ZOOM_PANEL_LEVEL = OWN_LOCATION_ICON_Z_LEVEL + 1; ///< Zepth of zoom panel (Z-axis)
+
-
const int ZOOM_FPS = 30; ///< FPS for the zoom effect
const qreal ZOOM_TIME = 250; ///< Length of the zoom effect (ms)
static const int MAP_ZOOM_PANEL_BUTTON_SIZE = 74; ///< Size of a zoom panel button
static const int MAP_OWN_LOCATION_ICON_SIZE = 24; ///< Size of own location item icon
-static const int OWN_LOCATION_ICON_Z_LEVEL = MAP_ZOOM_PANEL_LEVEL - 1; ///< Z-Level of own location icon
-
const qreal MAX_LATITUDE = 85.05112877980659237802; ///< Maximum latitude value
const qreal MIN_LATITUDE = -MAX_LATITUDE; ///< Minimum latitude value
const qreal MIN_LONGITUDE = -180.0; ///< Minimum longitude value
const int GRID_PADDING = 1; ///< Grid padding used in tile grid calculation
/**
--* \var UNDEFINED
--* \brief Value to be used when zoom level, tile numbers or position are not defined
++* @var UNDEFINED
++* @brief Value to be used when zoom level, tile numbers or position are not defined
*/
const int UNDEFINED = -1;
*/
void viewResized(const QSize &size);
+ void receiveOwnLocation(User *user);
+ void receiveFriendLocations(QList<User *> &friendsList);
+
private:
/**
- * @brief Build URL for donwloading single map tile from OpenStreetMap tile server
- *
- * @param zoomLevel Zoom level
- * @param tileNumbers Tile x & y numbers
- * @return URL for the required tile
- */
- QUrl buildURL(int zoomLevel, QPoint tileNumbers);
-
- /**
* @brief Calculate grid of tile coordinates from current scene coordinate.
*
* Grid size is calculated from view size and scene's current center coordinate.
foreach (QGraphicsItem *collidingItem, collidingItems) {
MapTile *collidingTile = dynamic_cast<MapTile *>(collidingItem);
if (collidingTile) {
- // remove tile if it is fully obscured by new tile
- QRectF collidingTileSceneRect = collidingTile->sceneBoundingRect();
- if (newTileSceneRect.contains(collidingTileSceneRect))
- removeTile(collidingTile);
+ if (newTile->zValue() > collidingTile->zValue()) {
+ // remove tile if it is fully obscured by new tile
+ QRectF collidingTileSceneRect = collidingTile->sceneBoundingRect();
+ if (newTileSceneRect.contains(collidingTileSceneRect))
+ removeTile(collidingTile);
+ }
-
}
}
}
ui/infotab.cpp \
ui/updatelocation/updatelocationdialog.cpp \
ui/updatelocation/texteditautoresizer.cpp \
+ ui/friendlistview.cpp \
+ ui/friendlistitem.cpp \
- engine/engine.cpp \
user/user.cpp \
ui/buttonitem.cpp \
ui/situareuser.cpp \
facebookservice/facebookcredentials.h \
facebookservice/facebookauthentication.h \
facebookservice/facebookcommon.h \
+ ui/friendlistview.h \
+ ui/friendlistitem.h \
- engine/engine.h \
+ user/user.h \
ui/buttonitem.h \
ui/situareuser.h \
- ui/settingsdialog.h
+ engine/engine.h \
- user/user.h \
+ ui/settingsdialog.h \
+ map/maptilerequest.h
QT += network \
webkit
-
+ DEFINES += QT_NO_DEBUG_OUTPUT
!maemo5 {
message(QJson built in)
message(Make sure you have QJson development headers installed)