aboutsummaryrefslogtreecommitdiffstats
path: root/gui/basewindow.h
diff options
context:
space:
mode:
Diffstat (limited to 'gui/basewindow.h')
-rw-r--r--gui/basewindow.h44
1 files changed, 44 insertions, 0 deletions
diff --git a/gui/basewindow.h b/gui/basewindow.h
new file mode 100644
index 00000000..630e0f84
--- /dev/null
+++ b/gui/basewindow.h
@@ -0,0 +1,44 @@
+#ifndef BASEMAINWINDOW_H
+#define BASEMAINWINDOW_H
+
+#include "infotab.h"
+#include "nextpnr.h"
+
+#include <QMainWindow>
+#include <QMenu>
+#include <QMenuBar>
+#include <QStatusBar>
+#include <QTabWidget>
+#include <QToolBar>
+
+// FIXME
+USING_NEXTPNR_NAMESPACE
+
+class BaseMainWindow : public QMainWindow
+{
+ Q_OBJECT
+
+ public:
+ explicit BaseMainWindow(Context *ctx, QWidget *parent = 0);
+ ~BaseMainWindow();
+ Context *getContext() { return ctx; }
+
+ protected:
+ void createMenusAndBars();
+
+ protected Q_SLOTS:
+ void writeInfo(std::string text);
+ void open();
+ bool save();
+
+ protected:
+ Context *ctx;
+ QTabWidget *tabWidget;
+ InfoTab *info;
+
+ QMenuBar *menuBar;
+ QToolBar *mainToolBar;
+ QStatusBar *statusBar;
+};
+
+#endif // BASEMAINWINDOW_H