diff options
author | Robert Bieber <robby@bieberphoto.com> | 2010-06-15 06:54:58 +0000 |
---|---|---|
committer | Robert Bieber <robby@bieberphoto.com> | 2010-06-15 06:54:58 +0000 |
commit | 2e320f66f4f3c831dcfd232b33da0e6ab6dd7dd0 (patch) | |
tree | a6ef8001d797213e9dd81cd41c48f5065c33f3f0 /utils/themeeditor/editorwindow.h | |
parent | 1d4dc9b3b0f094a70463395138fc920e5107eabc (diff) | |
download | rockbox-2e320f66f4f3c831dcfd232b33da0e6ab6dd7dd0.tar.gz rockbox-2e320f66f4f3c831dcfd232b33da0e6ab6dd7dd0.zip |
Theme Editor: Changed color to colour in preferences. Made parse tree viewer alternate line colors and auto-scroll/expand with cursor in editor window. Implemented TabContent abstract class so that more than just skin documents can be loaded in tabs. Made SkinDocument implement TabContent. Began implementing ConfigDocument for editing configuration files.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26851 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'utils/themeeditor/editorwindow.h')
-rw-r--r-- | utils/themeeditor/editorwindow.h | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/utils/themeeditor/editorwindow.h b/utils/themeeditor/editorwindow.h index 32c7d0a057..7e62caadf2 100644 --- a/utils/themeeditor/editorwindow.h +++ b/utils/themeeditor/editorwindow.h | |||
@@ -28,22 +28,27 @@ | |||
28 | #include "parsetreemodel.h" | 28 | #include "parsetreemodel.h" |
29 | #include "skinhighlighter.h" | 29 | #include "skinhighlighter.h" |
30 | #include "skindocument.h" | 30 | #include "skindocument.h" |
31 | #include "configdocument.h" | ||
31 | #include "preferencesdialog.h" | 32 | #include "preferencesdialog.h" |
32 | 33 | ||
33 | class ProjectModel; | 34 | class ProjectModel; |
35 | class TabContent; | ||
34 | 36 | ||
35 | namespace Ui { | 37 | namespace Ui |
38 | { | ||
36 | class EditorWindow; | 39 | class EditorWindow; |
37 | } | 40 | } |
38 | 41 | ||
39 | class EditorWindow : public QMainWindow { | 42 | class EditorWindow : public QMainWindow |
43 | { | ||
40 | Q_OBJECT | 44 | Q_OBJECT |
41 | public: | 45 | public: |
42 | EditorWindow(QWidget *parent = 0); | 46 | EditorWindow(QWidget *parent = 0); |
43 | ~EditorWindow(); | 47 | ~EditorWindow(); |
44 | 48 | ||
45 | /* A public function so external widgets can load files */ | 49 | /* A public function so external widgets can load files */ |
46 | void loadTabFromFile(QString fileName); | 50 | void loadTabFromSkinFile(QString fileName); |
51 | void loadConfigTab(ConfigDocument* doc); | ||
47 | 52 | ||
48 | protected: | 53 | protected: |
49 | virtual void closeEvent(QCloseEvent* event); | 54 | virtual void closeEvent(QCloseEvent* event); |
@@ -60,6 +65,7 @@ private slots: | |||
60 | void openProject(); | 65 | void openProject(); |
61 | void tabTitleChanged(QString title); | 66 | void tabTitleChanged(QString title); |
62 | void updateCurrent(); /* Generates code in the current tab */ | 67 | void updateCurrent(); /* Generates code in the current tab */ |
68 | void lineChanged(int line); /* Used for auto-expand */ | ||
63 | 69 | ||
64 | private: | 70 | private: |
65 | /* Setup functions */ | 71 | /* Setup functions */ |
@@ -67,7 +73,9 @@ private: | |||
67 | void saveSettings(); | 73 | void saveSettings(); |
68 | void setupUI(); | 74 | void setupUI(); |
69 | void setupMenus(); | 75 | void setupMenus(); |
70 | void addTab(SkinDocument* doc); | 76 | void addTab(TabContent* doc); |
77 | void expandLine(ParseTreeModel* model, QModelIndex parent, int line); | ||
78 | void sizeColumns(); | ||
71 | 79 | ||
72 | Ui::EditorWindow *ui; | 80 | Ui::EditorWindow *ui; |
73 | PreferencesDialog* prefs; | 81 | PreferencesDialog* prefs; |