summaryrefslogtreecommitdiffstats
path: root/utils/themeeditor/parsetreenode.h
diff options
context:
space:
mode:
authorRobert Bieber <robby@bieberphoto.com>2010-05-26 21:13:14 +0000
committerRobert Bieber <robby@bieberphoto.com>2010-05-26 21:13:14 +0000
commit565cd0096393dcd3a33b546d76714c64c2c786e3 (patch)
tree2b1882d987048bb00cd394a50f1cb24585b08af5 /utils/themeeditor/parsetreenode.h
parent28a7c5d3692e59b5c80a9f713cf931b6453cb1ca (diff)
downloadrockbox-565cd0096393dcd3a33b546d76714c64c2c786e3.tar.gz
rockbox-565cd0096393dcd3a33b546d76714c64c2c786e3.tar.bz2
rockbox-565cd0096393dcd3a33b546d76714c64c2c786e3.zip
Trying to implement QAbstractItemModel for parse trees, haven't got it working yet (current state will spawn an empty treeview window)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26318 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'utils/themeeditor/parsetreenode.h')
-rw-r--r--utils/themeeditor/parsetreenode.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/utils/themeeditor/parsetreenode.h b/utils/themeeditor/parsetreenode.h
new file mode 100644
index 0000000000..bc091b9aa4
--- /dev/null
+++ b/utils/themeeditor/parsetreenode.h
@@ -0,0 +1,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