aboutsummaryrefslogtreecommitdiff
path: root/src/settingswidget.h
diff options
context:
space:
mode:
authorLibravatar keshavbhatt <keshavnrj@gmail.com>2021-04-05 02:11:25 +0530
committerLibravatar keshavbhatt <keshavnrj@gmail.com>2021-04-05 02:11:25 +0530
commit9ea334d08f42f3c362e86499dc3c0ed658bb428c (patch)
tree85eb15c519bcff8a5e3c4f8406f068b7c412b789 /src/settingswidget.h
parente79b447b31ad9ab1ed42fd232f8789fad38d780b (diff)
downloadwhatsie-9ea334d08f42f3c362e86499dc3c0ed658bb428c.tar.gz
whatsie-9ea334d08f42f3c362e86499dc3c0ed658bb428c.zip
src init
Diffstat (limited to 'src/settingswidget.h')
-rw-r--r--src/settingswidget.h66
1 files changed, 66 insertions, 0 deletions
diff --git a/src/settingswidget.h b/src/settingswidget.h
new file mode 100644
index 0000000..a21a410
--- /dev/null
+++ b/src/settingswidget.h
@@ -0,0 +1,66 @@
+#ifndef SETTINGSWIDGET_H
+#define SETTINGSWIDGET_H
+
+#include <QWidget>
+#include <QSettings>
+#include "utils.h"
+
+
+
+namespace Ui {
+class SettingsWidget;
+}
+
+class SettingsWidget : public QWidget
+{
+ Q_OBJECT
+
+signals:
+ void updateWindowTheme();
+ void updatePageTheme();
+ void muteToggled(const bool checked);
+ void autoPlayMediaToggled(const bool checked);
+ void userAgentChanged(QString userAgentStr);
+
+public:
+ explicit SettingsWidget(QWidget *parent = nullptr,QString engineCachePath = "",
+ QString enginePersistentStoragePath = "");
+ ~SettingsWidget();
+
+public slots:
+ void refresh();
+ void updateDefaultUAButton(const QString engineUA);
+private slots:
+ QString cachePath();
+ QString persistentStoragePath();
+
+ void on_deleteCache_clicked();
+
+ void on_deletePersistentData_clicked();
+
+ void on_notificationCheckBox_toggled(bool checked);
+
+ void on_themeComboBox_currentTextChanged(const QString &arg1);
+
+ void applyThemeQuirks();
+ void on_muteAudioCheckBox_toggled(bool checked);
+
+ void on_defaultUserAgentButton_clicked();
+
+ void on_userAgentLineEdit_textChanged(const QString &arg1);
+
+ void on_setUserAgent_clicked();
+
+ void on_autoPlayMediaCheckBox_toggled(bool checked);
+
+ void on_disableVideosCheckBox_toggled(bool checked);
+
+ void on_closeButtonActionComboBox_currentIndexChanged(int index);
+
+private:
+ Ui::SettingsWidget *ui;
+ QString engineCachePath,enginePersistentStoragePath;
+ QSettings settings;
+};
+
+#endif // SETTINGSWIDGET_H