2 * This file is part of family-shop-mgr.
\r
4 * family-shop-mgr is free software: you can redistribute it and/or modify
\r
5 * it under the terms of the GNU General Public License as published by
\r
6 * the Free Software Foundation, either version 3 of the License, or
\r
7 * (at your option) any later version.
\r
9 * family-shop-mgr is distributed in the hope that it will be useful,
\r
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
12 * GNU General Public License for more details.
\r
14 * You should have received a copy of the GNU General Public License
\r
15 * along with family-shop-mgr. If not, see <http://www.gnu.org/licenses/>.
\r
17 * Author: Unai IRIGOYEN
\r
22 #ifndef SHOPPINGTREEITEM_H
\r
23 #define SHOPPINGTREEITEM_H
\r
29 class ShoppingTreeItem
\r
32 ShoppingTreeItem(const QVector<QVariant> &data, ShoppingTreeItem *parent = 0);
\r
33 ~ShoppingTreeItem();
\r
35 ShoppingTreeItem *child(int number);
\r
36 int childCount() const;
\r
37 int columnCount() const;
\r
38 QVariant data(int column) const;
\r
39 bool insertChildren(int position, int count, int columns);
\r
40 bool insertColumns(int position, int columns);
\r
41 ShoppingTreeItem *parent();
\r
42 bool removeChildren(int position, int count);
\r
43 bool removeColumns(int position, int columns);
\r
44 int childNumber() const;
\r
45 bool setData(int column, const QVariant &value);
\r
48 QList<ShoppingTreeItem*> childItems;
\r
49 QVector<QVariant> itemData;
\r
50 ShoppingTreeItem *parentItem;
\r
53 #endif // SHOPPINGTREEITEM_H
\r