forked from status-im/status-legacy
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathappconfig.h
More file actions
31 lines (23 loc) · 721 Bytes
/
appconfig.h
File metadata and controls
31 lines (23 loc) · 721 Bytes
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
#ifndef APPCONFIG_H
#define APPCONFIG_H
#include <QString>
#include <QVariant>
#include <QSettings>
// This class is intended to store app configuration
// modifiable from JS side
// Currently, only logging-related settings are here
// that are used by react-native-desktop-config module
class AppConfig {
public:
static AppConfig& inst();
QVariant getValue(const QString& name) const;
void setValue(const QString& name, const QVariant& value);
const static QString LOGGING_ENABLED;
private:
AppConfig();
static AppConfig appConfig;
QSettings settings;
QString getLoggingFilterRules(bool enabled) const;
void processFx(const QString& name, const QVariant& value) const;
};
#endif // APPCONFIG_H