summaryrefslogtreecommitdiff
path: root/utils/themeeditor/gui/skindocument.h
diff options
context:
space:
mode:
authorRobert Bieber <robby@bieberphoto.com>2010-06-17 06:59:46 +0000
committerRobert Bieber <robby@bieberphoto.com>2010-06-17 06:59:46 +0000
commit75560845aad0cc8d1fccfeda5534489ca278ac80 (patch)
treecd51bb9dfb0a8a94677ac4b4beced11de9afd5b1 /utils/themeeditor/gui/skindocument.h
parent36b934d241d2560be6693f90c9aba501a1ec0ae7 (diff)
downloadrockbox-75560845aad0cc8d1fccfeda5534489ca278ac80.zip
rockbox-75560845aad0cc8d1fccfeda5534489ca278ac80.tar.gz
rockbox-75560845aad0cc8d1fccfeda5534489ca278ac80.tar.bz2
rockbox-75560845aad0cc8d1fccfeda5534489ca278ac80.tar.xz
Theme Editor: Working on renderer infrastructure
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26878 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'utils/themeeditor/gui/skindocument.h')
-rw-r--r--utils/themeeditor/gui/skindocument.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/utils/themeeditor/gui/skindocument.h b/utils/themeeditor/gui/skindocument.h
index c6449ca..68bec43 100644
--- a/utils/themeeditor/gui/skindocument.h
+++ b/utils/themeeditor/gui/skindocument.h
@@ -25,12 +25,14 @@
#include <QWidget>
#include <QLabel>
#include <QHBoxLayout>
+#include <QGraphicsScene>
#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