summaryrefslogtreecommitdiff
path: root/utils/regtools/qeditor/mainwindow.h
diff options
context:
space:
mode:
authorAmaury Pouly <amaury.pouly@gmail.com>2016-02-06 15:08:43 +0000
committerAmaury Pouly <amaury.pouly@gmail.com>2016-02-06 15:20:48 +0000
commit6b9610fb908b27d1e0383c8d9bde3a88f35ed30c (patch)
tree1b0f5e2821b44d20f3704c584e309f5911357040 /utils/regtools/qeditor/mainwindow.h
parent0f701a64bee43e79f95970ae9c0ec43ea7fcdf17 (diff)
downloadrockbox-6b9610fb908b27d1e0383c8d9bde3a88f35ed30c.tar.gz
rockbox-6b9610fb908b27d1e0383c8d9bde3a88f35ed30c.zip
regtoosl/qeditor: port to the new description format
This big commit port qeditor from v1 to v2 register file format. Although the display code was much simplified, the edit code had to be rewritten. The new code also brings many improvement to the register display widget. The new code also compiles with both Qt4 and Qt5, although it is recommended to use Qt5 to get some improvements, especially in the layout of editor. Change-Id: I24633ac37a144f25d9e705b565654269ec9cfbd3
Diffstat (limited to 'utils/regtools/qeditor/mainwindow.h')
-rw-r--r--utils/regtools/qeditor/mainwindow.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/utils/regtools/qeditor/mainwindow.h b/utils/regtools/qeditor/mainwindow.h
index c5da66758e..5d0bf4ed06 100644
--- a/utils/regtools/qeditor/mainwindow.h
+++ b/utils/regtools/qeditor/mainwindow.h
@@ -26,8 +26,9 @@
26#include <QSettings> 26#include <QSettings>
27#include "backend.h" 27#include "backend.h"
28#include "settings.h" 28#include "settings.h"
29#include "utils.h"
29 30
30class MyTabWidget; 31class DocumentTabWidget;
31 32
32class DocumentTab 33class DocumentTab
33{ 34{
@@ -35,20 +36,20 @@ public:
35 DocumentTab() { m_tab = 0; } 36 DocumentTab() { m_tab = 0; }
36 virtual bool Quit() = 0; 37 virtual bool Quit() = 0;
37 virtual QWidget *GetWidget() = 0; 38 virtual QWidget *GetWidget() = 0;
38 void SetTabWidget(MyTabWidget *tab); 39 void SetTabWidget(DocumentTabWidget *tab);
39 40
40protected: 41protected:
41 void OnModified(bool modified); 42 void OnModified(bool modified);
42 void SetTabName(const QString& name); 43 void SetTabName(const QString& name);
43 MyTabWidget *m_tab; 44 DocumentTabWidget *m_tab;
44 QString m_tabname; 45 QString m_tabname;
45}; 46};
46 47
47class MyTabWidget : public QTabWidget 48class DocumentTabWidget : public YTabWidget
48{ 49{
49 Q_OBJECT 50 Q_OBJECT
50public: 51public:
51 MyTabWidget(); 52 DocumentTabWidget();
52 bool CloseTab(int index); 53 bool CloseTab(int index);
53 void SetTabModified(DocumentTab *tab, bool mod); 54 void SetTabModified(DocumentTab *tab, bool mod);
54 void SetTabName(DocumentTab *tab, const QString& name); 55 void SetTabName(DocumentTab *tab, const QString& name);
@@ -83,7 +84,7 @@ private slots:
83 void OnNewRegEdit(); 84 void OnNewRegEdit();
84 85
85private: 86private:
86 MyTabWidget *m_tab; 87 DocumentTabWidget *m_tab;
87 Backend *m_backend; 88 Backend *m_backend;
88}; 89};
89 90