diff options
Diffstat (limited to 'utils/regtools/qeditor/mainwindow.h')
-rw-r--r-- | utils/regtools/qeditor/mainwindow.h | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/utils/regtools/qeditor/mainwindow.h b/utils/regtools/qeditor/mainwindow.h index b32b0647f5..47cfa6796d 100644 --- a/utils/regtools/qeditor/mainwindow.h +++ b/utils/regtools/qeditor/mainwindow.h | |||
@@ -7,11 +7,20 @@ | |||
7 | #include "backend.h" | 7 | #include "backend.h" |
8 | #include "settings.h" | 8 | #include "settings.h" |
9 | 9 | ||
10 | class MyTabWidget; | ||
11 | |||
10 | class DocumentTab | 12 | class DocumentTab |
11 | { | 13 | { |
12 | public: | 14 | public: |
15 | DocumentTab() { m_tab = 0; } | ||
13 | virtual bool Quit() = 0; | 16 | virtual bool Quit() = 0; |
14 | virtual void OnModified(bool modified) = 0; | 17 | virtual QWidget *GetWidget() = 0; |
18 | void SetTabWidget(MyTabWidget *tab) { m_tab = tab; } | ||
19 | |||
20 | protected: | ||
21 | void OnModified(bool modified); | ||
22 | void SetTabName(const QString& name); | ||
23 | MyTabWidget *m_tab; | ||
15 | }; | 24 | }; |
16 | 25 | ||
17 | class MyTabWidget : public QTabWidget | 26 | class MyTabWidget : public QTabWidget |
@@ -20,6 +29,8 @@ class MyTabWidget : public QTabWidget | |||
20 | public: | 29 | public: |
21 | MyTabWidget(); | 30 | MyTabWidget(); |
22 | bool CloseTab(int index); | 31 | bool CloseTab(int index); |
32 | void SetTabModified(DocumentTab *tab, bool mod); | ||
33 | void SetTabName(DocumentTab *tab, const QString& name); | ||
23 | 34 | ||
24 | private slots: | 35 | private slots: |
25 | void OnCloseTab(int index); | 36 | void OnCloseTab(int index); |
@@ -39,7 +50,7 @@ private: | |||
39 | void closeEvent(QCloseEvent *event); | 50 | void closeEvent(QCloseEvent *event); |
40 | 51 | ||
41 | protected: | 52 | protected: |
42 | void AddTab(QWidget *tab, const QString& title); | 53 | void AddTab(DocumentTab *tab, const QString& title); |
43 | bool Quit(); | 54 | bool Quit(); |
44 | 55 | ||
45 | private slots: | 56 | private slots: |
@@ -49,7 +60,6 @@ private slots: | |||
49 | void OnLoadDesc(); | 60 | void OnLoadDesc(); |
50 | void OnNewRegTab(); | 61 | void OnNewRegTab(); |
51 | void OnNewRegEdit(); | 62 | void OnNewRegEdit(); |
52 | void OnTabModified(bool modified); | ||
53 | 63 | ||
54 | private: | 64 | private: |
55 | MyTabWidget *m_tab; | 65 | MyTabWidget *m_tab; |