Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
qsettings_backend.h
1// SPDX-FileCopyrightText: © 2025 Alexandros Theodotou <alex@zrythm.org>
2// SPDX-License-Identifier: LicenseRef-ZrythmLicense
3
4#pragma once
5
6#include "utils/isettings_backend.h"
7
8#include <QSettings>
9
10namespace zrythm::utils
11{
16{
17public:
18 QVariant
19 value (QAnyStringView key, const QVariant &defaultValue = {}) const override
20 {
21 return settings_.value (key, defaultValue);
22 }
23 void setValue (QAnyStringView key, const QVariant &value) override
24 {
25 settings_.setValue (key, value);
26 settings_.sync ();
27 }
28
29 void reset_and_sync ()
30 {
31 settings_.clear ();
32 settings_.sync ();
33 }
34
35private:
36 QSettings settings_;
37};
38}
Interface for an app settings provider.
Interface for an app settings provider.
String utilities.
Definition algorithms.h:12