git-svn-id: file:///svnroot/family-shop-mgr@16 26eb2498-383b-47a6-be48-5d6f36779e85
authoronil <u.irigoyen@gmail.com>
Sat, 6 Feb 2010 09:27:38 +0000 (09:27 +0000)
committeronil <u.irigoyen@gmail.com>
Sat, 6 Feb 2010 09:27:38 +0000 (09:27 +0000)
code/family-shop-mgr/FamilyShoppingManagerMainWindow.cpp [new file with mode: 0644]
code/family-shop-mgr/FamilyShoppingManagerMainWindow.h [new file with mode: 0644]
code/family-shop-mgr/family-shop-mgr.pro

diff --git a/code/family-shop-mgr/FamilyShoppingManagerMainWindow.cpp b/code/family-shop-mgr/FamilyShoppingManagerMainWindow.cpp
new file mode 100644 (file)
index 0000000..3d0162a
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+ * This file is part of family-shop-mgr.
+ *
+ * family-shop-mgr is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * family-shop-mgr 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 family-shop-mgr.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * Author: Unai IRIGOYEN
+ * Date: 12/07/2009
+ *
+ */
+
+#include "FamilyShoppingManagerMainWindow.h"
+
+#include "ListManagerView.h"
+#include "GoShoppingView.h"
+
+FamilyShoppingManagerMainWindow::FamilyShoppingManagerMainWindow(QWidget *parent)
+    : QMainWindow(parent), activityView(new ListManagerView(this))
+{
+    ui->setupUi(this);
+    connect(ui->manageButton, SIGNAL(clicked()), this, SLOT(openListManager()));
+    connect(ui->goShoppingButton, SIGNAL(clicked()), this, SLOT(openGoShopping()));
+}
+
+FamilyShoppingManagerStartView::~FamilyShoppingManagerStartView()
+{
+    delete ui;
+    delete activityView;
+}
+
+void FamilyShoppingManagerStartView::openListManager()
+{
+    this->hide();
+    activityView = new ListManagerView("ShoppingList.xml", this);
+}
+
+void FamilyShoppingManagerStartView::openGoShopping()
+{
+    //this->hide();
+    activityView = new GoShoppingView("ShoppingList.xml", this);
+}
diff --git a/code/family-shop-mgr/FamilyShoppingManagerMainWindow.h b/code/family-shop-mgr/FamilyShoppingManagerMainWindow.h
new file mode 100644 (file)
index 0000000..3e71196
--- /dev/null
@@ -0,0 +1,41 @@
+/*
+ * This file is part of family-shop-mgr.
+ *
+ * family-shop-mgr is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * family-shop-mgr 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 family-shop-mgr.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * Author: Unai IRIGOYEN
+ * Date: 12/07/2009
+ *
+ */
+
+#ifndef FAMILYSHOPPINGMANAGERMAINWINDOW_H
+#define FAMILYSHOPPINGMANAGERMAINWINDOW_H
+
+#include <QMainWindow>
+
+class FamilyShoppingManagerMainWindow : public QMainWindow
+{
+    Q_OBJECT
+
+public:
+    FamilyShoppingManagerMainWindow(QWidget *parent = 0);
+    ~FamilyShoppingManagerStartView();
+
+private slots:
+
+private:
+    QWidget *activityView;
+};
+
+#endif // FAMILYSHOPPINGMANAGERMAINWINDOW_H
index 12099f2..b2bd24d 100644 (file)
@@ -1,20 +1,21 @@
-# -------------------------------------------------\r
-# Project created by QtCreator 2009-12-01T15:41:15\r
-# -------------------------------------------------\r
-QT += xml\r
-TARGET = build/family-shop-mgr\r
-TEMPLATE = app\r
-SOURCES += main.cpp \\r
-    FamilyShoppingManagerStartView.cpp \\r
-    ShoppingTreeModel.cpp \\r
-    ShoppingTreeItem.cpp \\r
-    GoShoppingView.cpp \\r
-    ListManagerView.cpp\r
-HEADERS += FamilyShoppingManagerStartView.h \\r
-    ShoppingTreeModel.h \\r
-    ShoppingTreeItem.h \\r
-    GoShoppingView.h \\r
-    ListManagerView.h\r
-FORMS += FamilyShoppingManagerStartView.ui \\r
-    ListManager.ui \\r
-    GoShopping.ui\r
+# -------------------------------------------------
+# Project created by QtCreator 2009-12-01T15:41:15
+# -------------------------------------------------
+QT += xml
+TARGET = build/family-shop-mgr
+TEMPLATE = app
+SOURCES += main.cpp \
+    FamilyShoppingManagerStartView.cpp \
+    ShoppingTreeModel.cpp \
+    ShoppingTreeItem.cpp \
+    GoShoppingView.cpp \
+    ListManagerView.cpp \
+    FamilyShoppingManagerMainWindow.cpp
+HEADERS += ShoppingTreeModel.h \
+    ShoppingTreeItem.h \
+    GoShoppingView.h \
+    ListManagerView.h \
+    FamilyShoppingManagerMainWindow.h
+FORMS += FamilyShoppingManagerStartView.ui \
+    ListManager.ui \
+    GoShopping.ui