X-Git-Url: https://gitweb.stoutner.com/?a=blobdiff_plain;f=src%2Fwidgets%2FPrivacyWebEngineView.h;h=061f65725d0825e5286e3ecdfeb183d6ca1f91b0;hb=dcb48bab299233e40e9518076c3e032ca072cb57;hp=8a049576438953b23d72852889b97354c17d17b5;hpb=8292f934246cb283e1b0c32f4388c674f275c7aa;p=PrivacyBrowserPC.git diff --git a/src/widgets/PrivacyWebEngineView.h b/src/widgets/PrivacyWebEngineView.h index 8a04957..061f657 100644 --- a/src/widgets/PrivacyWebEngineView.h +++ b/src/widgets/PrivacyWebEngineView.h @@ -1,5 +1,5 @@ /* - * Copyright © 2022 Soren Stoutner . + * Copyright 2022-2023 Soren Stoutner . * * This file is part of Privacy Browser PC . * @@ -21,7 +21,9 @@ #define PRIVACYWEBENGINEVIEW_H // Qt toolkit headers. +#include #include +#include #include class PrivacyWebEngineView : public QWebEngineView @@ -36,19 +38,41 @@ public: // The public variables. std::list *cookieListPointer = new std::list; QString domainSettingsName = QStringLiteral(""); + QIcon favoriteIcon = QIcon::fromTheme(QStringLiteral("globe")); + bool findCaseSensitive = false; + QString findString = QStringLiteral(""); + QWebEngineFindTextResult findTextResult = QWebEngineFindTextResult(); + bool isLoading = false; + int loadProgressInt = -1; bool localStorageEnabled = false; + // The public functions. + void applyDomainSettings(const QString &hostname, const bool reloadWebsite); + signals: // The signals. + void displayHttpPingBlockedDialog(const QString &httpPingUrl) const; void updateCookiesAction(const int numberOfCookies) const; + void updateUi(const PrivacyWebEngineView *privacyWebEngineViewPointer) const; public Q_SLOTS: // The public slots. void addCookieToList(const QNetworkCookie &cookie) const; void removeCookieFromList(const QNetworkCookie &cookie) const; +private Q_SLOTS: + // The private slots. + void applyDomainSettingsWithoutReloading(const QString &hostname); + void displayHttpPingDialog(const QString &httpPingUrl) const; + +private: + // The private variables. + QWebEngineProfile *webEngineProfilePointer; + QWebEngineSettings *webEngineSettingsPointer; + protected: // The protected functions. + void contextMenuEvent(QContextMenuEvent *contextMenuEvent) override; QWebEngineView* createWindow(QWebEnginePage::WebWindowType webWindowType) override; }; #endif