+/*
+ * 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 "FamilyShoppingManagerStartView.h"
#include "ui_FamilyShoppingManagerStartView.h"
+/*
+ * 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 FAMILYSHOPPINGMANAGERSTARTVIEW_H
#define FAMILYSHOPPINGMANAGERSTARTVIEW_H
--- /dev/null
+/*\r
+ * This file is part of family-shop-mgr.\r
+ *\r
+ * family-shop-mgr is free software: you can redistribute it and/or modify\r
+ * it under the terms of the GNU General Public License as published by\r
+ * the Free Software Foundation, either version 3 of the License, or\r
+ * (at your option) any later version.\r
+ *\r
+ * family-shop-mgr is distributed in the hope that it will be useful,\r
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
+ * GNU General Public License for more details.\r
+ *\r
+ * You should have received a copy of the GNU General Public License\r
+ * along with family-shop-mgr. If not, see <http://www.gnu.org/licenses/>.\r
+ *\r
+ * Author: Unai IRIGOYEN\r
+ * Date: 12/07/2009\r
+ *\r
+ */\r
+\r
+#include "ShoppingTreeItem.h"\r
+\r
+ShoppingTreeItem::ShoppingTreeItem(const QVector<QVariant> &data, TreeItem *parent)\r
+{\r
+ parentItem = parent;\r
+ itemData = data;\r
+}\r
+\r
+ShoppingTreeItem::~ShoppingTreeItem()\r
+{\r
+ qDeleteAll(childItems);\r
+}\r
--- /dev/null
+/*\r
+ * This file is part of family-shop-mgr.\r
+ *\r
+ * family-shop-mgr is free software: you can redistribute it and/or modify\r
+ * it under the terms of the GNU General Public License as published by\r
+ * the Free Software Foundation, either version 3 of the License, or\r
+ * (at your option) any later version.\r
+ *\r
+ * family-shop-mgr is distributed in the hope that it will be useful,\r
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
+ * GNU General Public License for more details.\r
+ *\r
+ * You should have received a copy of the GNU General Public License\r
+ * along with family-shop-mgr. If not, see <http://www.gnu.org/licenses/>.\r
+ *\r
+ * Author: Unai IRIGOYEN\r
+ * Date: 12/07/2009\r
+ *\r
+ */\r
+\r
+#ifndef SHOPPINGTREEITEM_H\r
+#define SHOPPINGTREEITEM_H\r
+\r
+#include <QList>\r
+#include <QVariant>\r
+#include <QVector>\r
+\r
+class ShoppingTreeItem\r
+{\r
+public:\r
+ ShoppingTreeItem(const QVector<QVariant> &data, TreeItem *parent = 0);\r
+ ShoppingTreeItem();\r
+\r
+ ShoppingTreeItem *child(int number);\r
+ int childCount() const;\r
+ int columnCount() const;\r
+ QVariant data(int column) const;\r
+ bool insertChildren(int position, int count, int columns);\r
+ bool insertColumns(int position, int columns);\r
+ TreeItem *parent();\r
+ bool removeChildren(int position, int count);\r
+ bool removeColumns(int position, int columns);\r
+ int childNumber() const;\r
+ bool setData(int column, const QVariant &value);\r
+\r
+private:\r
+ QList<TreeItem*> childItems;\r
+ QVector<QVariant> itemData;\r
+ TreeItem *parentItem;\r
+};\r
+\r
+#endif // SHOPPINGTREEITEM_H\r
--- /dev/null
+/*\r
+ * This file is part of family-shop-mgr.\r
+ *\r
+ * family-shop-mgr is free software: you can redistribute it and/or modify\r
+ * it under the terms of the GNU General Public License as published by\r
+ * the Free Software Foundation, either version 3 of the License, or\r
+ * (at your option) any later version.\r
+ *\r
+ * family-shop-mgr is distributed in the hope that it will be useful,\r
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
+ * GNU General Public License for more details.\r
+ *\r
+ * You should have received a copy of the GNU General Public License\r
+ * along with family-shop-mgr. If not, see <http://www.gnu.org/licenses/>.\r
+ *\r
+ * Author: Unai IRIGOYEN\r
+ * Date: 12/07/2009\r
+ *\r
+ */\r
+\r
+#include "ShoppingTreeModel.h"\r
+\r
+ShoppingTreeModel::ShoppingTreeModel()\r
+{\r
+}\r
--- /dev/null
+/*\r
+ * This file is part of family-shop-mgr.\r
+ *\r
+ * family-shop-mgr is free software: you can redistribute it and/or modify\r
+ * it under the terms of the GNU General Public License as published by\r
+ * the Free Software Foundation, either version 3 of the License, or\r
+ * (at your option) any later version.\r
+ *\r
+ * family-shop-mgr is distributed in the hope that it will be useful,\r
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
+ * GNU General Public License for more details.\r
+ *\r
+ * You should have received a copy of the GNU General Public License\r
+ * along with family-shop-mgr. If not, see <http://www.gnu.org/licenses/>.\r
+ *\r
+ * Author: Unai IRIGOYEN\r
+ * Date: 12/07/2009\r
+ *\r
+ */\r
+\r
+#ifndef SHOPPINGTREEMODEL_H\r
+#define SHOPPINGTREEMODEL_H\r
+\r
+#include <QAbstractItemModel>\r
+\r
+class ShoppingTreeModel : public QAbstractItemModel\r
+{\r
+public:\r
+ ShoppingTreeModel();\r
+\r
+private:\r
+ QDomDocument m_document;\r
+};\r
+\r
+#endif // SHOPPINGTREEMODEL_H\r
-#-------------------------------------------------
-#
-# Project created by QtCreator 2009-12-01T15:41:15
-#
-#-------------------------------------------------
-
-QT += xml
-
-TARGET = family-shop-mgr
-TEMPLATE = app
-
-
-SOURCES += main.cpp\
- FamilyShoppingManagerStartView.cpp
-
-HEADERS += FamilyShoppingManagerStartView.h
-
-FORMS += FamilyShoppingManagerStartView.ui
+# -------------------------------------------------\r
+# Project created by QtCreator 2009-12-01T15:41:15\r
+# -------------------------------------------------\r
+QT += xml\r
+TARGET = family-shop-mgr\r
+TEMPLATE = app\r
+SOURCES += main.cpp \\r
+ FamilyShoppingManagerStartView.cpp \\r
+ ShoppingTreeModel.cpp \\r
+ ShoppingTreeItem.cpp\r
+HEADERS += FamilyShoppingManagerStartView.h \\r
+ ShoppingTreeModel.h \\r
+ ShoppingTreeItem.h\r
+FORMS += FamilyShoppingManagerStartView.ui\r
<!DOCTYPE QtCreatorProject>
<qtcreator>
<data>
+ <variable>RunConfiguration0-BaseEnvironmentBase</variable>
+ <value type="int">2</value>
+ </data>
+ <data>
<variable>RunConfiguration0-CommandLineArguments</variable>
- <valuelist type="QVariantList" />
+ <valuelist type="QVariantList"/>
</data>
<data>
<variable>RunConfiguration0-ProFile</variable>
- <value type="QString" >family-shop-mgr.pro</value>
+ <value type="QString">family-shop-mgr.pro</value>
</data>
<data>
<variable>RunConfiguration0-RunConfiguration.name</variable>
- <value type="QString" >family-shop-mgr</value>
+ <value type="QString">family-shop-mgr</value>
</data>
<data>
<variable>RunConfiguration0-UseDyldImageSuffix</variable>
- <value type="bool" >false</value>
+ <value type="bool">false</value>
</data>
<data>
<variable>RunConfiguration0-UseTerminal</variable>
- <value type="bool" >false</value>
+ <value type="bool">false</value>
</data>
<data>
<variable>RunConfiguration0-UserEnvironmentChanges</variable>
- <valuelist type="QVariantList" />
+ <valuelist type="QVariantList"/>
</data>
<data>
<variable>RunConfiguration0-UserSetName</variable>
- <value type="bool" >false</value>
+ <value type="bool">false</value>
+ </data>
+ <data>
+ <variable>RunConfiguration0-UserSetWorkingDirectory</variable>
+ <value type="bool">false</value>
+ </data>
+ <data>
+ <variable>RunConfiguration0-UserWorkingDirectory</variable>
+ <value type="QString"></value>
</data>
<data>
<variable>RunConfiguration0-type</variable>
- <value type="QString" >Qt4ProjectManager.Qt4RunConfiguration</value>
+ <value type="QString">Qt4ProjectManager.Qt4RunConfiguration</value>
</data>
<data>
<variable>activeRunConfiguration</variable>
- <value type="int" >0</value>
+ <value type="int">0</value>
</data>
<data>
<variable>activebuildconfiguration</variable>
- <value type="QString" >Debug</value>
+ <value type="QString">Debug</value>
</data>
<data>
<variable>buildConfiguration-Debug</variable>
- <valuemap type="QVariantMap" >
- <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" >Debug</value>
- <value key="QtVersionId" type="int" >0</value>
+ <valuemap type="QVariantMap">
+ <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Debug</value>
+ <value key="QtVersionId" type="int">0</value>
+ <value key="ToolChain" type="int">2</value>
+ <value key="addQDumper" type=""></value>
+ <value key="buildConfiguration" type="int">2</value>
</valuemap>
</data>
<data>
<variable>buildConfiguration-Release</variable>
- <valuemap type="QVariantMap" >
- <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" >Release</value>
- <value key="QtVersionId" type="int" >0</value>
+ <valuemap type="QVariantMap">
+ <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Release</value>
+ <value key="QtVersionId" type="int">0</value>
+ <value key="ToolChain" type="int">2</value>
+ <value key="addQDumper" type=""></value>
+ <value key="buildConfiguration" type="int">0</value>
</valuemap>
</data>
<data>
<variable>buildconfiguration-Debug-buildstep0</variable>
- <valuemap type="QVariantMap" >
- <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" >Debug</value>
- <value key="buildConfiguration" type="int" >2</value>
+ <valuemap type="QVariantMap">
+ <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Debug</value>
+ <value key="buildConfiguration" type=""></value>
</valuemap>
</data>
<data>
<variable>buildconfiguration-Debug-buildstep1</variable>
- <valuemap type="QVariantMap" >
- <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" >Debug</value>
+ <valuemap type="QVariantMap">
+ <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Debug</value>
</valuemap>
</data>
<data>
<variable>buildconfiguration-Debug-cleanstep0</variable>
- <valuemap type="QVariantMap" >
- <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" >Debug</value>
+ <valuemap type="QVariantMap">
+ <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Debug</value>
+ <value key="cleanConfig" type="bool">true</value>
+ <valuelist key="makeargs" type="QVariantList">
+ <value type="QString">clean</value>
+ </valuelist>
</valuemap>
</data>
<data>
<variable>buildconfiguration-Release-buildstep0</variable>
- <valuemap type="QVariantMap" >
- <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" >Release</value>
- <value key="buildConfiguration" type="int" >0</value>
+ <valuemap type="QVariantMap">
+ <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Release</value>
+ <value key="buildConfiguration" type=""></value>
</valuemap>
</data>
<data>
<variable>buildconfiguration-Release-buildstep1</variable>
- <valuemap type="QVariantMap" >
- <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" >Release</value>
+ <valuemap type="QVariantMap">
+ <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Release</value>
</valuemap>
</data>
<data>
<variable>buildconfiguration-Release-cleanstep0</variable>
- <valuemap type="QVariantMap" >
- <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" >Release</value>
+ <valuemap type="QVariantMap">
+ <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Release</value>
</valuemap>
</data>
<data>
<variable>buildconfigurations</variable>
- <valuelist type="QVariantList" >
- <value type="QString" >Debug</value>
- <value type="QString" >Release</value>
+ <valuelist type="QVariantList">
+ <value type="QString">Debug</value>
+ <value type="QString">Release</value>
</valuelist>
</data>
<data>
<variable>buildstep0</variable>
- <valuemap type="QVariantMap" >
- <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" ></value>
- <value key="mkspec" type="QString" ></value>
+ <valuemap type="QVariantMap">
+ <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString"></value>
+ <value key="mkspec" type="QString"></value>
</valuemap>
</data>
<data>
<variable>buildstep1</variable>
- <valuemap type="QVariantMap" >
- <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" ></value>
+ <valuemap type="QVariantMap">
+ <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString"></value>
</valuemap>
</data>
<data>
<variable>buildsteps</variable>
- <valuelist type="QVariantList" >
- <value type="QString" >trolltech.qt4projectmanager.qmake</value>
- <value type="QString" >trolltech.qt4projectmanager.make</value>
+ <valuelist type="QVariantList">
+ <value type="QString">trolltech.qt4projectmanager.qmake</value>
+ <value type="QString">trolltech.qt4projectmanager.make</value>
</valuelist>
</data>
<data>
<variable>cleanstep0</variable>
- <valuemap type="QVariantMap" >
- <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" ></value>
- <value key="clean" type="bool" >true</value>
+ <valuemap type="QVariantMap">
+ <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString"></value>
+ <value key="clean" type="bool">true</value>
</valuemap>
</data>
<data>
<variable>cleansteps</variable>
- <valuelist type="QVariantList" >
- <value type="QString" >trolltech.qt4projectmanager.make</value>
+ <valuelist type="QVariantList">
+ <value type="QString">trolltech.qt4projectmanager.make</value>
</valuelist>
</data>
<data>
<variable>defaultFileEncoding</variable>
- <value type="QByteArray" >UTF-8</value>
+ <value type="QByteArray">UTF-8</value>
</data>
<data>
<variable>project</variable>
- <valuemap type="QVariantMap" />
+ <valuemap type="QVariantMap"/>
</data>
</qtcreator>
+/*
+ * 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 <QtGui/QApplication>
#include "FamilyShoppingManagerStartView.h"