aboutsummaryrefslogtreecommitdiffstats
path: root/gui/basewindow.cc
diff options
context:
space:
mode:
authorSergiusz Bazanski <q3k@q3k.org>2018-07-26 16:22:19 +0100
committerSergiusz Bazanski <q3k@q3k.org>2018-07-26 16:22:19 +0100
commit4a21436dfa98caa458a8e6e130cf1f6305968650 (patch)
tree4e1dd3f04e5b671acf958eba6f7dc930ae4d1547 /gui/basewindow.cc
parentc897c0ca9afab1d758f5c1b77312e77057a4c814 (diff)
parent03f92948d1504c32049da065c0e73e01f96d8033 (diff)
downloadnextpnr-4a21436dfa98caa458a8e6e130cf1f6305968650.tar.gz
nextpnr-4a21436dfa98caa458a8e6e130cf1f6305968650.tar.bz2
nextpnr-4a21436dfa98caa458a8e6e130cf1f6305968650.zip
Merge branch 'master' of gitlab.com:SymbioticEDA/nextpnr
Diffstat (limited to 'gui/basewindow.cc')
-rw-r--r--gui/basewindow.cc29
1 files changed, 27 insertions, 2 deletions
diff --git a/gui/basewindow.cc b/gui/basewindow.cc
index 3cb2cc96..d44bd0f7 100644
--- a/gui/basewindow.cc
+++ b/gui/basewindow.cc
@@ -25,7 +25,6 @@
#include <QSplitter>
#include "designwidget.h"
#include "fpgaviewwidget.h"
-#include "jsonparse.h"
#include "log.h"
#include "mainwindow.h"
#include "pythontab.h"
@@ -76,7 +75,7 @@ BaseMainWindow::BaseMainWindow(std::unique_ptr<Context> context, QWidget *parent
centralTabWidget->setTabsClosable(true);
connect(centralTabWidget, SIGNAL(tabCloseRequested(int)), this, SLOT(closeTab(int)));
- FPGAViewWidget *fpgaView = new FPGAViewWidget();
+ fpgaView = new FPGAViewWidget();
centralTabWidget->addTab(fpgaView, "Graphics");
centralTabWidget->tabBar()->tabButton(0, QTabBar::RightSide)->resize(0, 0);
@@ -164,4 +163,30 @@ void BaseMainWindow::createMenusAndBars()
mainToolBar->addAction(actionSave);
}
+void BaseMainWindow::createGraphicsBar()
+{
+ QAction *actionZoomIn = new QAction("Zoom In", this);
+ actionZoomIn->setIcon(QIcon(":/icons/resources/zoom_in.png"));
+ connect(actionZoomIn, SIGNAL(triggered()), fpgaView, SLOT(zoom_in()));
+
+ QAction *actionZoomOut = new QAction("Zoom Out", this);
+ actionZoomOut->setIcon(QIcon(":/icons/resources/zoom_out.png"));
+ connect(actionZoomOut, SIGNAL(triggered()), fpgaView, SLOT(zoom_out()));
+
+ QAction *actionZoomSelected = new QAction("Zoom Selected", this);
+ actionZoomSelected->setIcon(QIcon(":/icons/resources/shape_handles.png"));
+ connect(actionZoomSelected, SIGNAL(triggered()), fpgaView, SLOT(zoom_selected()));
+
+ QAction *actionZoomOutbound = new QAction("Zoom Outbound", this);
+ actionZoomOutbound->setIcon(QIcon(":/icons/resources/shape_square.png"));
+ connect(actionZoomOutbound, SIGNAL(triggered()), fpgaView, SLOT(zoom_outbound()));
+
+ graphicsToolBar = new QToolBar();
+ addToolBar(Qt::TopToolBarArea, graphicsToolBar);
+ graphicsToolBar->addAction(actionZoomIn);
+ graphicsToolBar->addAction(actionZoomOut);
+ graphicsToolBar->addAction(actionZoomSelected);
+ graphicsToolBar->addAction(actionZoomOutbound);
+}
+
NEXTPNR_NAMESPACE_END