1 /***************************************************************************
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
10 * Copyright (C) 2010 Robert Bieber
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
20 ****************************************************************************/
22 #ifndef PARSETREENODE_H
23 #define PARSETREENODE_H
25 #include "skin_parser.h"
34 ParseTreeNode(struct skin_element
* data
);
35 ParseTreeNode(struct skin_element
* data
, ParseTreeNode
* parent
);
36 ParseTreeNode(struct skin_tag_parameter
* data
, ParseTreeNode
* parent
);
37 virtual ~ParseTreeNode();
39 QString
genCode() const;
42 bool isParam() const{ if(param
) return true; else return false; }
43 struct skin_tag_parameter
* getParam(){ return param
;}
44 struct skin_element
* getElement(){return element
;}
46 ParseTreeNode
* child(int row
);
47 int numChildren() const;
48 QVariant
data(int column
) const;
50 ParseTreeNode
* getParent() const;
51 ParseTreeNode
* getChild(int row
) const
53 if(row
< children
.count())
60 ParseTreeNode
* parent
;
61 struct skin_element
* element
;
62 struct skin_tag_parameter
* param
;
63 QList
<ParseTreeNode
*> children
;
65 static int openConditionals
;
69 #endif // PARSETREENODE_H