rockbox/utils/regtools/qeditor/mainwindow.h
Amaury Pouly 4356666101 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
2014-05-01 19:34:18 +02:00

59 lines
981 B
C++

#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QTabWidget>
#include <QSettings>
#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);
};
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
MainWindow(Backend *backend);
void center();
void ReadSettings();
void WriteSettings();
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:
MyTabWidget *m_tab;
Backend *m_backend;
};
#endif