From fdeb33d34a97d062a120f72da919f81d7b1d45bf Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Thu, 20 Mar 2025 22:10:57 +0530 Subject: Move header files to src --- src/InputMediator.hpp | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 src/InputMediator.hpp (limited to 'src/InputMediator.hpp') diff --git a/src/InputMediator.hpp b/src/InputMediator.hpp new file mode 100644 index 0000000..7194ff9 --- /dev/null +++ b/src/InputMediator.hpp @@ -0,0 +1,33 @@ +#pragma once + +#include +#include + +#include "LuaRuntime.hpp" +#include "keymap/KeymapEvaluator.hpp" +#include "utils.hpp" +#include "widgets/WebViewStack.hpp" + +class InputMediator : public QObject { + Q_OBJECT + +public: + InputMediator(WebViewStack *webViewStack, LuaRuntime *luaRuntime, + KeymapEvaluator *keymapEvaluator); + ~InputMediator(); + + DELEGATE(webViewStack, openUrl, openUrl) + DELEGATE(webViewStack, currentUrl, currentUrl) + DELEGATE(webViewStack, next, nextWebView) + DELEGATE(webViewStack, previous, previousWebView) + DELEGATE(webViewStack, closeCurrent, closeCurrentWebView) + DELEGATE(keymapEvaluator, evaluate, evaluateKeymap) + +private: + void evaluateCommand(QString command); + +private: + WebViewStack *webViewStack; + LuaRuntime *luaRuntime; + KeymapEvaluator *keymapEvaluator; +}; -- cgit v1.3.1