Added some debug traces
[situare] / src / ui / mainwindow.h
index 80e2df7..602f7fb 100644 (file)
@@ -1,34 +1,33 @@
 /*
-    Situare - A location system for Facebook
-    Copyright (C) 2010  Ixonos Plc. Authors:
+   Situare - A location system for Facebook
+   Copyright (C) 2010  Ixonos Plc. Authors:
 
-       Henri Lampela - henri.lampela@ixonos.com
-       Kaj Wallin - kaj.wallin@ixonos.com
+      Henri Lampela - henri.lampela@ixonos.com
+      Kaj Wallin - kaj.wallin@ixonos.com
 
-    Situare is free software; you can redistribute it and/or
-    modify it under the terms of the GNU General Public License
-    version 2 as published by the Free Software Foundation.
+   Situare is free software; you can redistribute it and/or
+   modify it under the terms of the GNU General Public License
+   version 2 as published by the Free Software Foundation.
 
-    Situare is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
+   Situare is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with Situare; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301,
+   USA.
+*/
 
-    You should have received a copy of the GNU General Public License
-    along with Situare; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301,
-    USA.
- */
 
 #ifndef MAINWINDOW_H
 #define MAINWINDOW_H
 
 #include <QtGui/QMainWindow>
 #include <QWidget>
+#include <QDebug>
 
-class QMenu;
-class QAction;
-class QTabBar;
 class QLabel;
 class QStackedWidget;
 
@@ -45,6 +44,13 @@ public:
     MainWindow(QWidget *parent = 0);
     ~MainWindow();
 
+    /**
+    * @brief Widget Stack object for the List and Map Views
+    *
+    * @var situareViews
+    */
+    QStackedWidget *situareViews;
+
 private:
     /**
     * @brief Private method to create List and Map views as a stacked widget
@@ -53,15 +59,26 @@ private:
     */
     void createViews();
 
-    QAction *toMapViewAct;
     /**
-    * @brief Widget Stack object for the List and Map Views
+    * @brief Private method to create the Menu items
     *
-    * @var situareViews
+    * @fn createMenus
     */
-    QStackedWidget *situareViews;
+    void createMenus();
+    QMenu *viewMenu;
 
-    QTabBar *situareTabs;
+    /**
+    * @brief Action item for changing view to List View
+    *
+    * @var toListViewAct
+    */
+    QAction *toListViewAct;
+    /**
+    * @brief Action item for changing view to Map View
+    *
+    * @var toMapViewAct
+    */
+    QAction *toMapViewAct;
 
     /**
     * @brief DUMMY LABEL, REMOVE WHEN BOTH VIEWS ARE COMPLETE
@@ -70,28 +87,20 @@ private:
     * @todo REMOVE THIS
     */
     QLabel *infoLabel;
-};
-
-/**
-* @brief List View class. Used for displaying List of friends
-*
-* @class SituareListView mainwindow.h "src/ui/mainwindow.h"
-*/
-class SituareListView : public QWidget
-{
-public:
-    SituareListView(QWidget *parent = 0);
-};
 
-/**
-* @brief Map View class. Used to display Map
-*
-* @class SituareMapView mainwindow.h "src/ui/mainwindow.h"
-*/
-class SituareMapView : public QWidget
-{
-public:
-    SituareMapView(QWidget *parent = 0);
+public slots:
+    /**
+    * @brief Private slot, which initiates toListViewAct action
+    *
+    * @fn toListView
+    */
+    void toListView();
+    /**
+    * @brief Private slot, which initiates toMapViewAct action
+    *
+    * @fn toMapView
+    */
+    void toMapView();
 };
 
 #endif // MAINWINDOW_H