-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathhiveitem.h
38 lines (30 loc) · 812 Bytes
/
hiveitem.h
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
#ifndef HIVEITEM_H
#define HIVEITEM_H
#include <QMutex>
#include <QString>
#include <QList>
#include <QVariant>
#include <QPair>
class HiveItem
{
public:
HiveItem(HiveItem *parent, int index, QString name);
virtual ~HiveItem();
virtual HiveItem *parentItem();
virtual HiveItem *childItem(int index);
virtual int index() const;
virtual QString name() const;
virtual QVariant data() const;
// Display string & whether "special" or not
virtual QPair<QString, bool> dataDisplay() const;
virtual int childCount() const;
virtual bool hasChildren() const;
virtual bool isNode() const = 0;
virtual QList<HiveItem *> getValues();
void updateIndex(int index);
private:
HiveItem *m_parentItem;
int m_index;
QString m_name;
};
#endif // HIVEITEM_H