aboutsummaryrefslogtreecommitdiffstats
path: root/gui/ice40
diff options
context:
space:
mode:
authorMiodrag Milanovic <mmicko@gmail.com>2019-06-14 15:18:35 +0200
committerMiodrag Milanovic <mmicko@gmail.com>2019-06-14 15:18:35 +0200
commit66ea9f39f7f5d6e1152105328f9a48a367bd8ce0 (patch)
treec00f2c07205988f67d24a4f6a22ee8f8f301ecf2 /gui/ice40
parentaca372de99b960ca808e49fec27d2aaf890574d3 (diff)
downloadnextpnr-66ea9f39f7f5d6e1152105328f9a48a367bd8ce0.tar.gz
nextpnr-66ea9f39f7f5d6e1152105328f9a48a367bd8ce0.tar.bz2
nextpnr-66ea9f39f7f5d6e1152105328f9a48a367bd8ce0.zip
enable lading of jsons and setting up context
Diffstat (limited to 'gui/ice40')
-rw-r--r--gui/ice40/mainwindow.cc8
-rw-r--r--gui/ice40/mainwindow.h2
2 files changed, 5 insertions, 5 deletions
diff --git a/gui/ice40/mainwindow.cc b/gui/ice40/mainwindow.cc
index 7c8effac..c2ac264f 100644
--- a/gui/ice40/mainwindow.cc
+++ b/gui/ice40/mainwindow.cc
@@ -35,8 +35,8 @@ 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), args, parent)
+MainWindow::MainWindow(std::unique_ptr<Context> context, CommandHandler *handler, QWidget *parent)
+ : BaseMainWindow(std::move(context), handler, parent)
{
initMainResource();
@@ -123,7 +123,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),
@@ -156,7 +156,7 @@ void MainWindow::load_pcf(std::string filename)
void MainWindow::newContext(Context *ctx)
{
- std::string title = "nextpnr-ice40 - " + ctx->getChipName() + " ( " + chipArgs.package + " )";
+ std::string title = "nextpnr-ice40 - " + ctx->getChipName() + " ( " + ctx->archArgs().package + " )";
setWindowTitle(title.c_str());
}
diff --git a/gui/ice40/mainwindow.h b/gui/ice40/mainwindow.h
index ed1b6aaf..6e725a16 100644
--- a/gui/ice40/mainwindow.h
+++ b/gui/ice40/mainwindow.h
@@ -29,7 +29,7 @@ class MainWindow : public BaseMainWindow
Q_OBJECT
public:
- explicit MainWindow(std::unique_ptr<Context> context, ArchArgs args, QWidget *parent = 0);
+ explicit MainWindow(std::unique_ptr<Context> context, CommandHandler *handler, QWidget *parent = 0);
virtual ~MainWindow();
public: