X-Git-Url: https://gitweb.stoutner.com/?a=blobdiff_plain;f=src%2Fwindows%2FBrowserWindow.h;h=99fd146001fb69b83609b0968e231605725101de;hb=c76e7c8baa9761d771e5891ee699ea6ddc78c23a;hp=f86c1b2f11f7bfdd58ba3fa76ab106b229db6a82;hpb=5daa7af456c7daa05b1a055932b5156ed1f88b00;p=PrivacyBrowserPC.git diff --git a/src/windows/BrowserWindow.h b/src/windows/BrowserWindow.h index f86c1b2..99fd146 100644 --- a/src/windows/BrowserWindow.h +++ b/src/windows/BrowserWindow.h @@ -1,5 +1,5 @@ /* - * Copyright © 2022 Soren Stoutner . + * Copyright 2022-2023 Soren Stoutner . * * This file is part of Privacy Browser PC . * @@ -21,14 +21,17 @@ #define BROWSERWINDOW_H // Application headers. -#include "views/BrowserView.h" +#include "widgets/TabWidget.h" // KDE Frameworks headers. #include +#include #include // Qt toolkit headers. +#include #include +#include class BrowserWindow : public KXmlGuiWindow { @@ -37,37 +40,89 @@ class BrowserWindow : public KXmlGuiWindow public: // The default constructor. - BrowserWindow(); + BrowserWindow(bool firstWindow=true); + + // The public functions. + QSize sizeHint() const override; + + // The public variables. + TabWidget *tabWidgetPointer; private Q_SLOTS: // The private slots. + void addOrEditDomainSettings() const; void back() const; - void fileNew() const; + void clearUrlLineEditFocus() const; + void escape() const; + void findNext() const; + void findPrevious() const; void forward() const; + void fullScreenRequested(const bool toggleOn); void getZoomFactorFromUser(); + void hideFindTextActions() const; void home() const; void loadUrlFromLineEdit(const QString &url) const; + void newWindow() const; void refresh() const; - void settingsConfigure(); - void updateDomainSettingsIndicator(const bool status) const; - void updateOnTheFlySearchEngine(const QString &searchEngine) const; - void updateOnTheFlyUserAgent(const QString &userAgent) const; - void updateOnTheFlyZoomFactor(const double &zoomFactor); + void reloadAndBypassCache() const; + void showCookiesDialog(); + void showDownloadLocationBrowseDialog() const; + void showDomainSettingsDialog() const; + void showFindTextActions() const; + void showProgressBar(const int &progress) const; + void showSettingsDialog(); + void toggleDomStorage() const; + void toggleFindCaseSensitive() const; + void toggleJavaScript() const; + void toggleLocalStorage() const; + void toggleFullScreen(); + void toggleViewSource() const; + void toggleViewSourceInNewTab() const; + void updateCookiesAction(const int numberOfCookies) const; + void updateDomStorageAction(const bool &isEnabled) const; + void updateDomainSettingsIndicator(const bool status); + void updateFindText(const QString &text, const bool findCaseSensitive) const; + void updateFindTextResults(const QWebEngineFindTextResult &findTextResult) const; + void updateJavaScriptAction(const bool &isEnabled); + void updateLocalStorageAction(const bool &isEnabled); + void updateSearchEngineActions(const QString &searchEngine, const bool &updateCustomSearchEngineStatus); + void updateUserAgentActions(const QString &userAgent, const bool &updateCustomUserAgentStatus); + void updateZoomFactorAction(const double &zoomFactor); void updateSearchEngineLabel(const QString &searchEngineString) const; - void updateUrlLineEdit(const QString &newUrl) const; + void updateUrlLineEdit(const QUrl &newUrl); void updateUserAgentLabel(const QString &userAgentDatabaseName) const; + void updateWindowTitle(const QString &title); private: // The private variables. - QAction *backActionPointer; - BrowserView *browserViewPointer; KConfigDialog *configDialogPointer; - QPalette domainSettingsPalette; + QAction *cookiesActionPointer; + QUrl currentUrl; double currentZoomFactor; - QAction *forwardActionPointer; - QAction *homeActionPointer; - QPalette noDomainSettingsPalette; + bool customSearchEngineEnabled; + bool customUserAgentEnabled; + QAction *domStorageActionPointer; + QComboBox *downloadLocationComboBoxPointer; + QAction *findCaseSensitiveActionPointer; + QAction *findNextActionPointer; + QAction *findPreviousActionPointer; + QAction *findTextLabelActionPointer; + QLabel *findTextLabelPointer; + QAction *findTextLineEditActionPointer; + KLineEdit *findTextLineEditPointer; + KToggleFullScreenAction *fullScreenActionPointer; + QAction *hideFindTextActionPointer; + QAction *javaScriptActionPointer; + bool javaScriptEnabled; + QAction *localStorageActionPointer; + bool localStorageEnabled; + KToolBar *navigationToolBarPointer; + QPalette negativeBackgroundPalette; + QPalette normalBackgroundPalette; + QPalette positiveBackgroundPalette; + QProgressBar *progressBarPointer; QLabel *searchEngineLabelPointer; + QAction *searchEngineMenuActionPointer; QAction *searchEngineMojeekActionPointer; QAction *searchEngineMonoclesActionPointer; QAction *searchEngineMetagerActionPointer; @@ -75,9 +130,10 @@ private: QAction *searchEngineBingActionPointer; QAction *searchEngineYahooActionPointer; QAction *searchEngineCustomActionPointer; - QAction *refreshActionPointer; QLabel *userAgentLabelPointer; + QAction *userAgentMenuActionPointer; QAction *userAgentPrivacyBrowserActionPointer; + QAction *userAgentWebEngineDefaultActionPointer; QAction *userAgentFirefoxLinuxActionPointer; QAction *userAgentChromiumLinuxActionPointer; QAction *userAgentFirefoxWindowsActionPointer; @@ -86,6 +142,8 @@ private: QAction *userAgentSafariMacosActionPointer; QAction *userAgentCustomActionPointer; KLineEdit *urlLineEditPointer; + KToolBar *urlToolBarPointer; + QAction *viewSourceActionPointer; QAction *zoomFactorActionPointer; }; #endif