--- /dev/null
+/*
+ * 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);
+}
--- /dev/null
+/*
+ * 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
-# -------------------------------------------------\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