Moved location update logic to new class called UpdateLocation.
[situare] / src / ui / mainwindow.h
index c9e4caf..ea5683a 100644 (file)
@@ -56,7 +56,7 @@ class SceneCoordinate;
 class SettingsDialog;
 class SituareService;
 class TabbedPanel;
-class UpdateLocationDialog;
+class UpdateLocation;
 class User;
 class UserInfoPanel;
 class ZoomButtonPanel;
@@ -145,15 +145,6 @@ public:
 
 public slots:
     /**
-     * @brief Saves status message and Facebook publish setting
-     *
-     * @param status message that user sends. Message is stored to m_backupMessage data member
-     * @param publish setting that determines whether the user status message is published on
-     *        Facebook. This value is stored to m_backupFacebookPublishPolicity data member.
-     */
-    void backupUpdateLocationDialogData(const QString &status, bool publish);
-
-    /**
      * @brief Builds information box with message.
      *
      * @param message Information message
@@ -162,11 +153,6 @@ public slots:
     void buildInformationBox(const QString &message, bool modal=false);
 
     /**
-     * @brief Clears backups of message and publish on Facebook setting
-     */
-    void clearUpdateLocationDialogData();
-
-    /**
       * @brief Hides and deletes login dialog
       */
     void destroyLoginDialog();
@@ -287,11 +273,6 @@ private:
     void queueDialog(QDialog *dialog);
 
     /**
-     * @brief reads Unsend message from settings at startup
-     */
-    void restoreUnsendMessage();
-
-    /**
      * @brief Shows queued error information box
      *
      */
@@ -391,11 +372,6 @@ private slots:
      */
     void toggleFullScreen();
 
-    /**
-     * @brief Slot function to get indication when dialog is finished
-     */
-    void updateLocationDialogFinished(int reason);
-
 /*******************************************************************************
  * SIGNALS
  ******************************************************************************/
@@ -496,6 +472,14 @@ signals:
     void locationItemClicked(const GeoCoordinate &swBound, const GeoCoordinate &neBound);
 
     /**
+    * @brief Send location update
+    *
+    * @param status Status message
+    * @param publish Publish on Facebook?
+    */
+    void locationUpdate(const QString &status, bool publish);
+
+    /**
      * @brief Signals when Login/Logout action is pressed
      *
      */
@@ -590,14 +574,6 @@ signals:
     void searchHistoryItemClicked(const QString &searchString);
 
     /**
-     * @brief Signal for requestLocationUpdate from SituareEngine
-     *
-     * @param status Status message
-     * @param publish Publish on Facebook
-     */
-    void statusUpdate(const QString &status, const bool &publish);
-
-    /**
     * @brief Dragging mode triggered.
     */
     void draggingModeTriggered();
@@ -608,6 +584,11 @@ signals:
     void viewZoomFinished();
 
     /**
+    * @brief Signals when updateLocation request finished successfully
+    */
+    void updateWasSuccessful();
+
+    /**
      * @brief Signal for use location ready.
      *
      * @param user User object
@@ -633,7 +614,6 @@ signals:
  * DATA MEMBERS
  ******************************************************************************/
 private:
-    bool m_backupFacebookPublishPolicity;   ///< Backup of publish on Facebook checkbox value
     bool m_errorShown;                      ///< Indicates if error dialog/note is shown
     bool m_loggedIn;                        ///< Indicates login state
     bool m_refresh;                         ///< Indicates when webpage is refreshed
@@ -658,8 +638,6 @@ private:
 
     QMessageBox *m_automaticUpdateLocationDialog;   ///< Automatic update location dialog
 
-    QString m_backupMessage;                ///< Backup of users message
-
     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
@@ -668,7 +646,7 @@ private:
     MapView *m_mapView;                     ///< Instance of the map view
     RoutingPanel *m_routingPanel;           ///< Instance of routing panel
     TabbedPanel *m_tabbedPanel;             ///< Widget for tabbed panels
-    UpdateLocationDialog *m_updateLocation; ///< Update location dialog
+    UpdateLocation *m_updateLocationController;     ///< Controller for update location dialog
     UserInfoPanel *m_userInfoPanel;         ///< Instance of the user information panel
     ZoomButtonPanel *m_zoomButtonPanel;     ///< Instance of zoom button panel
 };