/* This program 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 2 of the License, or (at your option) any later version. */ #ifndef SMTREEITEM_H #define SMTREEITEM_H #include #include class SmTreeItem { public: SmTreeItem(const QList &data, SmTreeItem *parent = 0); SmTreeItem(int rows, SmTreeItem *parent = 0); SmTreeItem(const SmTreeItem &other); ~SmTreeItem(); void appendChild(SmTreeItem *child); SmTreeItem *child(int row) const; int childCount() const; int columnCount() const; int row() const; SmTreeItem *parent() const; void setParent(SmTreeItem *parent); QVariant data(int column) const; void setData(int column, const QVariant &data); QVariant foregroundColor() const; void setForegroundColor(const QVariant &data); bool insertChild(int where, SmTreeItem *child); bool removeChild(int where, bool deleteChild = true); private: QList mChildren; QList mData; QVariant mForegroundColor; SmTreeItem *mParent; }; #endif