blob: 4021a3ae8336d749749bc2d8acc309f450dff19d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
/*
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 <QList>
#include <QVariant>
class SmTreeItem {
public:
SmTreeItem(const QList<QVariant> &data, SmTreeItem *parent = 0);
SmTreeItem(int rows, SmTreeItem *parent = 0);
~SmTreeItem();
void appendChild(SmTreeItem *child);
SmTreeItem *child(int row) const;
SmTreeItem *next() 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);
bool insertChild(int where, SmTreeItem *child);
bool removeChild(int where, bool deleteChild = true);
friend class ArchiveCollector;
private:
SmTreeItem(const SmTreeItem &other);
QList<SmTreeItem*> mChildren;
QList<QVariant> mData;
SmTreeItem *mParent;
};
#endif
|