summaryrefslogtreecommitdiff
path: root/utils/themeeditor/models/parsetreemodel.h
diff options
context:
space:
mode:
Diffstat (limited to 'utils/themeeditor/models/parsetreemodel.h')
-rw-r--r--utils/themeeditor/models/parsetreemodel.h15
1 files changed, 15 insertions, 0 deletions
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 @@
21 21
22#include "skin_parser.h" 22#include "skin_parser.h"
23#include "skin_debug.h" 23#include "skin_debug.h"
24#include "projectmodel.h"
24 25
25#ifndef PARSETREEMODEL_H 26#ifndef PARSETREEMODEL_H
26#define PARSETREEMODEL_H 27#define PARSETREEMODEL_H
27 28
28#include <QAbstractItemModel> 29#include <QAbstractItemModel>
29#include <QList> 30#include <QList>
31#include <QGraphicsScene>
30 32
31#include "parsetreenode.h" 33#include "parsetreenode.h"
32 34
@@ -58,9 +60,22 @@ public:
58 Qt::ItemFlags flags(const QModelIndex &index) const; 60 Qt::ItemFlags flags(const QModelIndex &index) const;
59 bool setData(const QModelIndex &index, const QVariant &value, int role); 61 bool setData(const QModelIndex &index, const QVariant &value, int role);
60 62
63 QGraphicsScene* render(ProjectModel* project);
64
65 static QString safeSetting(ProjectModel* project, QString key,
66 QString fallback)
67 {
68 if(project)
69 return project->getSetting(key, fallback);
70 else
71 return fallback;
72 }
73
74
61private: 75private:
62 ParseTreeNode* root; 76 ParseTreeNode* root;
63 struct skin_element* tree; 77 struct skin_element* tree;
78 QGraphicsScene* scene;
64}; 79};
65 80
66 81