treeitem.h
changeset 725 7ea31701156e
child 726 7f43b93242aa
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/treeitem.h	Tue Aug 05 07:36:53 2008 +0000
     1.3 @@ -0,0 +1,28 @@
     1.4 +#ifndef TREEITEM_H
     1.5 +#define TREEITEM_H
     1.6 +
     1.7 +#include <QList>
     1.8 +#include <QVariant>
     1.9 +
    1.10 +class TreeItem
    1.11 +{
    1.12 +public:
    1.13 +    TreeItem(const QList<QVariant> &data, TreeItem *parent = 0);
    1.14 +    ~TreeItem();
    1.15 +
    1.16 +    void appendChild(TreeItem *child);
    1.17 +
    1.18 +    TreeItem *child(int row);
    1.19 +    int childCount() const;
    1.20 +    int columnCount() const;
    1.21 +    QVariant data(int column) const;
    1.22 +    int row() const;
    1.23 +    TreeItem *parent();
    1.24 +
    1.25 +private:
    1.26 +    QList<TreeItem*> childItems;
    1.27 +    QList<QVariant> itemData;
    1.28 +    TreeItem *parentItem;
    1.29 +};
    1.30 +
    1.31 +#endif