Move ArchArgs to BaseWindow
This commit is contained in:
parent
a31c00ed96
commit
dc4bd1b55f
@ -37,8 +37,8 @@ static void initBasenameResource() { Q_INIT_RESOURCE(base); }
|
||||
|
||||
NEXTPNR_NAMESPACE_BEGIN
|
||||
|
||||
BaseMainWindow::BaseMainWindow(std::unique_ptr<Context> context, QWidget *parent)
|
||||
: QMainWindow(parent), ctx(std::move(context)), timing_driven(false)
|
||||
BaseMainWindow::BaseMainWindow(std::unique_ptr<Context> context, ArchArgs args, QWidget *parent)
|
||||
: QMainWindow(parent), chipArgs(args), ctx(std::move(context)), timing_driven(false)
|
||||
{
|
||||
initBasenameResource();
|
||||
qRegisterMetaType<std::string>();
|
||||
|
@ -45,7 +45,7 @@ class BaseMainWindow : public QMainWindow
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit BaseMainWindow(std::unique_ptr<Context> context, QWidget *parent = 0);
|
||||
explicit BaseMainWindow(std::unique_ptr<Context> context, ArchArgs args, QWidget *parent = 0);
|
||||
virtual ~BaseMainWindow();
|
||||
Context *getContext() { return ctx.get(); }
|
||||
|
||||
@ -88,6 +88,7 @@ class BaseMainWindow : public QMainWindow
|
||||
|
||||
protected:
|
||||
// state variables
|
||||
ArchArgs chipArgs;
|
||||
std::unique_ptr<Context> ctx;
|
||||
TaskManager *task;
|
||||
bool timing_driven;
|
||||
|
@ -29,7 +29,7 @@ static void initMainResource() { Q_INIT_RESOURCE(nextpnr); }
|
||||
|
||||
NEXTPNR_NAMESPACE_BEGIN
|
||||
|
||||
MainWindow::MainWindow(std::unique_ptr<Context> context, ArchArgs args, QWidget *parent) : BaseMainWindow(std::move(context), parent), chipArgs(args)
|
||||
MainWindow::MainWindow(std::unique_ptr<Context> context, ArchArgs args, QWidget *parent) : BaseMainWindow(std::move(context), args, parent)
|
||||
{
|
||||
initMainResource();
|
||||
|
||||
|
@ -23,7 +23,7 @@ static void initMainResource() { Q_INIT_RESOURCE(nextpnr); }
|
||||
|
||||
NEXTPNR_NAMESPACE_BEGIN
|
||||
|
||||
MainWindow::MainWindow(std::unique_ptr<Context> context, ArchArgs args, QWidget *parent) : BaseMainWindow(std::move(context), parent), chipArgs(args)
|
||||
MainWindow::MainWindow(std::unique_ptr<Context> context, ArchArgs args, QWidget *parent) : BaseMainWindow(std::move(context), args, parent)
|
||||
{
|
||||
initMainResource();
|
||||
|
||||
|
@ -40,9 +40,6 @@ class MainWindow : public BaseMainWindow
|
||||
virtual void open_proj();
|
||||
virtual bool save_proj();
|
||||
void newContext(Context *ctx);
|
||||
|
||||
private:
|
||||
ArchArgs chipArgs;
|
||||
};
|
||||
|
||||
NEXTPNR_NAMESPACE_END
|
||||
|
@ -37,7 +37,7 @@ static void initMainResource() { Q_INIT_RESOURCE(nextpnr); }
|
||||
NEXTPNR_NAMESPACE_BEGIN
|
||||
|
||||
MainWindow::MainWindow(std::unique_ptr<Context> context, ArchArgs args, QWidget *parent)
|
||||
: BaseMainWindow(std::move(context), parent), chipArgs(args)
|
||||
: BaseMainWindow(std::move(context), args, parent)
|
||||
{
|
||||
initMainResource();
|
||||
|
||||
|
@ -55,8 +55,6 @@ class MainWindow : public BaseMainWindow
|
||||
QAction *actionLoadPCF;
|
||||
QAction *actionSaveAsc;
|
||||
|
||||
ArchArgs chipArgs;
|
||||
|
||||
std::string currentProj;
|
||||
std::string currentPCF;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user