From 75560845aad0cc8d1fccfeda5534489ca278ac80 Mon Sep 17 00:00:00 2001 From: Robert Bieber Date: Thu, 17 Jun 2010 06:59:46 +0000 Subject: Theme Editor: Working on renderer infrastructure git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26878 a1c6a512-1295-4272-9138-f99709370657 --- utils/themeeditor/models/parsetreemodel.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'utils/themeeditor/models/parsetreemodel.h') diff --git a/utils/themeeditor/models/parsetreemodel.h b/utils/themeeditor/models/parsetreemodel.h index 55af549e6c..1f252a3f20 100644 --- a/utils/themeeditor/models/parsetreemodel.h +++ b/utils/themeeditor/models/parsetreemodel.h @@ -21,12 +21,14 @@ #include "skin_parser.h" #include "skin_debug.h" +#include "projectmodel.h" #ifndef PARSETREEMODEL_H #define PARSETREEMODEL_H #include #include +#include #include "parsetreenode.h" @@ -58,9 +60,22 @@ public: Qt::ItemFlags flags(const QModelIndex &index) const; bool setData(const QModelIndex &index, const QVariant &value, int role); + QGraphicsScene* render(ProjectModel* project); + + static QString safeSetting(ProjectModel* project, QString key, + QString fallback) + { + if(project) + return project->getSetting(key, fallback); + else + return fallback; + } + + private: ParseTreeNode* root; struct skin_element* tree; + QGraphicsScene* scene; }; -- cgit v1.2.3