From 66ea9f39f7f5d6e1152105328f9a48a367bd8ce0 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Fri, 14 Jun 2019 15:18:35 +0200 Subject: enable lading of jsons and setting up context --- gui/ecp5/mainwindow.cc | 8 ++++---- gui/ecp5/mainwindow.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'gui/ecp5') diff --git a/gui/ecp5/mainwindow.cc b/gui/ecp5/mainwindow.cc index 913c2520..b06e10e9 100644 --- a/gui/ecp5/mainwindow.cc +++ b/gui/ecp5/mainwindow.cc @@ -30,8 +30,8 @@ static void initMainResource() { Q_INIT_RESOURCE(nextpnr); } NEXTPNR_NAMESPACE_BEGIN -MainWindow::MainWindow(std::unique_ptr context, ArchArgs args, QWidget *parent) - : BaseMainWindow(std::move(context), args, parent) +MainWindow::MainWindow(std::unique_ptr context, CommandHandler *handler, QWidget *parent) + : BaseMainWindow(std::move(context), handler, parent) { initMainResource(); @@ -47,7 +47,7 @@ MainWindow::~MainWindow() {} void MainWindow::newContext(Context *ctx) { - std::string title = "nextpnr-ecp5 - " + ctx->getChipName() + " ( " + chipArgs.package + " )"; + std::string title = "nextpnr-ecp5 - " + ctx->getChipName() + " ( " + ctx->archArgs().package + " )"; setWindowTitle(title.c_str()); } @@ -113,7 +113,7 @@ void MainWindow::new_proj() bool ok; QString item = QInputDialog::getItem(this, "Select new context", "Chip:", arch.keys(), 0, false, &ok); if (ok && !item.isEmpty()) { - + ArchArgs chipArgs; chipArgs.type = (ArchArgs::ArchArgsTypes)arch.value(item); QString package = QInputDialog::getItem(this, "Select package", "Package:", getSupportedPackages(chipArgs.type), diff --git a/gui/ecp5/mainwindow.h b/gui/ecp5/mainwindow.h index 65493fbc..e60fc5b0 100644 --- a/gui/ecp5/mainwindow.h +++ b/gui/ecp5/mainwindow.h @@ -29,7 +29,7 @@ class MainWindow : public BaseMainWindow Q_OBJECT public: - explicit MainWindow(std::unique_ptr context, ArchArgs args, QWidget *parent = 0); + explicit MainWindow(std::unique_ptr context, CommandHandler *handler, QWidget *parent = 0); virtual ~MainWindow(); public: -- cgit v1.2.3