summaryrefslogtreecommitdiffstats
path: root/utils/themeeditor/parsetreenode.h
diff options
context:
space:
mode:
authorRobert Bieber <robby@bieberphoto.com>2010-05-29 00:04:04 +0000
committerRobert Bieber <robby@bieberphoto.com>2010-05-29 00:04:04 +0000
commit6980c1e9988a7c959876ad77b760e042272a9ec2 (patch)
tree3b9ca757bfe83f8bef1ac9bcf544b1d47b542e8e /utils/themeeditor/parsetreenode.h
parent1dcc21d8466a6279ff79c8b9ee02bc5cfc7f5167 (diff)
downloadrockbox-6980c1e9988a7c959876ad77b760e042272a9ec2.tar.gz
rockbox-6980c1e9988a7c959876ad77b760e042272a9ec2.tar.bz2
rockbox-6980c1e9988a7c959876ad77b760e042272a9ec2.zip
Theme Editor: Got code generation tentatively working along with a solid C++ tree structure for WPS parse trees
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26367 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'utils/themeeditor/parsetreenode.h')
-rw-r--r--utils/themeeditor/parsetreenode.h40
1 files changed, 30 insertions, 10 deletions
diff --git a/utils/themeeditor/parsetreenode.h b/utils/themeeditor/parsetreenode.h
index c3372e0a20..4d8c4ebc14 100644
--- a/utils/themeeditor/parsetreenode.h
+++ b/utils/themeeditor/parsetreenode.h
@@ -1,3 +1,24 @@
+/***************************************************************************
+ * __________ __ ___.
+ * 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.
+ *
+ ****************************************************************************/
+
#ifndef PARSETREENODE_H
#define PARSETREENODE_H
@@ -13,24 +34,23 @@ extern "C"
class ParseTreeNode
{
public:
- ParseTreeNode(struct skin_element* data, ParseTreeNode* parent, bool tree);
- ParseTreeNode(struct skin_tag_parameter* param, ParseTreeNode* parent);
- virtual ~ParseTreeNode();
+ ParseTreeNode(struct skin_element* data);
+ ParseTreeNode(struct skin_element* data, ParseTreeNode* parent);
+ ParseTreeNode(struct skin_tag_parameter* data, ParseTreeNode* parent);
- void appendChild(ParseTreeNode* child);
+ QString genCode() const;
ParseTreeNode* child(int row);
- int childCount() const;
- int columnCount() const;
+ int numChildren() const;
QVariant data(int column) const;
- int row() const;
- ParseTreeNode* parent();
+ int getRow() const;
+ ParseTreeNode* getParent();
private:
- ParseTreeNode* parentLink;
- QList<ParseTreeNode*> children;
+ ParseTreeNode* parent;
struct skin_element* element;
struct skin_tag_parameter* param;
+ QList<ParseTreeNode*> children;
};