aboutsummaryrefslogtreecommitdiffstats
path: root/gui/line_editor.h
diff options
context:
space:
mode:
authorSergiusz Bazanski <q3k@q3k.org>2018-07-13 19:10:20 +0100
committerSergiusz Bazanski <q3k@q3k.org>2018-07-13 19:10:27 +0100
commitb8ca1a55820d6429f5ad5207be1e125b8786e093 (patch)
tree6733f6ff9de556ccee6bf87b33dbe6b963cbc6db /gui/line_editor.h
parent89809a8b810dd57f50f365d70a0ce547705f8dbb (diff)
parent07ff5ad8b8e4d0f87770b81b8478aa257567c504 (diff)
downloadnextpnr-b8ca1a55820d6429f5ad5207be1e125b8786e093.tar.gz
nextpnr-b8ca1a55820d6429f5ad5207be1e125b8786e093.tar.bz2
nextpnr-b8ca1a55820d6429f5ad5207be1e125b8786e093.zip
Merge branch 'master' of gitlab.com:SymbioticEDA/nextpnr into q3k/lock-the-things
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