blob: 532a5683572c53c08b3c5b4f35cd87c93b4fb53a (
plain)
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
|
/* ============================================================
* The rekonq project
* ============================================================
* SPDX-License-Identifier: GPL-3.0-only
* Copyright (C) 2022 aqua <aqua@iserlohn-fortress.net>
* ============================================================
* Description: Settings Widgets Definitions
* ============================================================ */
#pragma once
#include <QWidget>
#include <rsettings.hpp>
class SettingsWidget : public QWidget {
Q_OBJECT
public:
explicit SettingsWidget(RekonqSettings *settings, QWidget *parent = nullptr) : QWidget(parent)
{
m_settings = settings;
}
virtual ~SettingsWidget() = default;
signals:
void changed();
public slots:
void save();
virtual void reset() = 0;
protected:
RekonqSettings *m_settings;
};
class GeneralSettingsWidget final : public SettingsWidget {
Q_OBJECT
public:
explicit GeneralSettingsWidget(RekonqSettings *, QWidget *parent = nullptr);
~GeneralSettingsWidget() override = default;
void reset() override;
};
class AppearanceSettingsWidget final : public SettingsWidget {
Q_OBJECT
public:
explicit AppearanceSettingsWidget(RekonqSettings *, QWidget *parent = nullptr);
~AppearanceSettingsWidget() override = default;
void reset() override;
};
class NetworkSettingsWidget final : public SettingsWidget {
Q_OBJECT
public:
explicit NetworkSettingsWidget(RekonqSettings *, QWidget *parent = nullptr);
~NetworkSettingsWidget() override = default;
void reset() override;
};
class ShortcutsSettingsWidget final : public SettingsWidget {
Q_OBJECT
public:
explicit ShortcutsSettingsWidget(RekonqSettings *, QWidget *parent = nullptr);
~ShortcutsSettingsWidget() override = default;
void reset() override;
};
|