summaryrefslogtreecommitdiff
path: root/utils/themeeditor/models/parsetreemodel.cpp
diff options
context:
space:
mode:
authorRobert Bieber <robby@bieberphoto.com>2010-06-17 20:44:11 +0000
committerRobert Bieber <robby@bieberphoto.com>2010-06-17 20:44:11 +0000
commit02c377469a00ae0634b3269935ce5fa186e0ee58 (patch)
treebf60f59b02160e153171c4877699c4c54fea30cd /utils/themeeditor/models/parsetreemodel.cpp
parent60200755512e0b2c0758ac3697f06194e9809f40 (diff)
downloadrockbox-02c377469a00ae0634b3269935ce5fa186e0ee58.tar.gz
rockbox-02c377469a00ae0634b3269935ce5fa186e0ee58.zip
Theme Editor: Continuing work on rendering, skin preview will now show backdrop or background color depending on config file
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26900 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'utils/themeeditor/models/parsetreemodel.cpp')
-rw-r--r--utils/themeeditor/models/parsetreemodel.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/utils/themeeditor/models/parsetreemodel.cpp b/utils/themeeditor/models/parsetreemodel.cpp
index 0b80416d3a..762443f4a5 100644
--- a/utils/themeeditor/models/parsetreemodel.cpp
+++ b/utils/themeeditor/models/parsetreemodel.cpp
@@ -22,10 +22,12 @@
22 22
23#include "parsetreemodel.h" 23#include "parsetreemodel.h"
24#include "symbols.h" 24#include "symbols.h"
25#include "rbscreen.h"
25 26
26#include <cstdlib> 27#include <cstdlib>
27 28
28#include <QObject> 29#include <QObject>
30#include <QPixmap>
29 31
30ParseTreeModel::ParseTreeModel(const char* document, QObject* parent): 32ParseTreeModel::ParseTreeModel(const char* document, QObject* parent):
31 QAbstractItemModel(parent) 33 QAbstractItemModel(parent)
@@ -271,10 +273,12 @@ QGraphicsScene* ParseTreeModel::render(ProjectModel* project)
271{ 273{
272 scene->clear(); 274 scene->clear();
273 275
274 /* First we set the screen size */ 276 /* Setting the background */
275 int screenWidth = safeSetting(project, "#screenwidth", "300").toInt(); 277 scene->setBackgroundBrush(QBrush(QPixmap(":/render/scenebg.png")));
276 int screenHeight = safeSetting(project, "#screenheight", "200").toInt(); 278
277 scene->addRect(0, 0, screenWidth, screenHeight); 279 /* Adding the screen */
280 RBScreen* screen = new RBScreen(project);
281 scene->addItem(screen);
278 282
279 return scene; 283 return scene;
280} 284}