X-Git-Url: https://gitweb.stoutner.com/?a=blobdiff_plain;f=src%2Fwidgets%2FTabWidget.h;h=4b247f71d83fa37b3c7d2c1dec670e9457a4e45a;hb=5f747e35e3555da6a0f89f0444163d578ab1db22;hp=ed9ad03b002e314227c792d6a501d86f7533cd2c;hpb=6acd73c4148bac2a8c2f637e70080a43b12fd14e;p=PrivacyBrowserPC.git diff --git a/src/widgets/TabWidget.h b/src/widgets/TabWidget.h index ed9ad03..4b247f7 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,6 +22,7 @@ // Application headers. #include "PrivacyWebEngineView.h" +#include "helpers/UserAgentHelper.h" // KDE Framework headers. #include @@ -52,10 +53,12 @@ public: void applyOnTheFlyZoomFactor(const double &zoomFactor); PrivacyWebEngineView* loadBlankInitialWebsite(); void loadInitialWebsite(); + void findPrevious(const QString &text) const; std::list* getCookieList() const; QString& getDomainSettingsName() const; void setTabBarVisible(const bool visible) const; void toggleDomStorage() const; + void toggleFindCaseSensitive(const QString &text); void toggleJavaScript() const; void toggleLocalStorage(); @@ -75,6 +78,8 @@ signals: void updateCookiesAction(const int numberOfCookies) 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; @@ -87,7 +92,7 @@ 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); @@ -96,6 +101,7 @@ public Q_SLOTS: void back() const; void deleteAllCookies() const; void deleteCookieFromStore(const QNetworkCookie &cookie) const; + void findText(const QString &text) const; void forward() const; void home() const; void loadUrlFromLineEdit(QString url) const; @@ -109,12 +115,13 @@ private Q_SLOTS: // The private slots. void addFirstTab(); void deleteTab(const int tabIndex); + 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) const; - void showSaveFilePickerDialog(QUrl &downloadUrl, QString &suggestedFileName); + void showSaveDialog(QWebEngineDownloadItem *downloadItemPointer); void updateUiWithTabSettings(); + void useNativeDownloader(QUrl &downloadUrl, QString &suggestedFileName); private: // The private variables. @@ -128,6 +135,8 @@ private: QIcon defaultTabIcon = QIcon::fromTheme(QStringLiteral("globe")); QString searchEngineUrl; QTabWidget *tabWidgetPointer; + UserAgentHelper *userAgentHelperPointer; + bool wipingCurrentFindTextSelection = false; // The private functions. void applyDomainSettings(const QString &hostname, const bool reloadWebsite);