1
0
Fork 0
forked from len0rd/rockbox

Theme Editor: Fixed a bug in the subline parser, added a LINE element to contain logical lines, working on data model

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26337 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Robert Bieber 2010-05-27 19:57:15 +00:00
parent deb1600bbc
commit 8ea056db4b
7 changed files with 58 additions and 27 deletions

View file

@ -1,16 +1,34 @@
#include "parsetreenode.h"
ParseTreeNode::ParseTreeNode(struct skin_element* data, ParseTreeNode* parent,
bool stop):
parentLink(parent), element(data)
bool tree)
{
if(stop)
return;
for(int i = 0; i < 5; i++)
appendChild(new ParseTreeNode(data, this, true));
if(tree)
{
while(data)
{
appendChild(new ParseTreeNode(data, this, false));
data = data->next;
}
parentLink = 0;
}
else
{
element = data;
parentLink = parent;
}
}
ParseTreeNode::ParseTreeNode(struct skin_tag_parameter* param,
ParseTreeNode* parent)
:parentLink(parent), element(0), param(param)
{
}
ParseTreeNode::~ParseTreeNode()
{
qDeleteAll(children);