summaryrefslogtreecommitdiff
path: root/src/settings/settingswidgets.hpp
blob: cb08b5912a755422554cafc06482a1a44c020606 (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
/* ============================================================
 *     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();
  void reset();

protected:
  RekonqSettings *m_settings;
};

class GeneralSettingsWidget final : public SettingsWidget {
  Q_OBJECT
public:
  explicit GeneralSettingsWidget(RekonqSettings *, QWidget *parent = nullptr);
  ~GeneralSettingsWidget() override = default;
};

class AppearanceSettingsWidget final : public SettingsWidget {
  Q_OBJECT
public:
  explicit AppearanceSettingsWidget(RekonqSettings *, QWidget *parent = nullptr);
  ~AppearanceSettingsWidget() override = default;
};

class NetworkSettingsWidget final : public SettingsWidget {
  Q_OBJECT
public:
  explicit NetworkSettingsWidget(RekonqSettings *, QWidget *parent = nullptr);
  ~NetworkSettingsWidget() override = default;
};

class ShortcutsSettingsWidget final : public SettingsWidget {
  Q_OBJECT
public:
  explicit ShortcutsSettingsWidget(RekonqSettings *, QWidget *parent = nullptr);
  ~ShortcutsSettingsWidget() override = default;
};