1
0
Fork 0
forked from len0rd/rockbox

Theme Editor: Working on renderer infrastructure

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26878 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Robert Bieber 2010-06-17 06:59:46 +00:00
parent 36b934d241
commit 75560845aa
8 changed files with 118 additions and 25 deletions

View file

@ -36,6 +36,8 @@ ParseTreeModel::ParseTreeModel(const char* document, QObject* parent):
this->root = new ParseTreeNode(tree);
else
this->root = 0;
scene = new QGraphicsScene();
}
@ -264,3 +266,15 @@ bool ParseTreeModel::setData(const QModelIndex &index, const QVariant &value,
emit dataChanged(index, index);
return true;
}
QGraphicsScene* ParseTreeModel::render(ProjectModel* project)
{
scene->clear();
/* First we set the screen size */
int screenWidth = safeSetting(project, "#screenwidth", "300").toInt();
int screenHeight = safeSetting(project, "#screenheight", "200").toInt();
scene->addRect(0, 0, screenWidth, screenHeight);
return scene;
}