aboutsummaryrefslogtreecommitdiffstats
path: root/gui/ice40
diff options
context:
space:
mode:
authorMiodrag Milanovic <mmicko@gmail.com>2018-08-02 19:25:20 +0200
committerMiodrag Milanovic <mmicko@gmail.com>2018-08-02 19:25:20 +0200
commit23a7d96f4cbe43f5dba752d7c7bbd88ec2fa6bfd (patch)
tree555b9dbb9b4ed7e997ad7afeeed5f36461faf8e5 /gui/ice40
parente40b61e87e38fd64812991cf413675c52cbd29c8 (diff)
downloadnextpnr-23a7d96f4cbe43f5dba752d7c7bbd88ec2fa6bfd.tar.gz
nextpnr-23a7d96f4cbe43f5dba752d7c7bbd88ec2fa6bfd.tar.bz2
nextpnr-23a7d96f4cbe43f5dba752d7c7bbd88ec2fa6bfd.zip
clangformat
Diffstat (limited to 'gui/ice40')
-rw-r--r--gui/ice40/mainwindow.cc19
-rw-r--r--gui/ice40/mainwindow.h1
2 files changed, 7 insertions, 13 deletions
diff --git a/gui/ice40/mainwindow.cc b/gui/ice40/mainwindow.cc
index 10817e07..ed017ee8 100644
--- a/gui/ice40/mainwindow.cc
+++ b/gui/ice40/mainwindow.cc
@@ -54,8 +54,8 @@ MainWindow::MainWindow(std::unique_ptr<Context> context, ArchArgs args, QWidget
MainWindow::~MainWindow() {}
void MainWindow::createMenu()
-{
- // Add arch specific actions
+{
+ // Add arch specific actions
actionLoadPCF = new QAction("Open PCF", this);
actionLoadPCF->setIcon(QIcon(":/icons/resources/open_pcf.png"));
actionLoadPCF->setStatusTip("Open PCF file");
@@ -72,7 +72,7 @@ void MainWindow::createMenu()
mainActionBar->addSeparator();
mainActionBar->addAction(actionLoadPCF);
mainActionBar->addAction(actionSaveAsc);
-
+
menuDesign->addSeparator();
menuDesign->addAction(actionLoadPCF);
menuDesign->addAction(actionSaveAsc);
@@ -157,7 +157,7 @@ void MainWindow::load_pcf(std::string filename)
{
disableActions();
currentPCF = filename;
- std::ifstream f(filename);
+ std::ifstream f(filename);
if (apply_pcf(ctx.get(), f)) {
log("Loading PCF successful.\n");
actionPack->setEnabled(true);
@@ -309,14 +309,7 @@ void MainWindow::onDisableActions()
actionSaveAsc->setEnabled(false);
}
-void MainWindow::onJsonLoaded()
-{
- actionLoadPCF->setEnabled(true);
-}
-void MainWindow::onRouteFinished()
-{
- actionSaveAsc->setEnabled(true);
-}
-
+void MainWindow::onJsonLoaded() { actionLoadPCF->setEnabled(true); }
+void MainWindow::onRouteFinished() { actionSaveAsc->setEnabled(true); }
NEXTPNR_NAMESPACE_END
diff --git a/gui/ice40/mainwindow.h b/gui/ice40/mainwindow.h
index e2e9a2e3..230ccc4e 100644
--- a/gui/ice40/mainwindow.h
+++ b/gui/ice40/mainwindow.h
@@ -35,6 +35,7 @@ class MainWindow : public BaseMainWindow
public:
void createMenu();
void load_pcf(std::string filename);
+
protected:
void onDisableActions() override;
void onJsonLoaded() override;