-
Notifications
You must be signed in to change notification settings - Fork 41
/
domitem.h
52 lines (38 loc) · 1.03 KB
/
domitem.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#ifndef DOMITEM_H
#define DOMITEM_H
#include <QDebug>
#include <QList>
#include <QMessageBox>
#include <QString>
class DomItem {
public:
DomItem(int row, QString n, DomItem* parent = 0);
DomItem();
~DomItem();
DomItem* child(int i);
DomItem* parent();
int row() const;
DomItem* addChild(int i = -1, DomItem* item = NULL);
void removeChild(int i);
void removeFromParent(int row);
QString getName();
QString getType();
QString getValue();
void setName(QString n);
void setType(QString t);
void setValue(QString v);
void setData(QString n, QString t, QString v);
int childCount() const;
DomItem* clone();
QList<DomItem*> childItems;
void sort_key(Qt::SortOrder order);
void sort(int column, Qt::SortOrder order);
static bool lessThan_key(const DomItem* item1, const DomItem* item2);
private:
QString name;
QString type;
QString value;
DomItem* parentItem;
int rowNumber;
};
#endif