From 07ff5ad8b8e4d0f87770b81b8478aa257567c504 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Fri, 13 Jul 2018 19:56:11 +0200 Subject: Made python console use edit line and better --- gui/pythontab.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'gui/pythontab.h') diff --git a/gui/pythontab.h b/gui/pythontab.h index 4b22e6a9..3fd12981 100644 --- a/gui/pythontab.h +++ b/gui/pythontab.h @@ -25,6 +25,7 @@ #include #include #include +#include "ParseHelper.h" #include "line_editor.h" #include "nextpnr.h" #include "pyconsole.h" @@ -42,13 +43,20 @@ class PythonTab : public QWidget private Q_SLOTS: void showContextMenu(const QPoint &pt); void clearBuffer(); + void editLineReturnPressed(QString text); public Q_SLOTS: void newContext(Context *ctx); private: PythonConsole *console; + LineEditor *lineEdit; QMenu *contextMenu; bool initialized; + ParseHelper parseHelper; + QString prompt; + + static const QString PROMPT; + static const QString MULTILINE_PROMPT; }; NEXTPNR_NAMESPACE_END -- cgit v1.2.3 From 5216e488639fc8420d38c35177b796e1cf56ac8b Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Sat, 14 Jul 2018 14:06:05 +0200 Subject: join python and info into one tab --- gui/pythontab.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'gui/pythontab.h') diff --git a/gui/pythontab.h b/gui/pythontab.h index 3fd12981..134874b6 100644 --- a/gui/pythontab.h +++ b/gui/pythontab.h @@ -20,8 +20,6 @@ #ifndef PYTHONTAB_H #define PYTHONTAB_H -#ifndef NO_PYTHON - #include #include #include @@ -42,10 +40,11 @@ class PythonTab : public QWidget private Q_SLOTS: void showContextMenu(const QPoint &pt); - void clearBuffer(); void editLineReturnPressed(QString text); public Q_SLOTS: void newContext(Context *ctx); + void info(std::string str); + void clearBuffer(); private: PythonConsole *console; @@ -60,6 +59,5 @@ class PythonTab : public QWidget }; NEXTPNR_NAMESPACE_END -#endif // NO_PYTHON #endif // PYTHONTAB_H -- cgit v1.2.3