Finished basic map scale feature
[situare] / src / ui / mainwindow.h
index af11d07..d703912 100644 (file)
@@ -36,6 +36,7 @@ class QWebView;
 
 class FacebookAuthentication;
 class FriendListPanel;
+class MapScale;
 class MapScene;
 class MapView;
 class SituareService;
@@ -43,6 +44,7 @@ class User;
 class UserInfoPanel;
 class ZoomButtonPanel;
 class SettingsDialog;
+class QToolButton;
 
 /**
 * @brief Main Window Class
@@ -178,6 +180,11 @@ public slots:
 
 private:
     /**
+      * @brief Build fullscreen toggle button and connect slots
+      */
+    void buildFullScreenButton();
+
+    /**
       * @brief Build friend list panel and connect slots
       */
     void buildFriendListPanel();
@@ -193,6 +200,11 @@ private:
     void buildMap();
 
     /**
+     * @brief Build map scale and connect slots
+     */
+    void buildMapScale();
+
+    /**
       * @brief Build OSM license and connect slots
       */
     void buildOsmLicense();
@@ -234,6 +246,20 @@ private:
 
 private slots:
     /**
+    * @brief Slot for drawing the fullscreen toggle button
+    *
+    * @param size Size of the screen
+    */
+    void drawFullScreenButton(const QSize &size);
+
+    /**
+    * @brief Slot for drawing the map distance scale
+    *
+    * @param size Size of the screen
+    */
+    void drawMapScale(const QSize &size);
+
+    /**
     * @brief Slot for drawing the Open Street Map license text
     *
     * @param size Size of the screen
@@ -282,6 +308,11 @@ private slots:
     */
     void setViewPortSize(const int width, const int height);
 
+    /**
+    * @brief Toggle between fullscreen and normal window mode
+    */
+    void toggleFullScreen();
+
 /*******************************************************************************
  * SIGNALS
  ******************************************************************************/
@@ -386,6 +417,11 @@ signals:
     void minZoomLevelReached();
 
     /**
+     * @brief Forwarding signal from MapEngine to MapScale
+     */
+    void newMapResolution(qreal scale);
+
+    /**
     * @brief Signal for refreshing user data.
     *
     */
@@ -477,9 +513,12 @@ private:
     QString m_email;                        ///< Placeholder for email
     QString m_password;                     ///< Placeholder for password
 
+    QToolButton *m_fullScreenButton;        ///< Instance of the fullscreen toggle button
+
     QWebView *m_webView;                    ///< Shows facebook login page
 
     FriendListPanel *m_friendsListPanel;    ///< Instance of friends list panel
+    MapScale *m_mapScale;                   ///< Instance of the map scale
     MapView *m_mapView;                     ///< Instance of the map view
     NetworkCookieJar *m_cookieJar;          ///< Placeholder for QNetworkCookies
     PanelSideBar *m_userPanelSidebar;       ///< User panel side bar