X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;f=code%2Ffamily-shop-mgr%2FGUI%2FGoShoppingView.cpp;fp=code%2Ffamily-shop-mgr%2FGUI%2FGoShoppingView.cpp;h=37275e4a751e48f3ca411e8a477759429f64de27;hb=72201ddd2c26ef3575f5504d2eb07b0940f8aa80;hp=0000000000000000000000000000000000000000;hpb=6d19d55e61c6fe26d16f246c06bec58b955010ca;p=family-shop-mgr diff --git a/code/family-shop-mgr/GUI/GoShoppingView.cpp b/code/family-shop-mgr/GUI/GoShoppingView.cpp new file mode 100644 index 0000000..37275e4 --- /dev/null +++ b/code/family-shop-mgr/GUI/GoShoppingView.cpp @@ -0,0 +1,44 @@ +/* + * 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/17/2009 + * + */ + +#include "GoShoppingView.h" + +#include "ShoppingTreeModel.h" + +/*******************************************************************/ +GoShoppingView::GoShoppingView(QString xmlFileName, QWidget *parent) + :QTreeView(parent) +{ + ShoppingTreeModel *model = new ShoppingTreeModel(xmlFileName, this); + this->setModel(model); + this->setAnimated(true); + this->setAutoExpandDelay(1); + this->setAutoScroll(true); + this->setExpandsOnDoubleClick(true); + this->setSortingEnabled(true); + for(int column = 0; column < model->columnCount(); column++) + this->resizeColumnToContents(column); +} + +/*******************************************************************/ +GoShoppingView::~GoShoppingView() +{ +}