diff options
author | Robert Bieber <robby@bieberphoto.com> | 2010-06-17 06:59:46 +0000 |
---|---|---|
committer | Robert Bieber <robby@bieberphoto.com> | 2010-06-17 06:59:46 +0000 |
commit | 75560845aad0cc8d1fccfeda5534489ca278ac80 (patch) | |
tree | cd51bb9dfb0a8a94677ac4b4beced11de9afd5b1 /utils/themeeditor/gui/skindocument.h | |
parent | 36b934d241d2560be6693f90c9aba501a1ec0ae7 (diff) | |
download | rockbox-75560845aad0cc8d1fccfeda5534489ca278ac80.tar.gz rockbox-75560845aad0cc8d1fccfeda5534489ca278ac80.zip |
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.h | 14 |
1 files changed, 12 insertions, 2 deletions
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 @@ | |||
25 | #include <QWidget> | 25 | #include <QWidget> |
26 | #include <QLabel> | 26 | #include <QLabel> |
27 | #include <QHBoxLayout> | 27 | #include <QHBoxLayout> |
28 | #include <QGraphicsScene> | ||
28 | 29 | ||
29 | #include "skinhighlighter.h" | 30 | #include "skinhighlighter.h" |
30 | #include "parsetreemodel.h" | 31 | #include "parsetreemodel.h" |
31 | #include "preferencesdialog.h" | 32 | #include "preferencesdialog.h" |
32 | #include "codeeditor.h" | 33 | #include "codeeditor.h" |
33 | #include "tabcontent.h" | 34 | #include "tabcontent.h" |
35 | #include "projectmodel.h" | ||
34 | 36 | ||
35 | class SkinDocument : public TabContent | 37 | class SkinDocument : public TabContent |
36 | { | 38 | { |
@@ -46,8 +48,10 @@ public: | |||
46 | "All Files (*.*)"); | 48 | "All Files (*.*)"); |
47 | } | 49 | } |
48 | 50 | ||
49 | SkinDocument(QLabel* statusLabel, QWidget *parent = 0); | 51 | SkinDocument(QLabel* statusLabel, ProjectModel* project = 0, |
50 | SkinDocument(QLabel* statusLabel, QString file, QWidget* parent = 0); | 52 | QWidget *parent = 0); |
53 | SkinDocument(QLabel* statusLabel, QString file, ProjectModel* project = 0, | ||
54 | QWidget* parent = 0); | ||
51 | virtual ~SkinDocument(); | 55 | virtual ~SkinDocument(); |
52 | 56 | ||
53 | void connectPrefs(PreferencesDialog* prefs); | 57 | void connectPrefs(PreferencesDialog* prefs); |
@@ -57,6 +61,7 @@ public: | |||
57 | QString title() const{ return titleText; } | 61 | QString title() const{ return titleText; } |
58 | QString getStatus(){ return parseStatus; } | 62 | QString getStatus(){ return parseStatus; } |
59 | void genCode(){ editor->document()->setPlainText(model->genCode()); } | 63 | void genCode(){ editor->document()->setPlainText(model->genCode()); } |
64 | void setProject(ProjectModel* project){ this->project = project; } | ||
60 | 65 | ||
61 | void save(); | 66 | void save(); |
62 | void saveAs(); | 67 | void saveAs(); |
@@ -65,6 +70,8 @@ public: | |||
65 | 70 | ||
66 | TabType type() const{ return Skin; } | 71 | TabType type() const{ return Skin; } |
67 | 72 | ||
73 | QGraphicsScene* scene(){ return model->render(project); } | ||
74 | |||
68 | signals: | 75 | signals: |
69 | 76 | ||
70 | public slots: | 77 | public slots: |
@@ -76,6 +83,7 @@ private slots: | |||
76 | 83 | ||
77 | private: | 84 | private: |
78 | void setupUI(); | 85 | void setupUI(); |
86 | QString findSetting(QString key, QString fallback); | ||
79 | 87 | ||
80 | QString titleText; | 88 | QString titleText; |
81 | QString fileName; | 89 | QString fileName; |
@@ -91,6 +99,8 @@ private: | |||
91 | QLabel* statusLabel; | 99 | QLabel* statusLabel; |
92 | 100 | ||
93 | bool blockUpdate; | 101 | bool blockUpdate; |
102 | |||
103 | ProjectModel* project; | ||
94 | }; | 104 | }; |
95 | 105 | ||
96 | #endif // SKINDOCUMENT_H | 106 | #endif // SKINDOCUMENT_H |