summaryrefslogtreecommitdiff
path: root/utils/themeeditor
diff options
context:
space:
mode:
authorRobert Bieber <robby@bieberphoto.com>2010-07-04 01:47:04 +0000
committerRobert Bieber <robby@bieberphoto.com>2010-07-04 01:47:04 +0000
commit2a7fc15448b7e2e1f599419da0814aaffbeeae27 (patch)
tree157085239e431ea1b9445bc943ca53f4a9ec294b /utils/themeeditor
parent32ff4e93bdc15a21faf23e46bd2e0eb659bf8f31 (diff)
Theme Editor: WPS documents rendered within SBS documents can now set backdrops
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27269 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'utils/themeeditor')
-rw-r--r--utils/themeeditor/graphics/rbrenderinfo.cpp8
-rw-r--r--utils/themeeditor/graphics/rbrenderinfo.h4
-rw-r--r--utils/themeeditor/models/parsetreemodel.cpp4
-rw-r--r--utils/themeeditor/models/parsetreenode.cpp5
4 files changed, 15 insertions, 6 deletions
diff --git a/utils/themeeditor/graphics/rbrenderinfo.cpp b/utils/themeeditor/graphics/rbrenderinfo.cpp
index 311603495c..0b9ea41397 100644
--- a/utils/themeeditor/graphics/rbrenderinfo.cpp
+++ b/utils/themeeditor/graphics/rbrenderinfo.cpp
@@ -23,9 +23,11 @@
RBRenderInfo::RBRenderInfo(ParseTreeModel* model, ProjectModel* project,
QMap<QString, QString>* settings,
- DeviceState* device, RBScreen* screen)
+ DeviceState* device, RBScreen* screen,
+ RBScreen* sbsScreen)
:mProject(project), mSettings(settings),
- mDevice(device), mScreen(screen), mModel(model)
+ mDevice(device), mScreen(screen),
+ mSbsScreen(sbsScreen), mModel(model)
{
}
@@ -40,6 +42,7 @@ RBRenderInfo::RBRenderInfo(const RBRenderInfo &other)
mSettings = other.mSettings;
mDevice = other.mDevice;
mScreen = other.mScreen;
+ mSbsScreen = other.mSbsScreen;
mModel = other.mModel;
}
@@ -49,6 +52,7 @@ const RBRenderInfo& RBRenderInfo::operator=(const RBRenderInfo& other)
mSettings = other.mSettings;
mDevice = other.mDevice;
mScreen = other.mScreen;
+ mSbsScreen = other.mSbsScreen;
mModel = other.mModel;
return *this;
diff --git a/utils/themeeditor/graphics/rbrenderinfo.h b/utils/themeeditor/graphics/rbrenderinfo.h
index 0e219383e2..599a563da2 100644
--- a/utils/themeeditor/graphics/rbrenderinfo.h
+++ b/utils/themeeditor/graphics/rbrenderinfo.h
@@ -34,7 +34,7 @@ class RBRenderInfo
public:
RBRenderInfo(ParseTreeModel* model, ProjectModel* project,
QMap<QString, QString>* settings, DeviceState* device,
- RBScreen* screen);
+ RBScreen* screen, RBScreen* sbsScreen = 0);
RBRenderInfo();
RBRenderInfo(const RBRenderInfo& other);
virtual ~RBRenderInfo();
@@ -45,6 +45,7 @@ public:
DeviceState* device() const{ return mDevice; }
QMap<QString, QString>* settings() const{ return mSettings; }
RBScreen* screen() const{ return mScreen; }
+ RBScreen* sbsScreen() const{ return mSbsScreen; }
ParseTreeModel* model() const{ return mModel; }
private:
@@ -52,6 +53,7 @@ private:
QMap<QString, QString>* mSettings;
DeviceState* mDevice;
RBScreen* mScreen;
+ RBScreen* mSbsScreen;
ParseTreeModel* mModel;
};
diff --git a/utils/themeeditor/models/parsetreemodel.cpp b/utils/themeeditor/models/parsetreemodel.cpp
index 47b24174b7..a04a0d9202 100644
--- a/utils/themeeditor/models/parsetreemodel.cpp
+++ b/utils/themeeditor/models/parsetreemodel.cpp
@@ -340,7 +340,7 @@ QGraphicsScene* ParseTreeModel::render(ProjectModel* project,
}
RBScreen* screen = 0;
- RBRenderInfo info(this, project, &settings, device, screen);
+ RBRenderInfo info(this, project, &settings, device, screen, sbsScreen);
/* Adding the screen */
if(sbsScreen)
@@ -351,7 +351,7 @@ QGraphicsScene* ParseTreeModel::render(ProjectModel* project,
if(!sbsScreen)
scene->addItem(screen);
- info = RBRenderInfo(this, project, &settings, device, screen);
+ info = RBRenderInfo(this, project, &settings, device, screen, sbsScreen);
/* Rendering the tree */
diff --git a/utils/themeeditor/models/parsetreenode.cpp b/utils/themeeditor/models/parsetreenode.cpp
index 1fda29fec7..7efcbc3ffc 100644
--- a/utils/themeeditor/models/parsetreenode.cpp
+++ b/utils/themeeditor/models/parsetreenode.cpp
@@ -811,7 +811,10 @@ bool ParseTreeNode::execTag(const RBRenderInfo& info, RBViewport* viewport)
case '\0':
/* %X */
filename = QString(element->params[0].data.text);
- info.screen()->setBackdrop(filename);
+ if(info.sbsScreen())
+ info.sbsScreen()->setBackdrop(filename);
+ else
+ info.screen()->setBackdrop(filename);
return true;
}