#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"
*/
Q_OBJECT
public:
- MainWindow(QWidget *parent = 0);
- ~MainWindow();
-
/**
- * @brief Private method to create List and Map views as a stacked widget
+ * @brief Constructor
*
- * @fn createViews
+ * @param parent Parent
*/
- void createViews();
+ MainWindow(QWidget *parent = 0);
/**
- * @brief Private method to create the Menu items
- *
- * @fn createMenus
+ * @brief Destructor
*/
- void createMenus();
- QMenu *viewMenu;
+ ~MainWindow();
+/*******************************************************************************
+ * MEMBER FUNCTIONS AND SLOTS
+ ******************************************************************************/
+public slots:
/**
- * @brief Action item for changing view to List View
- *
- * @var toListViewAct
+ * @brief Public slot, which open settings dialog
*/
- QAction *toListViewAct;
+ void openSettingsDialog();
+
/**
- * @brief Action item for changing view to Map View
- *
- * @var toMapViewAct
+ * @brief Public slot, which initiates toListViewAct action to switch view
*/
- QAction *toMapViewAct;
+ 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 DUMMY LABEL, REMOVE WHEN BOTH VIEWS ARE COMPLETE
- *
- * @var infoLabel
- * @todo REMOVE THIS
+ * @brief Private method to create the Menu items
*/
- QLabel *infoLabel;
+ void createMenus();
-public slots:
/**
- * @brief Private slot, which initiates toListViewAct action
- *
- * @fn toListView
+ * @brief Private method to create List and Map views as a stacked widget
*/
- void toListView();
+ void createViews();
+
/**
- * @brief Private slots, which initiates toMapViewAct action
+ * @brief Method used to switch active view.
*
- * @fn toMapView
+ * @paraDaily scrum 2010-03-26m nextIndex 0 for listview, 1 for mapview
*/
- void toMapView();
+ void switchView(int);
+
+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