diff options
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 a709ea7..0b80416 100644 --- a/utils/themeeditor/models/parsetreemodel.cpp +++ b/utils/themeeditor/models/parsetreemodel.cpp @@ -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; +} |