]> gitweb.stoutner.com Git - PrivacyBrowserPC.git/blobdiff - src/dialogs/DomainSettingsDialog.h
Implement opening web pages in other browsers. https://redmine.stoutner.com/issues...
[PrivacyBrowserPC.git] / src / dialogs / DomainSettingsDialog.h
index 153701663f4f61f0e4a52fd9fb30d300d620efdd..b6a585752501c2bedc16eaafe86ea1b5da12bdbc 100644 (file)
@@ -1,7 +1,7 @@
 /*
- * Copyright 2022,2024 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>.
+ * This file is part of Privacy Browser PC <https://www.stoutner.com/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
@@ -17,8 +17,8 @@
  * along with Privacy Browser PC.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifndef DOMAINSETTINGSDIALOG_H
-#define DOMAINSETTINGSDIALOG_H
+#ifndef DOMAIN_SETTINGS_DIALOG_H
+#define DOMAIN_SETTINGS_DIALOG_H
 
 // Application headers.
 #include "helpers/UserAgentHelper.h"
@@ -39,7 +39,7 @@ class DomainSettingsDialog : public QDialog
 
 public:
     // The primary constructor.
-    explicit DomainSettingsDialog(const int &startType = SHOW_ALL_DOMAINS, const QString &domainName = QStringLiteral(""));
+    explicit DomainSettingsDialog(QWidget *parentWidgetPointer, const int &startType = SHOW_ALL_DOMAINS, const QString &domainName = QStringLiteral(""));
 
     // The public static int constants.
     static const int SHOW_ALL_DOMAINS;
@@ -53,20 +53,35 @@ private Q_SLOTS:
     // The private slots.
     void apply() const;
     void cancel();
-    void customZoomFactorChanged(const double &newValue) const;
-    void domStorageChanged(const int &newIndex) const;
+    void customZoomFactorChanged(const double newValue) const;
+    void domStorageChanged(const int newIndex) const;
     void domainNameChanged(const QString &updatedDomainName) const;
     void domainSelected(const QModelIndex &modelIndex) const;
-    void javaScriptChanged(const int &newIndex) const;
-    void localStorageChanged(const int &newIndex) const;
+    void easyListChanged(const int newIndex) const;
+    void easyPrivacyChanged(const int newIndex) const;
+    void fanboysAnnoyanceListChanged(const int newIndex) const;
+    void javaScriptChanged(const int newIndex) const;
+    void localStorageChanged(const int newIndex) const;
     void ok();
     void reset() const;
     void showAddMessageBox();
     void showDeleteMessageBox() const;
+    void ultraListChanged(const int newIndex) const;
+    void ultraPrivacyChanged(const int newIndex) const;
     void userAgentChanged(const QString &updatedUserAgent) const;
-    void zoomFactorComboBoxChanged(const int &newIndex) const;
+    void zoomFactorComboBoxChanged(const int newIndex) const;
 
 private:
+    // The private constants.
+    static const int JAVASCRIPT = 0;
+    static const int LOCAL_STORAGE = 1;
+    static const int DOM_STORAGE = 2;
+    static const int ULTRAPRIVACY = 3;
+    static const int ULTRALIST = 4;
+    static const int EASYPRIVACY = 5;
+    static const int EASYLIST = 6;
+    static const int FANBOYS_ANNOYANCE_LIST = 7;
+
     // The private variables.
     QPushButton *applyButtonPointer;
     QDoubleSpinBox *customZoomFactorSpinBoxPointer;
@@ -80,6 +95,15 @@ private:
     QListView *domainsListViewPointer;
     QSqlTableModel *domainsTableModelPointer;
     QItemSelectionModel *domainsSelectionModelPointer;
+    QWidget *easyListWidgetPointer;
+    QComboBox *easyListComboBoxPointer;
+    QLabel *easyListLabelPointer;
+    QWidget *easyPrivacyWidgetPointer;
+    QComboBox *easyPrivacyComboBoxPointer;
+    QLabel *easyPrivacyLabelPointer;
+    QWidget *fanboysAnnoyanceListWidgetPointer;
+    QComboBox *fanboysAnnoyanceListComboBoxPointer;
+    QLabel *fanboysAnnoyanceListLabelPointer;
     QPalette highlightedPalette;
     QWidget *javaScriptWidgetPointer;
     QComboBox *javaScriptComboBoxPointer;
@@ -88,6 +112,12 @@ private:
     QComboBox *localStorageComboBoxPointer;
     QLabel *localStorageLabelPointer;
     QPushButton *resetButtonPointer;
+    QWidget *ultraListWidgetPointer;
+    QComboBox *ultraListComboBoxPointer;
+    QLabel *ultraListLabelPointer;
+    QWidget *ultraPrivacyWidgetPointer;
+    QComboBox *ultraPrivacyComboBoxPointer;
+    QLabel *ultraPrivacyLabelPointer;
     QWidget *userAgentWidgetPointer;
     QComboBox *userAgentComboBoxPointer;
     UserAgentHelper *userAgentHelperPointer;
@@ -96,11 +126,9 @@ private:
     QComboBox *zoomFactorComboBoxPointer;
 
     // The private functions.
-    void populateDomStorageLabel() const;
-    void populateJavaScriptLabel() const;
-    void populateLocalStorageLabel() const;
+    void populateLabel(const int label) const;
     void populateUserAgentLabel(const QString &userAgentName) const;
+    void updateButtons() const;
     void updateDomStorageStatus() const;
-    void updateUi() const;
 };
 #endif