Merge branch 'master' of https://vcs.maemo.org/git/situare
[situare] / src / ui / mainwindow.h
index dad12bf..331d149 100644 (file)
 #include <QtGui/QMainWindow>
 #include <QWidget>
 #include <QDebug>
+#include <QObject>
 #include "facebookservice/facebookauthentication.h"
 #include "situareservice/situareservice.h"
 #include <QNetworkAccessManager>
+#include "engine/engine.h"
+#include "listviewscreen.h"
+#include "mapviewscreen.h"
+#include "updatelocation/updatelocationdialog.h"
 
 class QLabel;
 class QStackedWidget;
@@ -56,8 +61,16 @@ public:
     */
     ~MainWindow();
 
+/*******************************************************************************
+ * MEMBER FUNCTIONS AND SLOTS
+ ******************************************************************************/
 public slots:
     /**
+    * @brief Public slot, which open settings dialog
+    */
+     void openSettingsDialog();
+
+    /**
     * @brief Public slot, which initiates toListViewAct action to switch view
     */
     void toListView();
@@ -69,7 +82,7 @@ public slots:
 
 private:
     /**
-    * @brief Private method to create the Menu items    w.show();
+    * @brief Private method to create the Menu items
     */
     void createMenus();
 
@@ -81,30 +94,28 @@ private:
     /**
     * @brief Method used to switch active view.
     *
-    * @param nextIndex 0 for listview, 1 for mapview
+    * @paraDaily scrum 2010-03-26m nextIndex 0 for listview, 1 for mapview
     */
     void switchView(int);
 
+private slots:
+    void openLocationUpdateDialog();
+/*******************************************************************************
+ * DATA MEMBERS
+ ******************************************************************************/
+
 private:
-    FacebookAuthentication *m_facebookAuthenticator; ///< Instance for facebook authenticator
-    QNetworkAccessManager *m_networkManager; ///< NetworkManager that is passed on to SituareService
-    SituareService *m_situareService; ///< Instance of the situare server communication service
-    bool m_loggedIn; ///< Boolean value to indicate whether login has been successfull or not
+    SituareEngine *m_situareEngine;
+
+    ListViewScreen *m_listViewScreen;
+    MapViewScreen *m_mapViewScreen;
     QStackedWidget *m_situareViews; ///< Stacked widget that hold both view widgets
     QAction *m_toListViewAct; ///< Action to trigger switch to list view
     QAction *m_toMapViewAct; ///< Action to trigger switch to map view
+    QAction *m_toSettingsAct; ///< Action to trigger switch to settings dialog
     QMenu *m_viewMenu; ///< Object that hold the view menu items
 
-private slots:
-    /**
-    * @brief Slot to change value of m_loggedIn to true
-    */
-    void loginOK();
-
-    /**
-    * @brief Slot to check login status and exits if necessary
-    */
-    void loginScreenClosed();
+    UpdateLocationDialog *m_locationDialog; ///< Message dialog
 };
 
 #endif // MAINWINDOW_H