diff options
Diffstat (limited to 'src/widgets/BrowserWindow.hpp')
| -rw-r--r-- | src/widgets/BrowserWindow.hpp | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/src/widgets/BrowserWindow.hpp b/src/widgets/BrowserWindow.hpp index ee59e5a..6c49006 100644 --- a/src/widgets/BrowserWindow.hpp +++ b/src/widgets/BrowserWindow.hpp @@ -3,8 +3,8 @@ #include <QMainWindow> #include "Configuration.hpp" -#include "WindowMediator.hpp" #include "utils.hpp" +#include "widgets/WebViewStack.hpp" using WindowId = qsizetype; @@ -15,20 +15,38 @@ public: BrowserWindow(const Configuration &configuration, QWebEngineProfile *profile = new QWebEngineProfile, const QStringList &urls = {}); - DEFINE_GETTER(mediator, win_mediator) DEFINE_GETTER(get_id, win_id) DEFINE_SETTER(set_id, win_id) + DELEGATE(webview_stack, has_webview, has_webview) + DELEGATE(webview_stack, current_webview_id, current_webview_id) + DELEGATE(webview_stack, get_webview_list, get_webview_list) + DELEGATE(webview_stack, set_search_text, set_search_text) + DELEGATE(webview_stack, open_devtools, open_devtools) + DELEGATE(webview_stack, open_url, open_url) + DELEGATE(webview_stack, webview_history_back, history_back) + DELEGATE(webview_stack, webview_history_forward, history_forward) + DELEGATE(webview_stack, close, close_webview) + DELEGATE(webview_stack, focus_webview, select_webview) + DELEGATE(webview_stack, scroll, scroll) + DELEGATE(webview_stack, scroll_to_top, scroll_to_top) + DELEGATE(webview_stack, scroll_to_bottom, scroll_to_bottom) bool on_window_key_event(QKeyEvent *event); void closeEvent(QCloseEvent * /*event*/) override { emit closed(); }; + void update_user_agent(const QString &user_agent); + void update_downloads_dir(const QString &downloads_dir); + void update_permissions_persistance(const QString &persistance); + signals: void closed(); + void new_window_requested(const QUrl &url); + void close_window_requested(); private: - WindowMediator *win_mediator; const Configuration &configuration; + WebViewStack *webview_stack; WindowId win_id = -1; }; |
