mirror of
https://github.com/yse/easy_profiler.git
synced 2024-12-26 16:11:02 +08:00
28 lines
540 B
C++
28 lines
540 B
C++
#ifndef TREEITEM_H
|
|
#define TREEITEM_H
|
|
|
|
#include <QList>
|
|
#include <QVariant>
|
|
|
|
class TreeItem
|
|
{
|
|
public:
|
|
explicit TreeItem(const QList<QVariant> &data, TreeItem *parentItem = 0);
|
|
~TreeItem();
|
|
|
|
void appendChild(TreeItem *child);
|
|
|
|
TreeItem *child(int row);
|
|
int childCount() const;
|
|
int columnCount() const;
|
|
QVariant data(int column) const;
|
|
int row() const;
|
|
TreeItem *parentItem();
|
|
|
|
private:
|
|
QList<TreeItem*> m_childItems;
|
|
QList<QVariant> m_itemData;
|
|
TreeItem *m_parentItem;
|
|
};
|
|
|
|
#endif // TREEITEM_H
|