diff options
| author | Akshay Nair <phenax5@gmail.com> | 2025-03-08 18:16:51 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2025-03-08 18:16:51 +0530 |
| commit | b7ac4dc7a20c624a343c946c5decd1b84eab2b82 (patch) | |
| tree | 6e7efa381546244da8942ec023d94db634b73948 /include/CommandInput.hpp | |
| parent | ecd3ccde166910e3667b7b1a064e9c6db52d1646 (diff) | |
| download | null-browser-b7ac4dc7a20c624a343c946c5decd1b84eab2b82.tar.gz null-browser-b7ac4dc7a20c624a343c946c5decd1b84eab2b82.zip | |
Basic single view browser with url input
Diffstat (limited to 'include/CommandInput.hpp')
| -rw-r--r-- | include/CommandInput.hpp | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/include/CommandInput.hpp b/include/CommandInput.hpp new file mode 100644 index 0000000..e6dc53d --- /dev/null +++ b/include/CommandInput.hpp @@ -0,0 +1,33 @@ +#pragma once + +#include <QApplication> +#include <QDialog> +#include <QKeyEvent> +#include <QLabel> +#include <QLineEdit> +#include <QObject> +#include <QVBoxLayout> +#include <QWebEnginePage> +#include <QWebEngineView> +#include <QWidget> +#include <QWindow> +#include <lua.hpp> + +class CommandInput : public QFrame { + Q_OBJECT + +public: + CommandInput(QString defaultInput = "", QWidget *parentNode = nullptr); + void setInputFocus(bool focussed); + bool isInputFocussed(); + +signals: + void submitted(QString command); + +protected: + void keyPressEvent(QKeyEvent *event) override; + +private: + QBoxLayout *layout; + QLineEdit *input; +}; |
