summaryrefslogtreecommitdiff
path: root/src/settings/settings.hpp
blob: ec654f17d98b3b0eb21ba4e62496e9d146fec701 (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
/* ============================================================
 *     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:
  QSettings *d;
};