Sami Rämö - sami.ramo@ixonos.com
Jussi Laitinen - jussi.laitinen@ixonos.com
Pekka Nissinen - pekka.nissinen@ixonos.com
+ Ville Tiensuu - ville.tiensuu@ixonos.com
Situare is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
* @author Sami Rämö - sami.ramo (at) ixonos.com
* @author Jussi Laitinen - jussi.laitinen (at) ixonos.com
* @author Pekka Nissinen - pekka.nissinen (at) ixonos.com
+* @author Ville Tiensuu - ville.tiensuu (at) ixonos.com
*/
class MapEngine : public QObject
{
* @param user User info
*/
void receiveOwnLocation(User *user);
+
/**
* @brief Slot to catch friends location data
*
QRect calculateTileGrid(QPoint sceneCoordinate);
/**
+ * @brief clean old friend data from m_mapScene and m_friendItems
+ *
+ * @param friendsList QList item of friend information
+ */
+ void cleanOldFriendData(const QList<User *> &friendsList);
+
+ /**
* @brief Get new tiles.
*
* Calculates which tiles has to be fetched. Does emit fetchImage for tiles which
int tileMaxValue(int zoomLevel);
/**
+ * @brief updates data member m_friendItems from given parameter
+ *
+ * @param friendsList QList item of friend information
+ */
+ void updateFriendItemList(const QList<User *> &friendsList);
+
+ /**
+ * @brief updates data member m_friendItems values that differs from given parameter
+ *
+ * @param friendsList QList item of friend information
+ */
+ void updateFriendLocationsAndImages(const QList<User *> &friendsList);
+
+ /**
* @brief Updates the current view rect including margins
*
* Calculates tiles rect in scene based on m_viewTilesGrid and
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
- QList<FriendLocationItem *> m_friendsLocations; ///< Location of friends
+ QList<FriendLocationItem *> m_friendItems; ///< List of friendLocationItems
};
#endif // MAPENGINE_H