blob: b20d4621d23aa2c08798b5d3019d4e1bbf441d8a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
#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
Q_DECLARE_METATYPE(std::string)
class BaseMainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit BaseMainWindow(Context *ctx, QWidget *parent = 0);
virtual ~BaseMainWindow();
Context *getContext() { return ctx; }
protected:
void createMenusAndBars();
protected Q_SLOTS:
void writeInfo(std::string text);
virtual void open() = 0;
virtual bool save() = 0;
protected:
Context *ctx;
QTabWidget *tabWidget;
QTabWidget *centralTabWidget;
InfoTab *info;
QMenuBar *menuBar;
QToolBar *mainToolBar;
QStatusBar *statusBar;
};
#endif // BASEMAINWINDOW_H
|