X-Git-Url: https://gitweb.stoutner.com/?a=blobdiff_plain;f=src%2Fwidgets%2FTabWidget.h;h=f0efc1d4242e4649edcec69fbcb5587f98b12035;hb=efed1601e5f6e79d746866d55d625d777b64a248;hp=bd857b0d65a8b431c8a7dd08779cde91d057ad30;hpb=aa9a6b20db5e2c808b390b62704f28bd649e283c;p=PrivacyBrowserPC.git diff --git a/src/widgets/TabWidget.h b/src/widgets/TabWidget.h index bd857b0..f0efc1d 100644 --- a/src/widgets/TabWidget.h +++ b/src/widgets/TabWidget.h @@ -1,5 +1,5 @@ /* - * Copyright © 2022 Soren Stoutner . + * Copyright 2022-2023 Soren Stoutner . * * This file is part of Privacy Browser PC . * @@ -22,11 +22,13 @@ // Application headers. #include "PrivacyWebEngineView.h" +#include "helpers/UserAgentHelper.h" // KDE Framework headers. #include // Qt toolkit headers. +#include #include #include #include @@ -49,7 +51,8 @@ public: ~TabWidget(); // The public functions. - void applyOnTheFlyZoomFactor(const double &zoomFactor); + void applyOnTheFlyZoomFactor(const double &zoomFactor) const; + void applySpellCheckLanguages() const; PrivacyWebEngineView* loadBlankInitialWebsite(); void loadInitialWebsite(); void findPrevious(const QString &text) const; @@ -91,10 +94,9 @@ signals: public Q_SLOTS: // The public slots. void addCookieToStore(QNetworkCookie cookie, QWebEngineCookieStore *webEngineCookieStorePointer = nullptr) const; - PrivacyWebEngineView* addTab(const bool focusNewWebEngineView=false); + PrivacyWebEngineView* addTab(const bool removeUrlLineEditFocus=false, const bool backgroundTab=false); void applyApplicationSettings(); void applyDomainSettingsAndReload(); - void applyDomainSettingsWithoutReloading(const QString &hostname); void applyOnTheFlySearchEngine(QAction *searchEngineActionPointer); void applyOnTheFlyUserAgent(QAction *userAgentActionPointer) const; void back() const; @@ -118,25 +120,25 @@ private Q_SLOTS: void fullScreenRequested(QWebEngineFullScreenRequest fullScreenRequest) const; void pageLinkHovered(const QString &linkUrl) const; void printWebpage(QPrinter *printerPointer) const; - void showSaveDialog(QWebEngineDownloadItem *downloadItemPointer) const; - void showSaveFilePickerDialog(QUrl &downloadUrl, QString &suggestedFileName); + void showSaveDialog(QWebEngineDownloadItem *downloadItemPointer); + void updateUiFromWebEngineView(const PrivacyWebEngineView *privacyWebEngineViewPointer) const; void updateUiWithTabSettings(); + void useNativeKdeDownloader(QUrl &downloadUrl, QString &suggestedFileName); private: // 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(QStringLiteral("globe")); + bool isRunningKde = false; + QMovie *loadingFavoriteIconMoviePointer; QString searchEngineUrl; - QTabWidget *tabWidgetPointer; + QTabWidget *qTabWidgetPointer; + UserAgentHelper *userAgentHelperPointer; bool wipingCurrentFindTextSelection = false; - - // The private functions. - void applyDomainSettings(const QString &hostname, const bool reloadWebsite); }; #endif