X-Git-Url: https://gitweb.stoutner.com/?a=blobdiff_plain;f=src%2Fwidgets%2FTabWidget.h;h=e0cf0b65acd681ae93a7724a70670e74e9068aae;hb=refs%2Fheads%2Fmaster;hp=4b06c640f5f1080e795b5567ba8ff58446e04985;hpb=c5706a6ff3fbc42418e60b79fbe3f5c19396f7d2;p=PrivacyBrowserPC.git diff --git a/src/widgets/TabWidget.h b/src/widgets/TabWidget.h index 4b06c64..86ba40b 100644 --- a/src/widgets/TabWidget.h +++ b/src/widgets/TabWidget.h @@ -1,24 +1,24 @@ -/* - * Copyright 2022-2024 Soren Stoutner . +/* SPDX-License-Identifier: GPL-3.0-or-later + * SPDX-FileCopyrightText: 2022-2025 Soren Stoutner * - * This file is part of Privacy Browser PC . + * This file is part of Privacy Browser PC . * - * Privacy Browser PC is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This program is free software: you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free Software + * Foundation, either version 3 of the License, or (at your option) any later + * version. * - * Privacy Browser PC is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + * details. * - * You should have received a copy of the GNU General Public License - * along with Privacy Browser PC. If not, see . + * You should have received a copy of the GNU General Public License along with + * this program. If not, see . */ -#ifndef TABWIDGET_H -#define TABWIDGET_H +#ifndef TAB_WIDGET_H +#define TAB_WIDGET_H // Application headers. #include "PrivacyWebEngineView.h" @@ -30,6 +30,7 @@ // Qt toolkit headers. #include #include +#include #include #include #include @@ -50,6 +51,9 @@ public: // The destructor. ~TabWidget(); + // The public variables. + PrivacyWebEngineView *currentPrivacyWebEngineViewPointer; + // The public functions. void applyOnTheFlyZoomFactor(const double zoomFactorDouble) const; PrivacyWebEngineView* loadBlankInitialWebsite(); @@ -71,26 +75,32 @@ public: // The public static variables. static QString webEngineDefaultUserAgent; -signals: +Q_SIGNALS: // The signals. void addCookie(const QNetworkCookie &cookie) const; + void blockedRequestsUpdated(const QVector blockedRequests) const; + void cookiesChanged(const int numberOfCookies) const; + void easyListStatusChanged(const bool isEnabled) const; + void easyPrivacyStatusChanged(const bool isEnabled) const; + void fanboysAnnoyanceListStatusChanged(const bool isEnabled) const; void removeCookie(const QNetworkCookie &cookie) const; void clearUrlLineEditFocus() const; void fullScreenRequested(const bool toggleOn) const; void hideProgressBar() const; void linkHovered(const QString &linkUrl) const; void showProgressBar(const int &progress) const; - void updateBackAction(const bool &isEnabled) const; - void updateCookiesAction(const int numberOfCookies) const; + void ultraListStatusChanged(const bool) const; + void ultraPrivacyStatusChanged(const bool) const; + void updateBackAction(const bool isEnabled) const; void updateDefaultZoomFactor(const double newDefaultZoomFactorDouble) const; - void updateDeveloperToolsAction(const bool &isEnabled) const; - void updateDomStorageAction(const bool &isEnabled) const; + void updateDeveloperToolsAction(const bool isEnabled) const; + void updateDomStorageAction(const bool isEnabled) const; void updateDomainSettingsIndicator(const bool status) const; void updateFindText(const QString &text, const bool findCaseSensitive) const; void updateFindTextResults(const QWebEngineFindTextResult &findTextResult) const; - void updateForwardAction(const bool &isEnabled) const; - void updateJavaScriptAction(const bool &isEnabled) const; - void updateLocalStorageAction(const bool &isEnabled) const; + void updateForwardAction(const bool isEnabled) const; + void updateJavaScriptAction(const bool isEnabled) const; + void updateLocalStorageAction(const bool isEnabled) const; void updateSearchEngineActions(const QString &searchEngine, const bool &updateCustomSearchEngineStatus) const; void updateUrlLineEdit(const QUrl &newUrl) const; void updateUserAgentActions(const QString &userAgent, const bool &updateCustomUserAgentStatus) const; @@ -100,7 +110,7 @@ signals: public Q_SLOTS: // The public slots. void addCookieToStore(QNetworkCookie cookie, QWebEngineCookieStore *webEngineCookieStorePointer = nullptr) const; - PrivacyWebEngineView* addTab(const bool removeUrlLineEditFocus = false, const bool adjacent = false, const bool backgroundTab = false, const QString urlString = nullptr); + PrivacyWebEngineView* addTab(const bool removeUrlLineEditFocus = false, const bool adjacent = true, const bool backgroundTab = false, const QString urlString = QLatin1String("")); void applyApplicationSettings(); void applyDomainSettingsAndReload(); void applyOnTheFlySearchEngine(QAction *searchEngineActionPointer); @@ -121,6 +131,12 @@ public Q_SLOTS: void reloadAndBypassCache() const; void saveArchive(); void stop() const; + void storeCurrentUrlText(const QString &urlText) const; + void toggleEasyList() const; + void toggleEasyPrivacy() const; + void toggleFanboysAnnoyanceList() const; + void toggleUltraList() const; + void toggleUltraPrivacy() const; private Q_SLOTS: // The private slots. @@ -129,8 +145,7 @@ private Q_SLOTS: void findTextFinished(const QWebEngineFindTextResult &findTextResult); void fullScreenRequested(QWebEngineFullScreenRequest fullScreenRequest) const; void pageLinkHovered(const QString &linkUrl) const; - void printWebpage(QPrinter *printerPointer) const; - void showSaveDialog(QWebEngineDownloadItem *downloadItemPointer); + void showSaveDialog(QWebEngineDownloadRequest *downloadRequestPointer); void stopLoadingFavoriteIconMovie() const; void updateUiFromWebEngineView(const PrivacyWebEngineView *privacyWebEngineViewPointer) const; void updateUiWithTabSettings(); @@ -141,7 +156,6 @@ private: void updateDownloadDirectory(QString newDownloadDirectory) const; // The private variables. - PrivacyWebEngineView *currentPrivacyWebEngineViewPointer; QWebEngineCookieStore *currentWebEngineCookieStorePointer; QWebEngineHistory *currentWebEngineHistoryPointer; QWebEnginePage *currentWebEnginePagePointer;