2 Situare - A location system for Facebook
3 Copyright (C) 2010 Ixonos Plc. Authors:
5 Henri Lampela - henri.lampela@ixonos.com
6 Kaj Wallin - kaj.wallin@ixonos.com
8 Situare is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License
10 version 2 as published by the Free Software Foundation.
12 Situare is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with Situare; if not, write to the Free Software
19 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
27 #include <QtGui/QMainWindow>
30 #include "facebookservice/facebookauthentication.h"
31 #include "situareservice/situareservice.h"
32 #include <QNetworkAccessManager>
38 * @brief Main Window Class
40 * @class MainWindow mainwindow.h "src/ui/mainwindow.h"
42 class MainWindow : public QMainWindow
50 * @param parent Parent
52 MainWindow(QWidget *parent = 0);
59 /*******************************************************************************
60 * MEMBER FUNCTIONS AND SLOTS
61 ******************************************************************************/
65 * @brief Public slot, which open settings dialog
67 void openSettingsDialog();
70 * @brief Public slot, which initiates toListViewAct action to switch view
75 * @brief Public slot, which initiates toMapViewAct action to switch view
81 * @brief Private method to create the Menu items
86 * @brief Private method to create List and Map views as a stacked widget
91 * @brief Method used to switch active view.
93 * @param nextIndex 0 for listview, 1 for mapview
99 * @brief Slot to change value of m_loggedIn to true
104 * @brief Slot to check login status and exits if necessary
106 void loginScreenClosed();
108 /*******************************************************************************
110 ******************************************************************************/
113 FacebookAuthentication *m_facebookAuthenticator; ///< Instance for facebook authenticator
114 QNetworkAccessManager *m_networkManager; ///< NetworkManager that is passed on to SituareService
115 SituareService *m_situareService; ///< Instance of the situare server communication service
116 bool m_loggedIn; ///< Boolean value to indicate whether login has been successfull or not
117 QStackedWidget *m_situareViews; ///< Stacked widget that hold both view widgets
118 QAction *m_toListViewAct; ///< Action to trigger switch to list view
119 QAction *m_toMapViewAct; ///< Action to trigger switch to map view
120 QAction *m_toSettingsAct; ///< Action to trigger switch to settings dialog
121 QMenu *m_viewMenu; ///< Object that hold the view menu items
125 #endif // MAINWINDOW_H