diff options
| author | David Shah <dave@ds0.me> | 2019-07-03 12:39:38 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-07-03 12:39:38 +0100 |
| commit | 8f2813279c5888e655ee6f50f198cf8cb11b0b50 (patch) | |
| tree | 0aac9464d3ea87d37cd0689903ba08094b7c0984 /gui/basewindow.h | |
| parent | ff958830d1097b9bfa3c3b34094e671741ef563d (diff) | |
| parent | e27dc41a7646fd3377d2400059c916fbcc35119c (diff) | |
| download | nextpnr-8f2813279c5888e655ee6f50f198cf8cb11b0b50.tar.gz nextpnr-8f2813279c5888e655ee6f50f198cf8cb11b0b50.tar.bz2 nextpnr-8f2813279c5888e655ee6f50f198cf8cb11b0b50.zip | |
Merge pull request #284 from YosysHQ/json_write
Initial support for writing to json files from nextpnr.
Diffstat (limited to 'gui/basewindow.h')
| -rw-r--r-- | gui/basewindow.h | 26 |
1 files changed, 9 insertions, 17 deletions
diff --git a/gui/basewindow.h b/gui/basewindow.h index 0b2d3fbc..305cb6c9 100644 --- a/gui/basewindow.h +++ b/gui/basewindow.h @@ -20,6 +20,7 @@ #ifndef BASEMAINWINDOW_H
#define BASEMAINWINDOW_H
+#include "command.h"
#include "nextpnr.h"
#include "worker.h"
@@ -45,25 +46,19 @@ class BaseMainWindow : public QMainWindow Q_OBJECT
public:
- explicit BaseMainWindow(std::unique_ptr<Context> context, ArchArgs args, QWidget *parent = 0);
+ explicit BaseMainWindow(std::unique_ptr<Context> context, CommandHandler *handler, QWidget *parent = 0);
virtual ~BaseMainWindow();
Context *getContext() { return ctx.get(); }
- void updateLoaded();
- void projectLoad(std::string filename);
+ void updateActions();
+
void notifyChangeContext();
protected:
void createMenusAndBars();
void disableActions();
- void load_json(std::string filename);
virtual void onDisableActions(){};
- virtual void onJsonLoaded(){};
- virtual void onProjectLoaded(){};
- virtual void onPackFinished(){};
- virtual void onBudgetFinished(){};
- virtual void onPlaceFinished(){};
- virtual void onRouteFinished(){};
+ virtual void onUpdateActions(){};
protected Q_SLOTS:
void writeInfo(std::string text);
@@ -71,10 +66,8 @@ class BaseMainWindow : public QMainWindow virtual void new_proj() = 0;
- void open_proj();
- void save_proj();
-
void open_json();
+ void save_json();
void budget();
void place();
@@ -95,7 +88,7 @@ class BaseMainWindow : public QMainWindow protected:
// state variables
- ArchArgs chipArgs;
+ CommandHandler *handler;
std::unique_ptr<Context> ctx;
TaskManager *task;
bool timing_driven;
@@ -116,10 +109,9 @@ class BaseMainWindow : public QMainWindow QProgressBar *progressBar;
QAction *actionNew;
- QAction *actionOpen;
- QAction *actionSave;
-
QAction *actionLoadJSON;
+ QAction *actionSaveJSON;
+
QAction *actionPack;
QAction *actionAssignBudget;
QAction *actionPlace;
|
