blob: a21a4106fb8121ba4bd84cc2fd79f81516c22b6c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
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
|