added base class for own and friend locations. added new class for
[situare] / src / map / mapengine.h
index 30d9fc1..963c1ab 100644 (file)
@@ -32,6 +32,8 @@
 #include "maptile.h"
 #include "mapzoompanel.h"
 #include "ownlocationitem.h"
+#include "friendlocationitem.h"
+#include "user/user.h"
 
 /**
 * @brief Map engine
@@ -53,6 +55,8 @@ public:
     */
     MapEngine(QObject *parent = 0);
 
+    ~MapEngine();
+
 /*******************************************************************************
  * MEMBER FUNCTIONS AND SLOTS
  ******************************************************************************/
@@ -140,6 +144,9 @@ public slots:
     */
     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
@@ -232,6 +239,8 @@ private slots:
     */
     void zoomOut();
 
+
+
 /*******************************************************************************
  * SIGNALS
  ******************************************************************************/
@@ -257,10 +266,13 @@ signals:
     */
     void zoomLevelChanged(int newZoomLevel);
 
+
+
 /*******************************************************************************
  * DATA MEMBERS
  ******************************************************************************/
 private:
+    //FriendLocationItem *m_friendLocation; ///< Item to show friends location
     MapFetcher *m_mapFetcher; ///< Fetcher for map tiles
     MapScene *m_mapScene; ///< Scene for map tiles
     MapZoomPanel *m_mapZoomPanel; ///< Toolbar for zoom buttons
@@ -270,6 +282,7 @@ private:
     QRect m_viewGrid; ///< Current grid of tiles in view (includes margin)
     QSize m_viewSize; ///< Current view size
     int m_zoomLevel; ///< Current zoom level
+    QList<FriendLocationItem *> m_friendsLocations; ///< Location of friends
 };
 
 #endif // MAPENGINE_H