diff options
author | Robert Bieber <robby@bieberphoto.com> | 2010-06-17 06:59:46 +0000 |
---|---|---|
committer | Robert Bieber <robby@bieberphoto.com> | 2010-06-17 06:59:46 +0000 |
commit | 75560845aad0cc8d1fccfeda5534489ca278ac80 (patch) | |
tree | cd51bb9dfb0a8a94677ac4b4beced11de9afd5b1 /utils/themeeditor/models/parsetreemodel.cpp | |
parent | 36b934d241d2560be6693f90c9aba501a1ec0ae7 (diff) | |
download | rockbox-75560845aad0cc8d1fccfeda5534489ca278ac80.tar.gz rockbox-75560845aad0cc8d1fccfeda5534489ca278ac80.zip |
Theme Editor: Working on renderer infrastructure
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26878 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'utils/themeeditor/models/parsetreemodel.cpp')
-rw-r--r-- | utils/themeeditor/models/parsetreemodel.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/utils/themeeditor/models/parsetreemodel.cpp b/utils/themeeditor/models/parsetreemodel.cpp index a709ea762f..0b80416d3a 100644 --- a/utils/themeeditor/models/parsetreemodel.cpp +++ b/utils/themeeditor/models/parsetreemodel.cpp | |||
@@ -36,6 +36,8 @@ ParseTreeModel::ParseTreeModel(const char* document, QObject* parent): | |||
36 | this->root = new ParseTreeNode(tree); | 36 | this->root = new ParseTreeNode(tree); |
37 | else | 37 | else |
38 | this->root = 0; | 38 | this->root = 0; |
39 | |||
40 | scene = new QGraphicsScene(); | ||
39 | } | 41 | } |
40 | 42 | ||
41 | 43 | ||
@@ -264,3 +266,15 @@ bool ParseTreeModel::setData(const QModelIndex &index, const QVariant &value, | |||
264 | emit dataChanged(index, index); | 266 | emit dataChanged(index, index); |
265 | return true; | 267 | return true; |
266 | } | 268 | } |
269 | |||
270 | QGraphicsScene* ParseTreeModel::render(ProjectModel* project) | ||
271 | { | ||
272 | scene->clear(); | ||
273 | |||
274 | /* First we set the screen size */ | ||
275 | int screenWidth = safeSetting(project, "#screenwidth", "300").toInt(); | ||
276 | int screenHeight = safeSetting(project, "#screenheight", "200").toInt(); | ||
277 | scene->addRect(0, 0, screenWidth, screenHeight); | ||
278 | |||
279 | return scene; | ||
280 | } | ||