From 4356666101e0e7985e65a19f86bc4a74519e93f9 Mon Sep 17 00:00:00 2001 From: Amaury Pouly Date: Mon, 7 Apr 2014 11:28:04 +0200 Subject: 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 was the root tag). Also introduce a DTD to validate the files. Change-Id: If70ba35b6dc0242bdb87411cf4baee9597798aac --- utils/regtools/qeditor/mainwindow.h | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'utils/regtools/qeditor/mainwindow.h') 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 @@ #include "backend.h" #include "settings.h" +class DocumentTab +{ +public: + virtual bool Quit() = 0; + virtual void OnModified(bool modified) = 0; +}; + class MyTabWidget : public QTabWidget { Q_OBJECT public: MyTabWidget(); + bool CloseTab(int index); private slots: void OnCloseTab(int index); @@ -30,15 +38,21 @@ public: private: void closeEvent(QCloseEvent *event); +protected: + void AddTab(QWidget *tab, const QString& title); + bool Quit(); + private slots: void OnQuit(); void OnAbout(); void OnAboutQt(); void OnLoadDesc(); void OnNewRegTab(); + void OnNewRegEdit(); + void OnTabModified(bool modified); private: - QTabWidget *m_tab; + MyTabWidget *m_tab; Backend *m_backend; }; -- cgit v1.2.3