2010-05-29 00:04:04 +00:00
|
|
|
/***************************************************************************
|
|
|
|
* __________ __ ___.
|
|
|
|
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
|
|
|
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
|
|
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
|
|
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
|
|
|
* \/ \/ \/ \/ \/
|
|
|
|
* $Id$
|
|
|
|
*
|
|
|
|
* Copyright (C) 2010 Robert Bieber
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
|
|
|
* KIND, either express or implied.
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
2010-05-26 21:13:14 +00:00
|
|
|
#ifndef PARSETREENODE_H
|
|
|
|
#define PARSETREENODE_H
|
|
|
|
|
|
|
|
extern "C"
|
|
|
|
{
|
|
|
|
#include "skin_parser.h"
|
|
|
|
}
|
|
|
|
|
|
|
|
#include <QString>
|
|
|
|
#include <QVariant>
|
|
|
|
#include <QList>
|
|
|
|
|
|
|
|
class ParseTreeNode
|
|
|
|
{
|
|
|
|
public:
|
2010-05-29 00:04:04 +00:00
|
|
|
ParseTreeNode(struct skin_element* data);
|
|
|
|
ParseTreeNode(struct skin_element* data, ParseTreeNode* parent);
|
|
|
|
ParseTreeNode(struct skin_tag_parameter* data, ParseTreeNode* parent);
|
2010-05-30 01:20:05 +00:00
|
|
|
virtual ~ParseTreeNode();
|
2010-05-26 21:13:14 +00:00
|
|
|
|
2010-05-29 00:04:04 +00:00
|
|
|
QString genCode() const;
|
2010-05-26 21:13:14 +00:00
|
|
|
|
|
|
|
ParseTreeNode* child(int row);
|
2010-05-29 00:04:04 +00:00
|
|
|
int numChildren() const;
|
2010-05-26 21:13:14 +00:00
|
|
|
QVariant data(int column) const;
|
2010-05-29 00:04:04 +00:00
|
|
|
int getRow() const;
|
2010-05-30 01:20:05 +00:00
|
|
|
ParseTreeNode* getParent() const;
|
2010-05-26 21:13:14 +00:00
|
|
|
|
|
|
|
private:
|
2010-05-29 00:04:04 +00:00
|
|
|
ParseTreeNode* parent;
|
2010-05-26 21:13:14 +00:00
|
|
|
struct skin_element* element;
|
2010-05-27 19:57:15 +00:00
|
|
|
struct skin_tag_parameter* param;
|
2010-05-29 00:04:04 +00:00
|
|
|
QList<ParseTreeNode*> children;
|
2010-05-26 21:13:14 +00:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // PARSETREENODE_H
|