From 3932e368f35b670d8d2b427aa582afe166807d33 Mon Sep 17 00:00:00 2001 From: onil Date: Sat, 6 Feb 2010 09:27:38 +0000 Subject: [PATCH] git-svn-id: file:///svnroot/family-shop-mgr@16 26eb2498-383b-47a6-be48-5d6f36779e85 --- .../FamilyShoppingManagerMainWindow.cpp | 51 ++++++++++++++++++++ .../FamilyShoppingManagerMainWindow.h | 41 ++++++++++++++++ code/family-shop-mgr/family-shop-mgr.pro | 41 ++++++++-------- 3 files changed, 113 insertions(+), 20 deletions(-) create mode 100644 code/family-shop-mgr/FamilyShoppingManagerMainWindow.cpp create mode 100644 code/family-shop-mgr/FamilyShoppingManagerMainWindow.h diff --git a/code/family-shop-mgr/FamilyShoppingManagerMainWindow.cpp b/code/family-shop-mgr/FamilyShoppingManagerMainWindow.cpp new file mode 100644 index 0000000..3d0162a --- /dev/null +++ b/code/family-shop-mgr/FamilyShoppingManagerMainWindow.cpp @@ -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 . + * + * 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 index 0000000..3e71196 --- /dev/null +++ b/code/family-shop-mgr/FamilyShoppingManagerMainWindow.h @@ -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 . + * + * Author: Unai IRIGOYEN + * Date: 12/07/2009 + * + */ + +#ifndef FAMILYSHOPPINGMANAGERMAINWINDOW_H +#define FAMILYSHOPPINGMANAGERMAINWINDOW_H + +#include + +class FamilyShoppingManagerMainWindow : public QMainWindow +{ + Q_OBJECT + +public: + FamilyShoppingManagerMainWindow(QWidget *parent = 0); + ~FamilyShoppingManagerStartView(); + +private slots: + +private: + QWidget *activityView; +}; + +#endif // FAMILYSHOPPINGMANAGERMAINWINDOW_H diff --git a/code/family-shop-mgr/family-shop-mgr.pro b/code/family-shop-mgr/family-shop-mgr.pro index 12099f2..b2bd24d 100644 --- a/code/family-shop-mgr/family-shop-mgr.pro +++ b/code/family-shop-mgr/family-shop-mgr.pro @@ -1,20 +1,21 @@ -# ------------------------------------------------- -# 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 -HEADERS += FamilyShoppingManagerStartView.h \ - ShoppingTreeModel.h \ - ShoppingTreeItem.h \ - GoShoppingView.h \ - ListManagerView.h -FORMS += FamilyShoppingManagerStartView.ui \ - ListManager.ui \ - GoShopping.ui +# ------------------------------------------------- +# 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 -- 1.7.9.5