Created base for Facebook login browser
[situare] / src / ui / mainwindow.h
index c36342b..2d2293c 100644 (file)
@@ -40,24 +40,25 @@ class QToolButton;
 class QWebView;
 
 class FacebookAuthentication;
-class FullScreenButton;
+class FacebookLoginBrowser;
 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
@@ -92,6 +93,8 @@ private:
  * MEMBER FUNCTIONS AND SLOTS
  ******************************************************************************/
 public:
+    FacebookLoginBrowser* buildFacebookLoginBrowser();
+
     /**
      * @brief Clears cookie jar
      *
@@ -156,11 +159,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
@@ -198,9 +196,12 @@ public slots:
     void setUsername(const QString &username);
 
     /**
-     * @brief Method to show panels
-     */
-    void showPanels();
+    * @brief Shows contact dialog.
+    *
+    * Shows contact dialog with contact's information.
+    * @param guid globally unique ID of a contact
+    */
+    void showContactDialog(const QString &guid);
 
     /**
      * @brief Public slot to intercept signal when old cerdentials are invalid or credentials
@@ -238,6 +239,17 @@ private:
     void buildFullScreenButton();
 
     /**
+     * @brief Build direction indicator button panel and connect signals
+     */
+    void buildIndicatorButtonPanel();
+
+
+    /**
+     * @brief Build location search panel and connect signals
+     */
+    void buildLocationSearchPanel();
+
+    /**
      * @brief Build map and connect slots
      */
     void buildMap();
@@ -438,9 +450,13 @@ signals:
      * @brief View should be centered to new location
      *
      * @param coordinate Scene coordinates of the new center point
-     * @param isUserDragAction True if caused by user dragging action
      */
-    void centerToSceneCoordinates(const SceneCoordinate &coordinate, bool isUserDragAction);
+    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
@@ -534,9 +550,8 @@ signals:
      * @brief Forwarding signal from MapView to MapEngine
      *
      * @param coordinate New center point coordinate
-     * @param isUserDragAction True if caused by user dragging action
      */
-    void mapViewScrolled(const SceneCoordinate &coordinate, bool isUserDragAction);
+    void mapViewScrolled(const SceneCoordinate &coordinate);
 
     /**
      * @brief Forwarding signal from MapEngine to MapView
@@ -560,6 +575,13 @@ signals:
     void refreshUserData();
 
     /**
+    * @brief Requests contact dialog.
+    *
+    * @param facebookId contact's facebookId
+    */
+    void requestContactDialog(const QString &facebookId);
+
+    /**
      * @brief Signal for requesting reverseGeo from SituareEngine
      *
      */
@@ -587,6 +609,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
@@ -601,6 +628,13 @@ signals:
     void searchForLocation(QString location);
 
     /**
+    * @brief Signal is emitted when search history item is clicked.
+    *
+    * @param searchString search string used
+    */
+    void searchHistoryItemClicked(const QString &searchString);
+
+    /**
      * @brief Signal for requestLocationUpdate from SituareEngine
      *
      * @param status Status message
@@ -671,6 +705,7 @@ private:
     QLabel *m_crosshair;                    ///< Label for center point crosshair
     QLabel *m_osmLicense;                   ///< Label for Open Street Map license
 
+    QList<int> m_situareTabsIndexes;        ///< List of Situare tab indexes
     QList<QDialog *> m_error_queue;         ///< QList type error dialog queue
     QList<QDialog *> m_queue;               ///< QList type dialog queue
 
@@ -683,9 +718,11 @@ private:
 
     QWebView *m_webView;                    ///< Shows facebook login page
 
+    FacebookLoginBrowser *m_facebookLoginBrowser;
     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
+    IndicatorButtonPanel *m_indicatorButtonPanel;   ///< Instance of direction indicator button
+    LocationSearchPanel *m_locationSearchPanel;     ///< Location search panel
     MapScale *m_mapScale;                   ///< Instance of the map scale
     MapView *m_mapView;                     ///< Instance of the map view
     NetworkCookieJar *m_cookieJar;          ///< Placeholder for QNetworkCookies