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