f249c24e8714bea3497e764cf42f18ebafe31a36
[situare] / src / ui / mainwindow.h
1 /*
2     Situare - A location system for Facebook
3     Copyright (C) 2010  Ixonos Plc. Authors:
4
5        Henri Lampela - henri.lampela@ixonos.com
6        Kaj Wallin - kaj.wallin@ixonos.com
7
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.
11
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.
16
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,
20     USA.
21  */
22
23
24 #ifndef MAINWINDOW_H
25 #define MAINWINDOW_H
26
27 #include <QtGui/QMainWindow>
28 #include <QWidget>
29
30 class QLabel;
31 class QStackedWidget;
32
33 /**
34 * @Main Window Class
35 *
36 * @class MainWindow mainwindow.h "src/ui/mainwindow.h"
37 */
38 class MainWindow : public QMainWindow
39 {
40     Q_OBJECT
41
42 public:
43     MainWindow(QWidget *parent = 0);
44     ~MainWindow();
45
46     /**
47     * @brief Private method to create List and Map views as a stacked widget
48     *
49     * @fn createViews
50     */
51     void createViews();
52
53     /**
54     * @brief Private method to create the Menu items
55     *
56     * @fn createMenus
57     */
58     void createMenus();
59     QMenu *viewMenu;
60
61     /**
62     * @brief Action item for changing view to List View
63     *
64     * @var toListViewAct
65     */
66     QAction *toListViewAct;
67     /**
68     * @brief Action item for changing view to Map View
69     *
70     * @var toMapViewAct
71     */
72     QAction *toMapViewAct;
73
74     /**
75     * @brief Widget Stack object for the List and Map Views
76     *
77     * @var situareViews
78     */
79     QStackedWidget *situareViews;
80
81     /**
82     * @brief DUMMY LABEL, REMOVE WHEN BOTH VIEWS ARE COMPLETE
83     *
84     * @var infoLabel
85     * @todo REMOVE THIS
86     */
87     QLabel *infoLabel;
88
89 public slots:
90     /**
91     * @brief Private slot, which initiates toListViewAct action
92     *
93     * @fn toListView
94     */
95     void toListView();
96     /**
97     * @brief Private slots, which initiates toMapViewAct action
98     *
99     * @fn toMapView
100     */
101     void toMapView();
102 };
103
104 #endif // MAINWINDOW_H