summaryrefslogtreecommitdiffstats
path: root/utils/themeeditor/parsetreenode.h
blob: bc091b9aa4d4ce25be862f639fadd507066ca745 (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
#ifndef PARSETREENODE_H
#define PARSETREENODE_H

extern "C"
{
#include "skin_parser.h"
}

#include <QString>
#include <QVariant>
#include <QList>

class ParseTreeNode
{
public:
    ParseTreeNode(struct skin_element* data, ParseTreeNode* parent, bool stop = false);
    virtual ~ParseTreeNode();

    void appendChild(ParseTreeNode* child);

    ParseTreeNode* child(int row);
    int childCount() const;
    int columnCount() const;
    QVariant data(int column) const;
    int row() const;
    ParseTreeNode* parent();

private:
    ParseTreeNode* parentLink;
    QList<ParseTreeNode*> children;
    struct skin_element* element;

};

#endif // PARSETREENODE_H