X-Git-Url: https://gitweb.stoutner.com/?a=blobdiff_plain;f=src%2Fdialogs%2FDomainSettingsDialog.h;h=7680a0323252b109ed27f78369837c11e3182af4;hb=HEAD;hp=6acfcb57e9d0cb8720ff12b3d19bb4784b0f90a1;hpb=fe9f5cdee9e6e16eac1858f7f661516c24f71fa5;p=PrivacyBrowserPC.git diff --git a/src/dialogs/DomainSettingsDialog.h b/src/dialogs/DomainSettingsDialog.h index 6acfcb5..cef2060 100644 --- a/src/dialogs/DomainSettingsDialog.h +++ b/src/dialogs/DomainSettingsDialog.h @@ -1,7 +1,7 @@ /* - * Copyright © 2022 Soren Stoutner . + * Copyright 2022, 2024 Soren Stoutner . * - * This file is part of Privacy Browser PC . + * This file is part of 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 @@ -20,11 +20,15 @@ #ifndef DOMAINSETTINGSDIALOG_H #define DOMAINSETTINGSDIALOG_H +// Application headers. +#include "helpers/UserAgentHelper.h" + // KDE Frameworks headers. #include // Qt toolkit headers. #include +#include #include #include @@ -35,7 +39,12 @@ class DomainSettingsDialog : public QDialog public: // The primary constructor. - explicit DomainSettingsDialog(QWidget *parent = nullptr); + 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; + static const int ADD_DOMAIN; + static const int EDIT_DOMAIN; signals: void domainSettingsUpdated() const; @@ -44,32 +53,54 @@ private Q_SLOTS: // The private slots. void apply() const; void cancel(); - void domainNameChanged(QString updatedDomainName) const; - void domainSelected(QModelIndex modelIndex) const; - void javaScriptChanged(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 ok(); void reset() const; void showAddMessageBox(); void showDeleteMessageBox() const; - void userAgentChanged(const QString updatedUserAgent) const; + void userAgentChanged(const QString &updatedUserAgent) const; + void zoomFactorComboBoxChanged(const int &newIndex) const; private: // The private variables. QPushButton *applyButtonPointer; + QDoubleSpinBox *customZoomFactorSpinBoxPointer; + QPalette defaultPalette; QPushButton *deleteDomainButtonPointer; - QListView *domainsListViewPointer; + QWidget *domStorageWidgetPointer; + QComboBox *domStorageComboBoxPointer; + QLabel *domStorageLabelPointer; KLineEdit *domainNameLineEditPointer; QWidget *domainSettingsWidgetPointer; + QListView *domainsListViewPointer; QSqlTableModel *domainsTableModelPointer; + QItemSelectionModel *domainsSelectionModelPointer; + QPalette highlightedPalette; + QWidget *javaScriptWidgetPointer; QComboBox *javaScriptComboBoxPointer; QLabel *javaScriptLabelPointer; + QWidget *localStorageWidgetPointer; + QComboBox *localStorageComboBoxPointer; + QLabel *localStorageLabelPointer; QPushButton *resetButtonPointer; + QWidget *userAgentWidgetPointer; QComboBox *userAgentComboBoxPointer; + UserAgentHelper *userAgentHelperPointer; QLabel *userAgentLabelPointer; + QWidget *zoomFactorWidgetPointer; + QComboBox *zoomFactorComboBoxPointer; // The private functions. + void populateDomStorageLabel() const; void populateJavaScriptLabel() const; + void populateLocalStorageLabel() const; void populateUserAgentLabel(const QString &userAgentName) const; + void updateDomStorageStatus() const; void updateUi() const; }; #endif