X-Git-Url: https://gitweb.stoutner.com/?p=PrivacyBrowserPC.git;a=blobdiff_plain;f=src%2Fwidgets%2FTabWidget.h;h=4b06c640f5f1080e795b5567ba8ff58446e04985;hp=4b247f71d83fa37b3c7d2c1dec670e9457a4e45a;hb=refs%2Fheads%2Fmaster;hpb=5f747e35e3555da6a0f89f0444163d578ab1db22 diff --git a/src/widgets/TabWidget.h b/src/widgets/TabWidget.h index 4b247f7..e0cf0b6 100644 --- a/src/widgets/TabWidget.h +++ b/src/widgets/TabWidget.h @@ -1,7 +1,7 @@ /* - * Copyright 2022-2023 Soren Stoutner . + * Copyright 2022-2024 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 @@ -28,6 +28,7 @@ #include // Qt toolkit headers. +#include #include #include #include @@ -44,19 +45,27 @@ class TabWidget : public QWidget public: // The primary contructor. - explicit TabWidget(QWidget *parent); + explicit TabWidget(QWidget *windowPointer); // The destructor. ~TabWidget(); + // The public variables. + PrivacyWebEngineView *currentPrivacyWebEngineViewPointer; + // The public functions. - void applyOnTheFlyZoomFactor(const double &zoomFactor); + void applyOnTheFlyZoomFactor(const double zoomFactorDouble) const; PrivacyWebEngineView* loadBlankInitialWebsite(); void loadInitialWebsite(); void findPrevious(const QString &text) const; std::list* getCookieList() const; + QIcon getCurrentTabFavoritIcon() const; + QString getCurrentTabTitle() const; + QString getCurrentTabUrl() const; + QString getCurrentUserAgent() const; QString& getDomainSettingsName() const; void setTabBarVisible(const bool visible) const; + void toggleDeveloperTools(const bool enabled) const; void toggleDomStorage() const; void toggleFindCaseSensitive(const QString &text); void toggleJavaScript() const; @@ -68,6 +77,8 @@ public: signals: // The signals. void addCookie(const QNetworkCookie &cookie) const; + void blockedRequestsUpdated(const int blockedRequests) const; + void cookiesChanged(const int numberOfCookies) const; void removeCookie(const QNetworkCookie &cookie) const; void clearUrlLineEditFocus() const; void fullScreenRequested(const bool toggleOn) const; @@ -75,7 +86,8 @@ signals: 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 updateDefaultZoomFactor(const double newDefaultZoomFactorDouble) 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; @@ -87,17 +99,17 @@ signals: void updateUrlLineEdit(const QUrl &newUrl) const; void updateUserAgentActions(const QString &userAgent, const bool &updateCustomUserAgentStatus) const; void updateWindowTitle(const QString &title) const; - void updateZoomFactorAction(const double &zoomFactor) const; + void updateZoomActions(const double zoomFactorDouble) const; public Q_SLOTS: // The public slots. void addCookieToStore(QNetworkCookie cookie, QWebEngineCookieStore *webEngineCookieStorePointer = nullptr) const; - PrivacyWebEngineView* addTab(const bool removeUrlLineEditFocus=false, const bool backgroundTab=false); + PrivacyWebEngineView* addTab(const bool removeUrlLineEditFocus = false, const bool adjacent = false, const bool backgroundTab = false, const QString urlString = nullptr); void applyApplicationSettings(); void applyDomainSettingsAndReload(); - void applyDomainSettingsWithoutReloading(const QString &hostname); void applyOnTheFlySearchEngine(QAction *searchEngineActionPointer); void applyOnTheFlyUserAgent(QAction *userAgentActionPointer) const; + void applySpellCheckLanguages() const; void back() const; void deleteAllCookies() const; void deleteCookieFromStore(const QNetworkCookie &cookie) const; @@ -110,6 +122,9 @@ public Q_SLOTS: void print() const; void printPreview() const; void refresh() const; + void reloadAndBypassCache() const; + void saveArchive(); + void stop() const; private Q_SLOTS: // The private slots. @@ -120,25 +135,28 @@ private Q_SLOTS: void pageLinkHovered(const QString &linkUrl) const; void printWebpage(QPrinter *printerPointer) const; void showSaveDialog(QWebEngineDownloadItem *downloadItemPointer); + void stopLoadingFavoriteIconMovie() const; + void updateUiFromWebEngineView(const PrivacyWebEngineView *privacyWebEngineViewPointer) const; void updateUiWithTabSettings(); - void useNativeDownloader(QUrl &downloadUrl, QString &suggestedFileName); + void useNativeKdeDownloader(QUrl &downloadUrl, QString &suggestedFileName); private: + // The private functions. + void updateDownloadDirectory(QString newDownloadDirectory) const; + // The private variables. - double currentZoomFactor; // This can be removed once has been resolved. - PrivacyWebEngineView *currentPrivacyWebEngineViewPointer; QWebEngineCookieStore *currentWebEngineCookieStorePointer; QWebEngineHistory *currentWebEngineHistoryPointer; QWebEnginePage *currentWebEnginePagePointer; QWebEngineProfile *currentWebEngineProfilePointer; QWebEngineSettings *currentWebEngineSettingsPointer; - QIcon defaultTabIcon = QIcon::fromTheme(QStringLiteral("globe")); + QIcon defaultFavoriteIcon = QIcon::fromTheme(QLatin1String("globe"), QIcon::fromTheme(QLatin1String("applications-internet"))); + bool isRunningKde = false; + QMovie *loadingFavoriteIconMoviePointer; + QTabWidget *qTabWidgetPointer; + bool savingArchive; QString searchEngineUrl; - QTabWidget *tabWidgetPointer; UserAgentHelper *userAgentHelperPointer; bool wipingCurrentFindTextSelection = false; - - // The private functions. - void applyDomainSettings(const QString &hostname, const bool reloadWebsite); }; #endif