Merge branch 'crosshair2'
[situare] / src / map / mapengine.h
index d5e5535..5067057 100644 (file)
@@ -115,6 +115,14 @@ public:
     */
     static QString tilePath(int zoomLevel, int x, int y);
 
+    /**
+    * @brief converts scene coordinates to latitude and longitude
+    *
+    * @param current zoom level
+    * @param sceneCoordinate that will be converted
+    */
+    QPointF convertSceneCoordinateToLatLon(int zoomLevel, QPoint sceneCoordinate);
+
 public slots:
     /**
     * @brief Slot for setting current view location
@@ -140,11 +148,24 @@ public slots:
     void viewResized(const QSize &size);
 
     /**
+    * @brief Returns own location crosshair's latitude and longitude coordinates
+    *
+    */
+    void ownLocation();
+
+    /**
     * @brief Slot to catch user own location data
     *
     * @param user User info
     */
-    void receiveOwnLocation(User *user);
+    void receiveOwnLocation(User *user);    
+
+    /**
+    * @brief Slot to receive visible area of map scene
+    *
+    * @param visible area of map scene
+    */
+    void receiveViewSceneRect(QRect viewSceneRect);
 
 private:
     /**
@@ -306,6 +327,18 @@ signals:
     void minZoomLevelReached();
 
     /**
+    * @brief Signal request mapView to update view port contents
+    */
+    void requestToGetViewPortContents();
+
+    /**
+    * @brief Signal sends location of crosshair
+    *
+    * @param ownLocation location of crosshair (Latitude, Longitude)
+    */
+    void ownLocation(const QPointF ownLocation);
+
+    /**
     * @brief Signal for zoom level change
     *
     * @param newZoomLevel New zoom level
@@ -329,6 +362,7 @@ private:
     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
 };
 
 #endif // MAPENGINE_H