Moved UpdateLocationDialog to be managed by MainWindow.
[situare] / src / ui / mainwindow.h
index f7e508b..c9e4caf 100644 (file)
@@ -56,6 +56,7 @@ class SceneCoordinate;
 class SettingsDialog;
 class SituareService;
 class TabbedPanel;
+class UpdateLocationDialog;
 class User;
 class UserInfoPanel;
 class ZoomButtonPanel;
@@ -144,6 +145,15 @@ 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
@@ -152,6 +162,11 @@ 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();
@@ -272,6 +287,11 @@ private:
     void queueDialog(QDialog *dialog);
 
     /**
+     * @brief reads Unsend message from settings at startup
+     */
+    void restoreUnsendMessage();
+
+    /**
      * @brief Shows queued error information box
      *
      */
@@ -352,6 +372,11 @@ private slots:
     void settingsDialogAccepted();
 
     /**
+     * @brief Show update location dialog
+     */
+    void showUpdateLocationDialog();
+
+    /**
      * @brief Ignore SSL error from the reply
      */
     void sslErrors(QNetworkReply *reply, const QList<QSslError> &errors);
@@ -366,6 +391,11 @@ private slots:
      */
     void toggleFullScreen();
 
+    /**
+     * @brief Slot function to get indication when dialog is finished
+     */
+    void updateLocationDialogFinished(int reason);
+
 /*******************************************************************************
  * SIGNALS
  ******************************************************************************/
@@ -568,12 +598,6 @@ signals:
     void statusUpdate(const QString &status, const bool &publish);
 
     /**
-     * @brief Signals when updateLocationDialog's data must be cleared
-     *
-     */
-    void clearUpdateLocationDialogData();
-
-    /**
     * @brief Dragging mode triggered.
     */
     void draggingModeTriggered();
@@ -609,6 +633,7 @@ 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
@@ -633,6 +658,8 @@ 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
@@ -641,6 +668,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
     UserInfoPanel *m_userInfoPanel;         ///< Instance of the user information panel
     ZoomButtonPanel *m_zoomButtonPanel;     ///< Instance of zoom button panel
 };