summaryrefslogtreecommitdiff
path: root/utils/regtools/qeditor/mainwindow.h
diff options
context:
space:
mode:
Diffstat (limited to 'utils/regtools/qeditor/mainwindow.h')
-rw-r--r--utils/regtools/qeditor/mainwindow.h16
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
10class MyTabWidget;
11
10class DocumentTab 12class DocumentTab
11{ 13{
12public: 14public:
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
20protected:
21 void OnModified(bool modified);
22 void SetTabName(const QString& name);
23 MyTabWidget *m_tab;
15}; 24};
16 25
17class MyTabWidget : public QTabWidget 26class MyTabWidget : public QTabWidget
@@ -20,6 +29,8 @@ class MyTabWidget : public QTabWidget
20public: 29public:
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
24private slots: 35private 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
41protected: 52protected:
42 void AddTab(QWidget *tab, const QString& title); 53 void AddTab(DocumentTab *tab, const QString& title);
43 bool Quit(); 54 bool Quit();
44 55
45private slots: 56private 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
54private: 64private:
55 MyTabWidget *m_tab; 65 MyTabWidget *m_tab;