]> gitweb.stoutner.com Git - PrivacyBrowserPC.git/blobdiff - src/windows/BrowserWindow.h
Move the Settings Dialog to its own class. https://redmine.stoutner.com/issues/1151
[PrivacyBrowserPC.git] / src / windows / BrowserWindow.h
index 6910f8ae474c968fbbab68a173508fea62690909..74e31b88dc6947359f7c695fb7fa16ff9f918329 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2022-2023 Soren Stoutner <soren@stoutner.com>.
+ * Copyright 2022-2024 Soren Stoutner <soren@stoutner.com>.
  *
  * This file is part of Privacy Browser PC <https://www.stoutner.com/privacy-browser-pc>.
  *
@@ -55,11 +55,11 @@ public Q_SLOTS:
 
 private Q_SLOTS:
     // The private slots.
-    void addOrEditDomainSettings() const;
+    void addOrEditDomainSettings();
     void back() const;
     void clearUrlLineEditFocus() const;
     void decrementZoom();
-    void editBookmarks() const;
+    void editBookmarks();
     void escape() const;
     void findNext() const;
     void findPrevious() const;
@@ -67,6 +67,7 @@ private Q_SLOTS:
     void fullScreenRequested(const bool toggleOn);
     void getZoomFactorFromUser();
     void hideFindTextActions() const;
+    void hideProgressBar() const;
     void home() const;
     void incrementZoom();
     void loadUrlFromLineEdit(const QString &url) const;
@@ -76,12 +77,12 @@ private Q_SLOTS:
     void reloadAndBypassCache() const;
     void showBookmarkContextMenu(const QPoint &point);
     void showCookiesDialog();
-    void showDownloadLocationBrowseDialog() const;
-    void showDomainSettingsDialog() const;
+    void showDomainSettingsDialog();
     void showFindTextActions() const;
     void showProgressBar(const int &progress) const;
     void showSettingsDialog();
     void toggleBookmark();
+    void toggleDeveloperTools() const;
     void toggleDomStorage() const;
     void toggleFindCaseSensitive() const;
     void toggleJavaScript() const;
@@ -91,7 +92,7 @@ private Q_SLOTS:
     void toggleViewSource() const;
     void toggleViewSourceInNewTab() const;
     void updateCookiesAction(const int numberOfCookies) const;
-    void updateDefaultZoomFactor(const double newDefaultZoomFactor);
+    void updateDefaultZoomFactor(const double newDefaultZoomFactorDouble);
     void updateDomStorageAction(const bool &isEnabled) const;
     void updateDomainSettingsIndicator(const bool status);
     void updateFindText(const QString &text, const bool findCaseSensitive) const;
@@ -100,10 +101,8 @@ private Q_SLOTS:
     void updateLocalStorageAction(const bool &isEnabled);
     void updateSearchEngineActions(const QString &searchEngine, const bool &updateCustomSearchEngineStatus);
     void updateUserAgentActions(const QString &userAgent, const bool &updateCustomUserAgentStatus);
-    void updateZoomActions(const double &zoomFactor);
-    void updateSearchEngineLabel(const QString &searchEngineString) const;
+    void updateZoomActions(const double zoomFactorDouble);
     void updateUrlLineEdit(const QUrl &newUrl);
-    void updateUserAgentLabel(const QString &userAgentDatabaseName) const;
     void updateViewBookmarksToolBarCheckbox(const bool visible);
     void updateWindowTitle(const QString &title);
     void zoomDefault();
@@ -121,16 +120,15 @@ private:
     QList<QPair<QMenu *, QAction *> *> bookmarksToolBarSubfolderActionList;
     bool bookmarksToolBarIsVisible = false;
     bool bookmarksToolBarUninitialized = true;
-    KConfigDialog *configDialogPointer;
     QAction *cookiesActionPointer;
     QUrl currentUrl;
     QPushButton *currentZoomButtonPointer;
-    double currentZoomFactor;
+    double currentZoomFactorDouble;
     bool customSearchEngineEnabled;
     bool customUserAgentEnabled;
-    double defaultZoomFactor;
+    double defaultZoomFactorDouble;
+    QAction *developerToolsActionPointer;
     QAction *domStorageActionPointer;
-    QComboBox *downloadLocationComboBoxPointer;
     QList<QPair<QMenu *, QAction *> *> finalBookmarkFolderMenuActionList;
     QAction *findCaseSensitiveActionPointer;
     QAction *findNextActionPointer;
@@ -150,7 +148,7 @@ private:
     QPalette normalBackgroundPalette;
     QPalette positiveBackgroundPalette;
     QProgressBar *progressBarPointer;
-    QLabel *searchEngineLabelPointer;
+    QAction *refreshActionPointer;
     QAction *searchEngineMenuActionPointer;
     QAction *searchEngineMojeekActionPointer;
     QAction *searchEngineMonoclesActionPointer;
@@ -159,7 +157,7 @@ private:
     QAction *searchEngineBingActionPointer;
     QAction *searchEngineYahooActionPointer;
     QAction *searchEngineCustomActionPointer;
-    QLabel *userAgentLabelPointer;
+    QAction *stopActionPointer;
     QAction *userAgentMenuActionPointer;
     QAction *userAgentPrivacyBrowserActionPointer;
     QAction *userAgentWebEngineDefaultActionPointer;
@@ -184,6 +182,7 @@ private:
 
     // The private functions.
     void addFinalBookmarkFolderMenuActions(QMenu *menuPointer, double folderId);
+    int calculateSettingsInt(const bool settingCurrentlyEnabled, const bool settingEnabledByDefault) const;
     void populateBookmarksMenuSubfolders(const double folderId, QMenu *menuPointer);
     void populateBookmarksToolBar();
     void populateBookmarksToolBarSubfolders(const double folderId, QMenu *menuPointer);