From 2e320f66f4f3c831dcfd232b33da0e6ab6dd7dd0 Mon Sep 17 00:00:00 2001 From: Robert Bieber Date: Tue, 15 Jun 2010 06:54:58 +0000 Subject: 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 --- utils/themeeditor/editorwindow.h | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'utils/themeeditor/editorwindow.h') 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 @@ #include "parsetreemodel.h" #include "skinhighlighter.h" #include "skindocument.h" +#include "configdocument.h" #include "preferencesdialog.h" class ProjectModel; +class TabContent; -namespace Ui { +namespace Ui +{ class EditorWindow; } -class EditorWindow : public QMainWindow { +class EditorWindow : public QMainWindow +{ Q_OBJECT public: EditorWindow(QWidget *parent = 0); ~EditorWindow(); /* A public function so external widgets can load files */ - void loadTabFromFile(QString fileName); + void loadTabFromSkinFile(QString fileName); + void loadConfigTab(ConfigDocument* doc); protected: virtual void closeEvent(QCloseEvent* event); @@ -60,6 +65,7 @@ private slots: void openProject(); void tabTitleChanged(QString title); void updateCurrent(); /* Generates code in the current tab */ + void lineChanged(int line); /* Used for auto-expand */ private: /* Setup functions */ @@ -67,7 +73,9 @@ private: void saveSettings(); void setupUI(); void setupMenus(); - void addTab(SkinDocument* doc); + void addTab(TabContent* doc); + void expandLine(ParseTreeModel* model, QModelIndex parent, int line); + void sizeColumns(); Ui::EditorWindow *ui; PreferencesDialog* prefs; -- cgit v1.2.3