summaryrefslogtreecommitdiff
path: root/src/settings/settings.hpp
blob: 713ce38db6ab265ae3b5d2e7d193d220fa1a5ab4 (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
/* ============================================================
 *     The rekonq project
 * ============================================================
 * SPDX-License-Identifier: GPL-3.0-only
 * Copyright (C) 2022 aqua <aqua@iserlohn-fortress.net>
 * ============================================================
 * Description: Application Settings
 * ============================================================ */

#pragma once

#include <rsettings.hpp>

class QSettings;
class Settings final : public RekonqSettings {
  Q_OBJECT

public:
  explicit Settings(const QString &settingsPath, QObject *parent = nullptr);
  ~Settings() override = default;

  void beginGroup(const QString &prefix) override;
  void endGroup() override;

  void setValue(const QString &key, const QVariant &value) override;
  [[nodiscard]] QVariant value(const QString &key, const QVariant &defaultValue = QVariant()) const override;

  [[nodiscard]] QString filePath() const override;

private:
  Q_DISABLE_COPY_MOVE(Settings)
  QSettings *d;
};