#include <QtGui/QMainWindow>
#include <QWidget>
#include <QDebug>
-//#include "facebookservice/facebookauthentication.h"
+#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:
+ /**
+ * @brief Constructor
+ *
+ * @param parent Parent
+ */
MainWindow(QWidget *parent = 0);
+
+ /**
+ * @brief Destructor
+ */
~MainWindow();
-private:
+/*******************************************************************************
+ * MEMBER FUNCTIONS AND SLOTS
+ ******************************************************************************/
+public slots:
/**
- * @brief Flag to indicate whether successful login has been done
- *
- * @var loggedIn
+ * @brief Public slot, which open settings dialog
*/
- bool loggedIn;
+ void openSettingsDialog();
/**
- * @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:
- /**
- * @brief Intercepts signal fom closing login window. Checks login status and exits if necessary
- *
- * @fn loginScreenClosed
- */
- void loginScreenClosed();
+ 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
- void loginOK();
+ UpdateLocationDialog *m_locationDialog; ///< Message dialog
};
#endif // MAINWINDOW_H