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/gui/skindocument.h | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'utils/themeeditor/gui/skindocument.h') diff --git a/utils/themeeditor/gui/skindocument.h b/utils/themeeditor/gui/skindocument.h index c6449ca627..68bec43913 100644 --- a/utils/themeeditor/gui/skindocument.h +++ b/utils/themeeditor/gui/skindocument.h @@ -25,12 +25,14 @@ #include #include #include +#include #include "skinhighlighter.h" #include "parsetreemodel.h" #include "preferencesdialog.h" #include "codeeditor.h" #include "tabcontent.h" +#include "projectmodel.h" class SkinDocument : public TabContent { @@ -46,8 +48,10 @@ public: "All Files (*.*)"); } - SkinDocument(QLabel* statusLabel, QWidget *parent = 0); - SkinDocument(QLabel* statusLabel, QString file, QWidget* parent = 0); + SkinDocument(QLabel* statusLabel, ProjectModel* project = 0, + QWidget *parent = 0); + SkinDocument(QLabel* statusLabel, QString file, ProjectModel* project = 0, + QWidget* parent = 0); virtual ~SkinDocument(); void connectPrefs(PreferencesDialog* prefs); @@ -57,6 +61,7 @@ public: QString title() const{ return titleText; } QString getStatus(){ return parseStatus; } void genCode(){ editor->document()->setPlainText(model->genCode()); } + void setProject(ProjectModel* project){ this->project = project; } void save(); void saveAs(); @@ -65,6 +70,8 @@ public: TabType type() const{ return Skin; } + QGraphicsScene* scene(){ return model->render(project); } + signals: public slots: @@ -76,6 +83,7 @@ private slots: private: void setupUI(); + QString findSetting(QString key, QString fallback); QString titleText; QString fileName; @@ -91,6 +99,8 @@ private: QLabel* statusLabel; bool blockUpdate; + + ProjectModel* project; }; #endif // SKINDOCUMENT_H -- cgit v1.2.3