#pragma once #include #include struct lua_State; class CommandEdit : public QLineEdit { Q_OBJECT std::vector commandHistory; int historyIndex = 0; void executeCommand(); void getOrCreateEnvironment(lua_State* L); public: CommandEdit(QWidget* parent = nullptr); ~CommandEdit(); void keyPressEvent(QKeyEvent *) override; };