diff options
author | Miodrag Milanovic <mmicko@gmail.com> | 2018-07-18 17:18:44 +0200 |
---|---|---|
committer | Miodrag Milanovic <mmicko@gmail.com> | 2018-07-18 17:18:44 +0200 |
commit | 34772634317972aa4f816b6010a273bd7f3d17f3 (patch) | |
tree | 83762b4f9b5f4b5eb0b7d8f40268827dbd06c9ef | |
parent | 50bf32665d0d7b7054df3ce1f36aad783eaaaa83 (diff) | |
download | nextpnr-34772634317972aa4f816b6010a273bd7f3d17f3.tar.gz nextpnr-34772634317972aa4f816b6010a273bd7f3d17f3.tar.bz2 nextpnr-34772634317972aa4f816b6010a273bd7f3d17f3.zip |
removed not used and buggy features
-rw-r--r-- | gui/base.qrc | 1 | ||||
-rw-r--r-- | gui/basewindow.cc | 35 | ||||
-rw-r--r-- | gui/basewindow.h | 5 | ||||
-rw-r--r-- | gui/designwidget.cc | 5 | ||||
-rw-r--r-- | gui/designwidget.h | 2 | ||||
-rw-r--r-- | gui/ice40/mainwindow.cc | 1 | ||||
-rw-r--r-- | gui/infotab.cc | 58 | ||||
-rw-r--r-- | gui/infotab.h | 48 | ||||
-rw-r--r-- | gui/resources/splash.png | bin | 4651 -> 0 bytes | |||
-rw-r--r-- | gui/yosys_edit.cc | 96 | ||||
-rw-r--r-- | gui/yosys_edit.h | 57 | ||||
-rw-r--r-- | gui/yosystab.cc | 107 | ||||
-rw-r--r-- | gui/yosystab.h | 59 |
13 files changed, 0 insertions, 474 deletions
diff --git a/gui/base.qrc b/gui/base.qrc index bf21986b..8f07aabe 100644 --- a/gui/base.qrc +++ b/gui/base.qrc @@ -9,6 +9,5 @@ <file>resources/resultset_previous.png</file> <file>resources/resultset_next.png</file> <file>resources/resultset_last.png</file> - <file>resources/splash.png</file> </qresource> </RCC> diff --git a/gui/basewindow.cc b/gui/basewindow.cc index 81c89e45..4a225bd6 100644 --- a/gui/basewindow.cc +++ b/gui/basewindow.cc @@ -29,7 +29,6 @@ #include "log.h"
#include "mainwindow.h"
#include "pythontab.h"
-#include "yosystab.h"
static void initBasenameResource() { Q_INIT_RESOURCE(base); }
@@ -95,29 +94,12 @@ BaseMainWindow::BaseMainWindow(std::unique_ptr<Context> context, QWidget *parent splitter_v->addWidget(centralTabWidget);
splitter_v->addWidget(tabWidget);
- displaySplash();
}
BaseMainWindow::~BaseMainWindow() {}
void BaseMainWindow::closeTab(int index) { delete centralTabWidget->widget(index); }
-void BaseMainWindow::displaySplash()
-{
- splash = new QSplashScreen();
- splash->setPixmap(QPixmap(":/icons/resources/splash.png"));
- splash->show();
- connect(designview, SIGNAL(finishContextLoad()), splash, SLOT(close()));
- connect(designview, SIGNAL(contextLoadStatus(std::string)), this, SLOT(displaySplashMessage(std::string)));
- QCoreApplication::instance()->processEvents();
-}
-
-void BaseMainWindow::displaySplashMessage(std::string msg)
-{
- splash->showMessage(msg.c_str(), Qt::AlignCenter | Qt::AlignBottom, Qt::white);
- QCoreApplication::instance()->processEvents();
-}
-
void BaseMainWindow::writeInfo(std::string text) { console->info(text); }
void BaseMainWindow::createMenusAndBars()
@@ -147,10 +129,6 @@ void BaseMainWindow::createMenusAndBars() actionExit->setStatusTip("Exit the application");
connect(actionExit, SIGNAL(triggered()), this, SLOT(close()));
- QAction *actionYosys = new QAction("Yosys", this);
- actionYosys->setStatusTip("Run Yosys");
- connect(actionYosys, SIGNAL(triggered()), this, SLOT(yosys()));
-
QAction *actionAbout = new QAction("About", this);
menuBar = new QMenuBar();
@@ -183,19 +161,6 @@ void BaseMainWindow::createMenusAndBars() mainToolBar->addAction(actionNew);
mainToolBar->addAction(actionOpen);
mainToolBar->addAction(actionSave);
- mainToolBar->addAction(actionYosys);
}
-void BaseMainWindow::yosys()
-{
- QString folder = QFileDialog::getExistingDirectory(0, ("Select Work Folder"), QDir::currentPath(),
- QFileDialog::ShowDirsOnly);
- if (!folder.isEmpty() && !folder.isNull()) {
- YosysTab *yosysTab = new YosysTab(folder);
- yosysTab->setAttribute(Qt::WA_DeleteOnClose);
- centralTabWidget->addTab(yosysTab, "Yosys");
- centralTabWidget->setCurrentWidget(yosysTab);
- centralTabWidget->setTabToolTip(centralTabWidget->indexOf(yosysTab), folder);
- }
-}
NEXTPNR_NAMESPACE_END
diff --git a/gui/basewindow.h b/gui/basewindow.h index 087880ed..eee426c7 100644 --- a/gui/basewindow.h +++ b/gui/basewindow.h @@ -26,7 +26,6 @@ #include <QMenu>
#include <QMenuBar>
#include <QProgressBar>
-#include <QSplashScreen>
#include <QStatusBar>
#include <QTabWidget>
#include <QToolBar>
@@ -50,17 +49,14 @@ class BaseMainWindow : public QMainWindow protected:
void createMenusAndBars();
- void displaySplash();
protected Q_SLOTS:
void writeInfo(std::string text);
- void displaySplashMessage(std::string msg);
void closeTab(int index);
virtual void new_proj() = 0;
virtual void open_proj() = 0;
virtual bool save_proj() = 0;
- void yosys();
Q_SIGNALS:
void contextChanged(Context *ctx);
@@ -78,7 +74,6 @@ class BaseMainWindow : public QMainWindow QAction *actionNew;
QAction *actionOpen;
QProgressBar *progressBar;
- QSplashScreen *splash;
DesignWidget *designview;
};
diff --git a/gui/designwidget.cc b/gui/designwidget.cc index 335ed929..5181cd23 100644 --- a/gui/designwidget.cc +++ b/gui/designwidget.cc @@ -230,7 +230,6 @@ void DesignWidget::newContext(Context *ctx) bel_root->setText(0, "Bels");
treeWidget->insertTopLevelItem(0, bel_root);
if (ctx) {
- Q_EMIT contextLoadStatus("Configuring bels...");
for (auto bel : ctx->getBels()) {
auto id = ctx->getBelName(bel);
QStringList items = QString(id.c_str(ctx)).split("/");
@@ -263,7 +262,6 @@ void DesignWidget::newContext(Context *ctx) wire_root->setText(0, "Wires");
treeWidget->insertTopLevelItem(0, wire_root);
if (ctx) {
- Q_EMIT contextLoadStatus("Configuring wires...");
for (auto wire : ctx->getWires()) {
auto id = ctx->getWireName(wire);
QStringList items = QString(id.c_str(ctx)).split("/");
@@ -295,7 +293,6 @@ void DesignWidget::newContext(Context *ctx) pip_root->setText(0, "Pips");
treeWidget->insertTopLevelItem(0, pip_root);
if (ctx) {
- Q_EMIT contextLoadStatus("Configuring pips...");
for (auto pip : ctx->getPips()) {
auto id = ctx->getPipName(pip);
QStringList items = QString(id.c_str(ctx)).split("/");
@@ -331,8 +328,6 @@ void DesignWidget::newContext(Context *ctx) cells_root = new QTreeWidgetItem(treeWidget);
cells_root->setText(0, "Cells");
treeWidget->insertTopLevelItem(0, cells_root);
-
- Q_EMIT finishContextLoad();
}
void DesignWidget::updateTree()
diff --git a/gui/designwidget.h b/gui/designwidget.h index 1afe817d..269e32fa 100644 --- a/gui/designwidget.h +++ b/gui/designwidget.h @@ -65,8 +65,6 @@ class DesignWidget : public QWidget void info(std::string text);
void selected(std::vector<DecalXY> decal);
void highlight(std::vector<DecalXY> decal, int group);
- void finishContextLoad();
- void contextLoadStatus(std::string text);
private Q_SLOTS:
void prepareMenuProperty(const QPoint &pos);
diff --git a/gui/ice40/mainwindow.cc b/gui/ice40/mainwindow.cc index 4b1f2c57..28792ed3 100644 --- a/gui/ice40/mainwindow.cc +++ b/gui/ice40/mainwindow.cc @@ -226,7 +226,6 @@ void MainWindow::new_proj() ctx = std::unique_ptr<Context>(new Context(chipArgs));
actionLoadJSON->setEnabled(true);
- Q_EMIT displaySplash();
Q_EMIT contextChanged(ctx.get());
}
}
diff --git a/gui/infotab.cc b/gui/infotab.cc deleted file mode 100644 index dd44b806..00000000 --- a/gui/infotab.cc +++ /dev/null @@ -1,58 +0,0 @@ -/*
- * nextpnr -- Next Generation Place and Route
- *
- * Copyright (C) 2018 Miodrag Milanovic <miodrag@symbioticeda.com>
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- */
-
-#include "infotab.h"
-#include <QGridLayout>
-
-NEXTPNR_NAMESPACE_BEGIN
-
-InfoTab::InfoTab(QWidget *parent) : QWidget(parent)
-{
- plainTextEdit = new QPlainTextEdit();
- plainTextEdit->setReadOnly(true);
- QFont f("unexistent");
- f.setStyleHint(QFont::Monospace);
- plainTextEdit->setFont(f);
-
- plainTextEdit->setContextMenuPolicy(Qt::CustomContextMenu);
- QAction *clearAction = new QAction("Clear &buffer", this);
- clearAction->setStatusTip("Clears display buffer");
- connect(clearAction, SIGNAL(triggered()), this, SLOT(clearBuffer()));
- contextMenu = plainTextEdit->createStandardContextMenu();
- contextMenu->addSeparator();
- contextMenu->addAction(clearAction);
- connect(plainTextEdit, SIGNAL(customContextMenuRequested(const QPoint)), this, SLOT(showContextMenu(const QPoint)));
-
- QGridLayout *mainLayout = new QGridLayout();
- mainLayout->addWidget(plainTextEdit);
- setLayout(mainLayout);
-}
-
-void InfoTab::info(std::string str)
-{
- plainTextEdit->moveCursor(QTextCursor::End);
- plainTextEdit->insertPlainText(str.c_str());
- plainTextEdit->moveCursor(QTextCursor::End);
-}
-
-void InfoTab::showContextMenu(const QPoint &pt) { contextMenu->exec(mapToGlobal(pt)); }
-
-void InfoTab::clearBuffer() { plainTextEdit->clear(); }
-
-NEXTPNR_NAMESPACE_END
diff --git a/gui/infotab.h b/gui/infotab.h deleted file mode 100644 index 41529973..00000000 --- a/gui/infotab.h +++ /dev/null @@ -1,48 +0,0 @@ -/*
- * nextpnr -- Next Generation Place and Route
- *
- * Copyright (C) 2018 Miodrag Milanovic <miodrag@symbioticeda.com>
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- */
-
-#ifndef INFOTAB_H
-#define INFOTAB_H
-
-#include <QMenu>
-#include <QPlainTextEdit>
-#include "nextpnr.h"
-
-NEXTPNR_NAMESPACE_BEGIN
-
-class InfoTab : public QWidget
-{
- Q_OBJECT
-
- public:
- explicit InfoTab(QWidget *parent = 0);
- void info(std::string str);
- public Q_SLOTS:
- void clearBuffer();
- private Q_SLOTS:
- void showContextMenu(const QPoint &pt);
-
- private:
- QPlainTextEdit *plainTextEdit;
- QMenu *contextMenu;
-};
-
-NEXTPNR_NAMESPACE_END
-
-#endif // INFOTAB_H
diff --git a/gui/resources/splash.png b/gui/resources/splash.png Binary files differdeleted file mode 100644 index 14d2842b..00000000 --- a/gui/resources/splash.png +++ /dev/null diff --git a/gui/yosys_edit.cc b/gui/yosys_edit.cc deleted file mode 100644 index 72d2430d..00000000 --- a/gui/yosys_edit.cc +++ /dev/null @@ -1,96 +0,0 @@ -/* - * nextpnr -- Next Generation Place and Route - * - * Copyright (C) 2018 Miodrag Milanovic <miodrag@symbioticeda.com> - * Copyright (C) 2018 Alex Tsui - * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - */ - -#include "yosys_edit.h" -#include <QKeyEvent> -#include <QToolTip> - -NEXTPNR_NAMESPACE_BEGIN - -YosysLineEditor::YosysLineEditor(QWidget *parent) : QLineEdit(parent), index(0) -{ - setContextMenuPolicy(Qt::CustomContextMenu); - QAction *clearAction = new QAction("Clear &history", this); - clearAction->setStatusTip("Clears line edit history"); - connect(clearAction, SIGNAL(triggered()), this, SLOT(clearHistory())); - contextMenu = createStandardContextMenu(); - contextMenu->addSeparator(); - contextMenu->addAction(clearAction); - - connect(this, SIGNAL(returnPressed()), SLOT(textInserted())); - connect(this, SIGNAL(customContextMenuRequested(const QPoint)), this, SLOT(showContextMenu(const QPoint))); -} - -void YosysLineEditor::keyPressEvent(QKeyEvent *ev) -{ - - if (ev->key() == Qt::Key_Up || ev->key() == Qt::Key_Down) { - QToolTip::hideText(); - if (lines.empty()) - return; - if (ev->key() == Qt::Key_Up) - index--; - if (ev->key() == Qt::Key_Down) - index++; - - if (index < 0) - index = 0; - if (index >= lines.size()) { - index = lines.size(); - clear(); - return; - } - setText(lines[index]); - } else if (ev->key() == Qt::Key_Escape) { - QToolTip::hideText(); - clear(); - return; - } else if (ev->key() == Qt::Key_Tab) { - return; - } - QToolTip::hideText(); - - QLineEdit::keyPressEvent(ev); -} - -// This makes TAB work -bool YosysLineEditor::focusNextPrevChild(bool next) { return false; } - -void YosysLineEditor::textInserted() -{ - if (lines.empty() || lines.back() != text()) - lines += text(); - if (lines.size() > 100) - lines.removeFirst(); - index = lines.size(); - clear(); - Q_EMIT textLineInserted(lines.back()); -} - -void YosysLineEditor::showContextMenu(const QPoint &pt) { contextMenu->exec(mapToGlobal(pt)); } - -void YosysLineEditor::clearHistory() -{ - lines.clear(); - index = 0; - clear(); -} - -NEXTPNR_NAMESPACE_END diff --git a/gui/yosys_edit.h b/gui/yosys_edit.h deleted file mode 100644 index 05e4ae36..00000000 --- a/gui/yosys_edit.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - * nextpnr -- Next Generation Place and Route - * - * Copyright (C) 2018 Miodrag Milanovic <miodrag@symbioticeda.com> - * Copyright (C) 2018 Alex Tsui - * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - */ - -#ifndef YOSYS_EDIT_H -#define YOSYS_EDIT_H - -#include <QLineEdit> -#include <QMenu> -#include "nextpnr.h" - -NEXTPNR_NAMESPACE_BEGIN - -class YosysLineEditor : public QLineEdit -{ - Q_OBJECT - - public: - explicit YosysLineEditor(QWidget *parent = 0); - - private Q_SLOTS: - void textInserted(); - void showContextMenu(const QPoint &pt); - void clearHistory(); - - Q_SIGNALS: - void textLineInserted(QString); - - protected: - void keyPressEvent(QKeyEvent *) Q_DECL_OVERRIDE; - bool focusNextPrevChild(bool next) Q_DECL_OVERRIDE; - - private: - int index; - QStringList lines; - QMenu *contextMenu; -}; - -NEXTPNR_NAMESPACE_END - -#endif // YOSYS_EDIT_H diff --git a/gui/yosystab.cc b/gui/yosystab.cc deleted file mode 100644 index 9bbd9c12..00000000 --- a/gui/yosystab.cc +++ /dev/null @@ -1,107 +0,0 @@ -/*
- * nextpnr -- Next Generation Place and Route
- *
- * Copyright (C) 2018 Miodrag Milanovic <miodrag@symbioticeda.com>
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- */
-
-#include "yosystab.h"
-#include <QGridLayout>
-#include <QMessageBox>
-
-NEXTPNR_NAMESPACE_BEGIN
-
-YosysTab::YosysTab(QString folder, QWidget *parent) : QWidget(parent)
-{
- QFont f("unexistent");
- f.setStyleHint(QFont::Monospace);
-
- console = new QPlainTextEdit();
- console->setMinimumHeight(100);
- console->setReadOnly(true);
- console->setTextInteractionFlags(Qt::TextSelectableByMouse | Qt::TextSelectableByKeyboard);
- console->setFont(f);
-
- console->setContextMenuPolicy(Qt::CustomContextMenu);
- QAction *clearAction = new QAction("Clear &buffer", this);
- clearAction->setStatusTip("Clears display buffer");
- connect(clearAction, SIGNAL(triggered()), this, SLOT(clearBuffer()));
- contextMenu = console->createStandardContextMenu();
- contextMenu->addSeparator();
- contextMenu->addAction(clearAction);
- connect(console, SIGNAL(customContextMenuRequested(const QPoint)), this, SLOT(showContextMenu(const QPoint)));
-
- lineEdit = new YosysLineEditor();
- lineEdit->setMinimumHeight(30);
- lineEdit->setMaximumHeight(30);
- lineEdit->setFont(f);
- lineEdit->setFocus();
- lineEdit->setEnabled(false);
- lineEdit->setPlaceholderText("yosys>");
- connect(lineEdit, SIGNAL(textLineInserted(QString)), this, SLOT(editLineReturnPressed(QString)));
-
- QGridLayout *mainLayout = new QGridLayout();
- mainLayout->addWidget(console, 0, 0);
- mainLayout->addWidget(lineEdit, 1, 0);
- setLayout(mainLayout);
-
- process = new QProcess();
- connect(process, SIGNAL(readyReadStandardError()), this, SLOT(onReadyReadStandardError()));
- connect(process, SIGNAL(readyReadStandardOutput()), this, SLOT(onReadyReadStandardOutput()));
- connect(process, &QProcess::started, this, [this] { lineEdit->setEnabled(true); });
-
-#if QT_VERSION < QT_VERSION_CHECK(5, 6, 0)
- connect(process, static_cast<void (QProcess::*)(QProcess::ProcessError)>(&QProcess::error), this, [this](QProcess::ProcessError error) {
-#else
- connect(process, &QProcess::errorOccurred, this, [this](QProcess::ProcessError error) {
-#endif
- if (error == QProcess::FailedToStart) {
- QMessageBox::critical(
- this, QString::fromUtf8("Yosys cannot be started!"),
- QString::fromUtf8("<p>Please make sure you have Yosys installed and available in path</p>"));
- Q_EMIT deleteLater();
- }
- });
- process->setWorkingDirectory(folder);
- process->start("yosys");
-}
-
-YosysTab::~YosysTab()
-{
- process->terminate();
- process->waitForFinished(1000); // in ms
- process->kill();
- process->close();
-}
-
-void YosysTab::displayString(QString text)
-{
- QTextCursor cursor = console->textCursor();
- cursor.movePosition(QTextCursor::End);
- cursor.insertText(text);
- cursor.movePosition(QTextCursor::End);
- console->setTextCursor(cursor);
-}
-
-void YosysTab::onReadyReadStandardOutput() { displayString(process->readAllStandardOutput()); }
-void YosysTab::onReadyReadStandardError() { displayString(process->readAllStandardError()); }
-
-void YosysTab::editLineReturnPressed(QString text) { process->write(text.toLatin1() + "\n"); }
-
-void YosysTab::showContextMenu(const QPoint &pt) { contextMenu->exec(mapToGlobal(pt)); }
-
-void YosysTab::clearBuffer() { console->clear(); }
-
-NEXTPNR_NAMESPACE_END
diff --git a/gui/yosystab.h b/gui/yosystab.h deleted file mode 100644 index 1c668d15..00000000 --- a/gui/yosystab.h +++ /dev/null @@ -1,59 +0,0 @@ -/*
- * nextpnr -- Next Generation Place and Route
- *
- * Copyright (C) 2018 Miodrag Milanovic <miodrag@symbioticeda.com>
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- */
-
-#ifndef YOSYSTAB_H
-#define YOSYSTAB_H
-
-#include <QLineEdit>
-#include <QMenu>
-#include <QPlainTextEdit>
-#include <QProcess>
-#include "nextpnr.h"
-#include "yosys_edit.h"
-
-NEXTPNR_NAMESPACE_BEGIN
-
-class YosysTab : public QWidget
-{
- Q_OBJECT
-
- public:
- explicit YosysTab(QString folder, QWidget *parent = 0);
- ~YosysTab();
-
- private:
- void displayString(QString text);
- private Q_SLOTS:
- void showContextMenu(const QPoint &pt);
- void editLineReturnPressed(QString text);
- void onReadyReadStandardOutput();
- void onReadyReadStandardError();
- public Q_SLOTS:
- void clearBuffer();
-
- private:
- QPlainTextEdit *console;
- YosysLineEditor *lineEdit;
- QMenu *contextMenu;
- QProcess *process;
-};
-
-NEXTPNR_NAMESPACE_END
-
-#endif // YOSYSTAB_H
|