diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/CommandParser.hpp | 31 | ||||
| -rw-r--r-- | include/widgets/MainWindow.hpp | 2 |
2 files changed, 33 insertions, 0 deletions
diff --git a/include/CommandParser.hpp b/include/CommandParser.hpp new file mode 100644 index 0000000..128b5f4 --- /dev/null +++ b/include/CommandParser.hpp @@ -0,0 +1,31 @@ +#pragma once + +#include <QtCore/qcontainerfwd.h> +#include <QtCore> + +enum CommandType { + Noop, + LuaEval, + Open, + TabOpen, + TabNext, + TabPrev, +}; + +class Cmd { +public: + CommandType command; + QStringList args; + + Cmd(CommandType command = Noop, QStringList args = QStringList()) + : command(command), args(args) {} +}; + +class CommandParser { +public: + CommandParser(); + Cmd parse(QString command); + +private: + CommandType toCommandType(QString cmd); +}; diff --git a/include/widgets/MainWindow.hpp b/include/widgets/MainWindow.hpp index 15e2889..7f54ce2 100644 --- a/include/widgets/MainWindow.hpp +++ b/include/widgets/MainWindow.hpp @@ -2,6 +2,7 @@ #include <QMainWindow> #include <QObject> +#include <QStackedLayout> #include <QWebEngineView> #include "LuaRuntime.hpp" @@ -23,4 +24,5 @@ private: BrowserManager *browserManager; CommandInput *commandInput; LuaRuntime *luaRuntime; + QStackedLayout *layout; }; |
