summaryrefslogtreecommitdiffstats
path: root/utils/themeeditor/models
diff options
context:
space:
mode:
authorRobert Bieber <robby@bieberphoto.com>2010-06-26 05:51:07 +0000
committerRobert Bieber <robby@bieberphoto.com>2010-06-26 05:51:07 +0000
commit5300c7014d602c57fcae7f6619f5138d83ba33c0 (patch)
tree2fff7d8ac48dfc7c3395c57c31efdc7b90707d61 /utils/themeeditor/models
parentc32728c91c2579688d3e7ffc4afbea1acf2385e0 (diff)
downloadrockbox-5300c7014d602c57fcae7f6619f5138d83ba33c0.tar.gz
rockbox-5300c7014d602c57fcae7f6619f5138d83ba33c0.zip
Theme Editor: Added Show Viewports option to device configuration panel, implemented simple rendering of info tags from device configuration
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27136 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'utils/themeeditor/models')
-rw-r--r--utils/themeeditor/models/parsetreemodel.cpp8
-rw-r--r--utils/themeeditor/models/parsetreenode.cpp7
2 files changed, 14 insertions, 1 deletions
diff --git a/utils/themeeditor/models/parsetreemodel.cpp b/utils/themeeditor/models/parsetreemodel.cpp
index ff8a27c660..4f6fd451e6 100644
--- a/utils/themeeditor/models/parsetreemodel.cpp
+++ b/utils/themeeditor/models/parsetreemodel.cpp
@@ -295,6 +295,7 @@ QGraphicsScene* ParseTreeModel::render(ProjectModel* project,
settings.insert("themebase", base.canonicalPath());
}
+ bool remote = false;
if(file)
{
QString skinFile = *file;
@@ -303,13 +304,18 @@ QGraphicsScene* ParseTreeModel::render(ProjectModel* project,
skinFile.chop(skinFile.length() - skinFile.lastIndexOf("."));
settings.insert("imagepath", settings.value("themebase","") + "/wps/" +
skinFile);
+
+ decomp = file->split(".");
+ QString extension = decomp.last();
+ if(extension[0] == 'r')
+ remote = true;
}
RBScreen* screen = 0;
RBRenderInfo info(this, project, &settings, device, screen);
/* Adding the screen */
- screen = new RBScreen(info);
+ screen = new RBScreen(info, remote);
scene->addItem(screen);
info = RBRenderInfo(this, project, &settings, device, screen);
diff --git a/utils/themeeditor/models/parsetreenode.cpp b/utils/themeeditor/models/parsetreenode.cpp
index 5e298be255..7b355687bb 100644
--- a/utils/themeeditor/models/parsetreenode.cpp
+++ b/utils/themeeditor/models/parsetreenode.cpp
@@ -524,6 +524,13 @@ void ParseTreeNode::render(const RBRenderInfo &info, RBViewport* viewport)
}
else if(element->type == TAG)
{
+
+ if(info.device()->data(QString(element->tag->name)).isValid())
+ viewport->write(info.device()->
+ data(QString(element->tag->name)).toString());
+
+ /* These are for special cases */
+
QString filename;
QString id;
int x, y, tiles, tile;