Merge branch 'new_panels' into locationlistview
[situare] / src / ui / mainwindow.h
index ab87f39..0c8d034 100644 (file)
@@ -47,6 +47,9 @@ class GeoCoordinate;
 class MapScale;
 class MapScene;
 class MapView;
+class Route;
+class RoutingPanel;
+class TabbedPanel;
 class SettingsDialog;
 class SceneCoordinate;
 class SituareService;
@@ -54,6 +57,7 @@ class TabbedPanel;
 class User;
 class UserInfoPanel;
 class ZoomButtonPanel;
+class Location;
 
 /**
  * @brief Main Window Class
@@ -255,6 +259,11 @@ private:
     void buildPanels();
 
     /**
+     * @brief Build routing panel and connect slots
+     */
+    void buildRoutingPanel();
+
+    /**
      * @brief Build user info panel and connect slots
      */
     void buildUserInfoPanel();
@@ -422,6 +431,13 @@ signals:
     void cancelLoginProcess();
 
     /**
+     * @brief Signal for centering to coordinates.
+     *
+     * @param coordinates geo coordinates to center to.
+     */
+    void centerToCoordinates(const GeoCoordinate &coordinates);
+
+    /**
      * @brief View should be centered to new location
      *
      * @param coordinate Scene coordinates of the new center point
@@ -461,13 +477,6 @@ signals:
     void fetchUsernameFromSettings();
 
     /**
-     * @brief Signal for finding user.
-     *
-     * @param coordinates user geo coordinates
-     */
-    void findUser(const GeoCoordinate &coordinates);
-
-    /**
      * @brief Signals when friend's profile image is ready
      *
      * @param user Friend
@@ -482,13 +491,6 @@ signals:
     void gpsTriggered(bool enabled);
 
     /**
-     * @brief Signal for finding friend.
-     *
-     * @param coordinates friend's geo coordinates
-     */
-    void findFriend(const GeoCoordinate &coordinates);
-
-    /**
      * @brief Signal for friend location ready.
      *
      * @param friendsList
@@ -496,13 +498,28 @@ signals:
     void friendsLocationsReady(QList<User *> &friendsList);
 
     /**
-     * @brief Signal is emitted when location item is clicked.
+    * @brief Emited when location request is parsed and is ready for further processing
+    *
+    * @param result List of Location items
+    */
+    void locationDataParsed(const QList<Location> &result);
+
+    /**
+     * @brief Signal is emitted when location item is clicked on map.
      *
      * @param userIDs list of friends user IDs in the group
      */
     void locationItemClicked(const QList<QString> &userIDs);
 
     /**
+     * @brief Signal is emitted when location item is clicked in list.
+     *
+     * @param swBound south-west bound in GeoCoorinate
+     * @param neBound north-east bound in GeoCoordinate
+     */
+    void locationItemClicked(const GeoCoordinate &swBound, const GeoCoordinate &neBound);
+
+    /**
      * @brief Signals when Login/Logout action is pressed
      *
      */
@@ -557,6 +574,20 @@ signals:
     void reverseGeoReady(const QString &address);
 
     /**
+    * @brief Emited when route is parsed and is ready for further processing
+    *
+    * @param route Route item containing parsed route details
+    */
+    void routeParsed(Route &route);
+
+    /**
+    * @brief Signal for routing to geo coordinates.
+    *
+    * @param coordinates destination geo coordinates
+    */
+    void routeTo(const GeoCoordinate &coordinates);
+
+    /**
      * @brief Signal to save username to settings
      *
      * @param username Username
@@ -661,6 +692,7 @@ private:
     MapScale *m_mapScale;                   ///< Instance of the map scale
     MapView *m_mapView;                     ///< Instance of the map view
     NetworkCookieJar *m_cookieJar;          ///< Placeholder for QNetworkCookies
+    RoutingPanel *m_routingPanel;           ///< Instance of routing panel
     TabbedPanel *m_tabbedPanel;             ///< Widget for tabbed panels
     UserInfoPanel *m_userInfoPanel;         ///< Instance of the user information panel
     ZoomButtonPanel *m_zoomButtonPanel;     ///< Instance of zoom button panel