QuasarAppLib
settings.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2021-2025 QuasarApp.
3 * Distributed under the lgplv3 software license, see the accompanying
4 * Everyone is permitted to copy and distribute verbatim copies
5 * of this license document, but changing it is not allowed.
6*/
7
8
9#ifndef SETTINGS_H
10#define SETTINGS_H
11
12#include "quasarapp_global.h"
13#include "isettings.h"
14#include <QSet>
15
16namespace QuasarAppUtils {
17
42{
44public:
45 Settings();
46
47 // ISettings interface
54 const QSet<QString> &boolOptions() const;
55
62 void setBoolOptions(const QSet<QString> &newBoolOptions);
63
69 static bool initService();
70
71protected:
72
73 void syncImplementation() override;
74 QVariant getValueImplementation(const QString &key, const QVariant &def) override;
75 void setValueImplementation(const QString key, const QVariant &value) override;
76 bool ignoreToRest(const QString &) const override;
77 QHash<QString, QVariant> defaultSettings() override;
78
89 virtual bool isBool(const QString& key) const;
90 void setGroup(const QString&);
91
92private:
93 QSettings *_settings = nullptr;
94 QSet<QString> _boolOptions;
95};
96
97}
98
99#endif // SETTINGS_H
The Settings class base interface for implementation settings backends. Available implementations: Se...
Definition isettings.h:46
The Settings class This is wraper of the QSettings object.
Definition settings.h:42
void setGroup(const QString &)
The QuasaraAppUtils class This lib include base functions for the all applications of QuasarApp group...
Definition helpdata.cpp:18
void gen(int size, QByteArray &result)
#define QUASARAPPSHARED_EXPORT