summaryrefslogtreecommitdiff
path: root/utils/themeeditor/gui/skindocument.h
diff options
context:
space:
mode:
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 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
35class SkinDocument : public TabContent 37class 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
68signals: 75signals:
69 76
70public slots: 77public slots:
@@ -76,6 +83,7 @@ private slots:
76 83
77private: 84private:
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