/*
- * Copyright © 2022 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
#ifndef DOMAINSETTINGSDIALOG_H
#define DOMAINSETTINGSDIALOG_H
+// Application headers.
+#include "helpers/UserAgentHelper.h"
+
// KDE Frameworks headers.
#include <KLineEdit>
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;
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();
// The private variables.
QPushButton *applyButtonPointer;
QDoubleSpinBox *customZoomFactorSpinBoxPointer;
+ QPalette defaultPalette;
QPushButton *deleteDomainButtonPointer;
+ QWidget *domStorageWidgetPointer;
QComboBox *domStorageComboBoxPointer;
QLabel *domStorageLabelPointer;
- QListView *domainsListViewPointer;
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 addDomain(const QString &domainName) const;
- void populateJavaScriptLabel() const;
void populateDomStorageLabel() const;
+ void populateJavaScriptLabel() const;
+ void populateLocalStorageLabel() const;
void populateUserAgentLabel(const QString &userAgentName) const;
+ void updateDomStorageStatus() const;
void updateUi() const;
};
#endif