diff options
author | Amaury Pouly <amaury.pouly@gmail.com> | 2014-04-07 11:28:04 +0200 |
---|---|---|
committer | Amaury Pouly <amaury.pouly@gmail.com> | 2014-05-01 19:34:18 +0200 |
commit | 4356666101e0e7985e65a19f86bc4a74519e93f9 (patch) | |
tree | bf8de8057d93d0fab0a30cae92a90f5a4edc79dc /utils/regtools/qeditor/mainwindow.h | |
parent | 3754624edc48539c5cc5acbf426ce909477e87d8 (diff) | |
download | rockbox-4356666101e0e7985e65a19f86bc4a74519e93f9.tar.gz rockbox-4356666101e0e7985e65a19f86bc4a74519e93f9.zip |
regtools: completely rework qeditor, improve soc desc library and tools
The graphical editor can now display and editor description files.
The library has been improved to provide more useful function.
The XML format has been slightly changed: only one soc is allowed per file
(this is was already de facto the case since <soc> was the root tag).
Also introduce a DTD to validate the files.
Change-Id: If70ba35b6dc0242bdb87411cf4baee9597798aac
Diffstat (limited to 'utils/regtools/qeditor/mainwindow.h')
-rw-r--r-- | utils/regtools/qeditor/mainwindow.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/utils/regtools/qeditor/mainwindow.h b/utils/regtools/qeditor/mainwindow.h index d7dab3717f..b32b0647f5 100644 --- a/utils/regtools/qeditor/mainwindow.h +++ b/utils/regtools/qeditor/mainwindow.h | |||
@@ -7,11 +7,19 @@ | |||
7 | #include "backend.h" | 7 | #include "backend.h" |
8 | #include "settings.h" | 8 | #include "settings.h" |
9 | 9 | ||
10 | class DocumentTab | ||
11 | { | ||
12 | public: | ||
13 | virtual bool Quit() = 0; | ||
14 | virtual void OnModified(bool modified) = 0; | ||
15 | }; | ||
16 | |||
10 | class MyTabWidget : public QTabWidget | 17 | class MyTabWidget : public QTabWidget |
11 | { | 18 | { |
12 | Q_OBJECT | 19 | Q_OBJECT |
13 | public: | 20 | public: |
14 | MyTabWidget(); | 21 | MyTabWidget(); |
22 | bool CloseTab(int index); | ||
15 | 23 | ||
16 | private slots: | 24 | private slots: |
17 | void OnCloseTab(int index); | 25 | void OnCloseTab(int index); |
@@ -30,15 +38,21 @@ public: | |||
30 | private: | 38 | private: |
31 | void closeEvent(QCloseEvent *event); | 39 | void closeEvent(QCloseEvent *event); |
32 | 40 | ||
41 | protected: | ||
42 | void AddTab(QWidget *tab, const QString& title); | ||
43 | bool Quit(); | ||
44 | |||
33 | private slots: | 45 | private slots: |
34 | void OnQuit(); | 46 | void OnQuit(); |
35 | void OnAbout(); | 47 | void OnAbout(); |
36 | void OnAboutQt(); | 48 | void OnAboutQt(); |
37 | void OnLoadDesc(); | 49 | void OnLoadDesc(); |
38 | void OnNewRegTab(); | 50 | void OnNewRegTab(); |
51 | void OnNewRegEdit(); | ||
52 | void OnTabModified(bool modified); | ||
39 | 53 | ||
40 | private: | 54 | private: |
41 | QTabWidget *m_tab; | 55 | MyTabWidget *m_tab; |
42 | Backend *m_backend; | 56 | Backend *m_backend; |
43 | }; | 57 | }; |
44 | 58 | ||