aboutsummaryrefslogtreecommitdiffstats
path: root/gui/line_editor.h
diff options
context:
space:
mode:
authorMiodrag Milanovic <mmicko@gmail.com>2018-07-13 19:56:11 +0200
committerMiodrag Milanovic <mmicko@gmail.com>2018-07-13 19:56:11 +0200
commit07ff5ad8b8e4d0f87770b81b8478aa257567c504 (patch)
tree805d62b8e63e92919da29b86e3ed0290d0182dd4 /gui/line_editor.h
parent013cfebcc5ccdf0fda9cedddd94e5b70ec20a029 (diff)
downloadnextpnr-07ff5ad8b8e4d0f87770b81b8478aa257567c504.tar.gz
nextpnr-07ff5ad8b8e4d0f87770b81b8478aa257567c504.tar.bz2
nextpnr-07ff5ad8b8e4d0f87770b81b8478aa257567c504.zip
Made python console use edit line and better
Diffstat (limited to 'gui/line_editor.h')
-rw-r--r--gui/line_editor.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/gui/line_editor.h b/gui/line_editor.h
index 91837182..5a57129b 100644
--- a/gui/line_editor.h
+++ b/gui/line_editor.h
@@ -2,6 +2,7 @@
* 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
@@ -20,8 +21,11 @@
#ifndef LINE_EDITOR_H
#define LINE_EDITOR_H
+#ifndef NO_PYTHON
+
#include <QLineEdit>
#include <QMenu>
+#include "ParseHelper.h"
#include "nextpnr.h"
NEXTPNR_NAMESPACE_BEGIN
@@ -31,7 +35,7 @@ class LineEditor : public QLineEdit
Q_OBJECT
public:
- explicit LineEditor(QWidget *parent = 0);
+ explicit LineEditor(ParseHelper *helper, QWidget *parent = 0);
private Q_SLOTS:
void textInserted();
@@ -43,13 +47,18 @@ class LineEditor : public QLineEdit
protected:
void keyPressEvent(QKeyEvent *) Q_DECL_OVERRIDE;
+ bool focusNextPrevChild(bool next) Q_DECL_OVERRIDE;
+ void autocomplete();
private:
int index;
QStringList lines;
QMenu *contextMenu;
+ ParseHelper *parseHelper;
};
NEXTPNR_NAMESPACE_END
+#endif // NO_PYTHON
+
#endif // LINE_EDITOR_H