diff options
Diffstat (limited to 'geminiwebpage.hpp')
| -rw-r--r-- | geminiwebpage.hpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/geminiwebpage.hpp b/geminiwebpage.hpp index 94c6a82..a5de627 100644 --- a/geminiwebpage.hpp +++ b/geminiwebpage.hpp @@ -3,20 +3,25 @@ #include <QObject> #include <QWebEnginePage> +#include "mainwindow.hpp" class GeminiWebPage : public QWebEnginePage { Q_OBJECT public: - explicit GeminiWebPage(QObject *parent = nullptr); + explicit GeminiWebPage(MainWindow * container); signals: void navigationRequest(QUrl const & url, bool & allow); protected: - bool acceptNavigationRequest(const QUrl &url, NavigationType type, bool isMainFrame); + bool acceptNavigationRequest(const QUrl &url, NavigationType type, bool isMainFrame) override; + QWebEnginePage *createWindow(QWebEnginePage::WebWindowType type) override; + +private: + MainWindow * main_window; }; #endif // GEMINIWEBPAGE_HPP |
