summaryrefslogtreecommitdiff
path: root/utils/themeeditor/editorwindow.h
diff options
context:
space:
mode:
authorRobert Bieber <robby@bieberphoto.com>2010-06-15 06:54:58 +0000
committerRobert Bieber <robby@bieberphoto.com>2010-06-15 06:54:58 +0000
commit2e320f66f4f3c831dcfd232b33da0e6ab6dd7dd0 (patch)
treea6ef8001d797213e9dd81cd41c48f5065c33f3f0 /utils/themeeditor/editorwindow.h
parent1d4dc9b3b0f094a70463395138fc920e5107eabc (diff)
downloadrockbox-2e320f66f4f3c831dcfd232b33da0e6ab6dd7dd0.zip
rockbox-2e320f66f4f3c831dcfd232b33da0e6ab6dd7dd0.tar.gz
rockbox-2e320f66f4f3c831dcfd232b33da0e6ab6dd7dd0.tar.bz2
rockbox-2e320f66f4f3c831dcfd232b33da0e6ab6dd7dd0.tar.xz
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.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/utils/themeeditor/editorwindow.h b/utils/themeeditor/editorwindow.h
index 32c7d0a..7e62caa 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;