Added routing to current cursor position functionality
[situare] / src / ui / mainwindow.h
index 39d7cce..3a2b923 100644 (file)
@@ -40,24 +40,24 @@ class QToolButton;
 class QWebView;
 
 class FacebookAuthentication;
-class FullScreenButton;
 class FriendListPanel;
-class IndicatorButtonPanel;
+class FullScreenButton;
 class GeoCoordinate;
+class IndicatorButtonPanel;
+class Location;
+class LocationSearchPanel;
 class MapScale;
 class MapScene;
 class MapView;
 class Route;
 class RoutingPanel;
-class TabbedPanel;
-class SettingsDialog;
 class SceneCoordinate;
+class SettingsDialog;
 class SituareService;
 class TabbedPanel;
 class User;
 class UserInfoPanel;
 class ZoomButtonPanel;
-class Location;
 
 /**
  * @brief Main Window Class
@@ -156,11 +156,6 @@ public:
 
 public slots:
     /**
-     * @brief Build direction indicator button panel and connect signals
-     */
-    void buildIndicatorButtonPanel();
-
-    /**
      * @brief Builds information box with message.
      *
      * @param message Information message
@@ -188,7 +183,7 @@ public slots:
      *
      * @param visible
      */
-    void setOwnLocationCrosshairVisibility(bool visible);
+    void setCrosshairVisibility(bool visible);
 
     /**
      * @brief Sets username to member variable for login dialog
@@ -205,7 +200,6 @@ public slots:
     /**
      * @brief Public slot to intercept signal when old cerdentials are invalid or credentials
      *        doesn't exist yet
-     *
      */
     void startLoginProcess();
 
@@ -224,9 +218,9 @@ public slots:
 
 private:
     /**
-     * @brief Build fullscreen toggle button and connect slots
+     * @brief Build manual location setting cross hair and connect slots
      */
-    void buildFullScreenButton();
+    void buildCrosshair();
 
     /**
      * @brief Build friend list panel and connect slots
@@ -234,9 +228,16 @@ private:
     void buildFriendListPanel();
 
     /**
-     * @brief Build manual location setting cross hair and connect slots
+     * @brief Build fullscreen toggle button and connect slots
      */
-    void buildManualLocationCrosshair();
+    void buildFullScreenButton();
+
+    /**
+     * @brief Build direction indicator button panel and connect signals
+     */
+    void buildIndicatorButtonPanel();
+
+    void buildLocationSearchPanel();
 
     /**
      * @brief Build map and connect slots
@@ -347,13 +348,6 @@ private slots:
     void drawOsmLicense(const QSize &size);
 
     /**
-     * @brief Slot for drawing the own location crosshair
-     *
-     * @param size Size of the screen
-     */
-    void drawOwnLocationCrosshair(const QSize &size);
-
-    /**
      * @brief Slot to intercept signal when error dialog/information note is processed
      *
      * @param status Status of the dialog
@@ -380,6 +374,18 @@ private slots:
     void loadDone(bool done);
 
     /**
+    * @brief Called when map center point horizontal shifting is changed
+    *
+    * @param shifting New shifting value
+    */
+    void mapCenterHorizontalShiftingChanged(int shifting);
+
+    /**
+     * @brief Move the crosshair
+     */
+    void moveCrosshair();
+
+    /**
      * @brief Slot to save cookies to settings
      */
     void saveCookies();
@@ -390,13 +396,6 @@ private slots:
     void settingsDialogAccepted();
 
     /**
-     * @brief Set correnct view port size to datamembers
-     *
-     * @param size Size of the screen
-     */
-    void setViewPortSize(const QSize &size);
-
-    /**
      * @brief Start location search (open search dialog)
      */
     void startLocationSearch();
@@ -445,6 +444,11 @@ signals:
     void centerToSceneCoordinates(const SceneCoordinate &coordinate);
 
     /**
+    * @brief Emitted when route is cleared
+    */
+    void clearRoute();
+
+    /**
     * @brief Signal when direction and distance from current map center point to current GPS
     *        location is changed
     *
@@ -535,7 +539,7 @@ signals:
     /**
      * @brief Forwarding signal from MapView to MapEngine
      *
-     * @param coordinate
+     * @param coordinate New center point coordinate
      */
     void mapViewScrolled(const SceneCoordinate &coordinate);
 
@@ -588,6 +592,11 @@ signals:
     void routeTo(const GeoCoordinate &coordinates);
 
     /**
+    * @brief Request routing to current cursor position
+    */
+    void routeToCursor();
+
+    /**
      * @brief Signal to save username to settings
      *
      * @param username Username
@@ -662,14 +671,15 @@ private:
     bool m_loggedIn;                        ///< Indicates login state
     bool m_refresh;                         ///< Indicates when webpage is refreshed
 
+    int m_mapCenterHorizontalShifting;      ///< Amount of map center point horizontal shifting
     int m_progressIndicatorCount;           ///< Indicates the number of progress indicator calls
 
     QAction *m_gpsToggleAct;                ///< Action to trigger gps toggle
     QAction *m_loginAct;                    ///< Action to Login/Logout
     QAction *m_toSettingsAct;               ///< Action to trigger switch to settings dialog
 
+    QLabel *m_crosshair;                    ///< Label for center point crosshair
     QLabel *m_osmLicense;                   ///< Label for Open Street Map license
-    QLabel *m_ownLocationCrosshair;         ///< Label that show ownLocationCrosshair
 
     QList<QDialog *> m_error_queue;         ///< QList type error dialog queue
     QList<QDialog *> m_queue;               ///< QList type dialog queue
@@ -678,8 +688,6 @@ private:
 
     QMessageBox *m_automaticUpdateLocationDialog;   ///< Automatic update location dialog
 
-    QSize m_viewPortSize;                 ///< Size of the viewport
-
     QString m_email;                        ///< Placeholder for email
     QString m_password;                     ///< Placeholder for password
 
@@ -688,6 +696,7 @@ private:
     FriendListPanel *m_friendsListPanel;    ///< Instance of friends list panel
     FullScreenButton *m_fullScreenButton;   ///< Instance of the fullscreen toggle button
     IndicatorButtonPanel *m_indicatorButtonPanel;     ///< Instance of direction indicator button
+    LocationSearchPanel *m_locationSearchPanel;
     MapScale *m_mapScale;                   ///< Instance of the map scale
     MapView *m_mapView;                     ///< Instance of the map view
     NetworkCookieJar *m_cookieJar;          ///< Placeholder for QNetworkCookies