Merge branch 'master' of https://vcs.maemo.org/git/situare
[situare] / src / ui / mainwindow.h
index 4377605..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;
 
 /**
-* @Main Window Class
+* @brief Main Window Class
 *
 * @class MainWindow mainwindow.h "src/ui/mainwindow.h"
 */
@@ -41,72 +49,73 @@ class MainWindow : public QMainWindow
     Q_OBJECT
 
 public:
+    /**
+    * @brief Constructor
+    *
+    * @param parent Parent
+    */
     MainWindow(QWidget *parent = 0);
+
+    /**
+    * @brief Destructor
+    */
     ~MainWindow();
 
+/*******************************************************************************
+ * MEMBER FUNCTIONS AND SLOTS
+ ******************************************************************************/
+public slots:
     /**
-    * @brief Public method to get current index of the view. Used for Unit testing
-    *
-    * @fn getViewIndex
+    * @brief Public slot, which open settings dialog
     */
-    int getViewIndex();
+     void openSettingsDialog();
 
-private:
     /**
-    * @brief Private method to create List and Map views as a stacked widget
-    *
-    * @fn createViews
+    * @brief Public slot, which initiates toListViewAct action to switch view
     */
-    void createViews();
+    void toListView();
+
     /**
-    * @brief Widget Stack object for the List and Map Views
-    *
-    * @var situareViews
+    * @brief Public slot, which initiates toMapViewAct action to switch view
     */
-    QStackedWidget *situareViews;
+    void toMapView();
 
+private:
     /**
     * @brief Private method to create the Menu items
-    *
-    * @fn createMenus
     */
     void createMenus();
-    QMenu *viewMenu;
 
     /**
-    * @brief Action item for changing view to List View
-    *
-    * @var toListViewAct
-    */
-    QAction *toListViewAct;
-    /**
-    * @brief Action item for changing view to Map View
-    *
-    * @var toMapViewAct
+    * @brief Private method to create List and Map views as a stacked widget
     */
-    QAction *toMapViewAct;
+    void createViews();
 
     /**
     * @brief Method used to switch active view.
     *
-    * @fn switchView
-    * @param int 0 for listview, 1 for mapview
+    * @paraDaily scrum 2010-03-26m nextIndex 0 for listview, 1 for mapview
     */
     void switchView(int);
 
-public slots:
-    /**
-    * @brief Public slot, which initiates toListViewAct action to switch view
-    *
-    * @fn toListView
-    */
-    void toListView();
-    /**
-    * @brief Public slot, which initiates toMapViewAct action to switch view
-    *
-    * @fn toMapView
-    */
-    void toMapView();
+private slots:
+    void openLocationUpdateDialog();
+/*******************************************************************************
+ * DATA MEMBERS
+ ******************************************************************************/
+
+private:
+    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
+
+    UpdateLocationDialog *m_locationDialog; ///< Message dialog
 };
 
 #endif // MAINWINDOW_H