-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsettings.cpp
More file actions
38 lines (31 loc) · 1.43 KB
/
settings.cpp
File metadata and controls
38 lines (31 loc) · 1.43 KB
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
34
35
36
37
38
#include "settings.h"
IStylesheets * Settings::currentStyle = new IStylesheets();
//QList<QWidget *> Settings::transparences = QList<QWidget *>();
Settings::Settings() : anchor(0) {}
void Settings::fromJson(QJsonObject settings) {
GlobalSettings::fromJson(settings);
ApisSettings::fromJson(settings);
HotkeySettings::fromJson(settings);
ItemSettings::fromJson(settings);
SpectrumSettings::fromJson(settings);
TabSettings::fromJson(settings);
LibrarySettings::fromJson(settings);
}
QJsonObject Settings::toJson() {
QJsonObject settings = QJsonObject();
GlobalSettings::toJson(settings);
ApisSettings::toJson(settings);
HotkeySettings::toJson(settings);
ItemSettings::toJson(settings);
SpectrumSettings::toJson(settings);
TabSettings::toJson(settings);
LibrarySettings::toJson(settings);
return settings;
}
void Settings::resetGlobalSettings() { GlobalSettings::fromJson(QJsonObject()); }
void Settings::resetApisSettings() { ApisSettings::fromJson(QJsonObject()); }
void Settings::resetHotkeySettings() { HotkeySettings::fromJson(QJsonObject()); }
void Settings::resetItemSettings() { ItemSettings::fromJson(QJsonObject()); }
void Settings::resetSpectrumSettings() { SpectrumSettings::fromJson(QJsonObject()); }
void Settings::resetTabSettings() { TabSettings::fromJson(QJsonObject()); }
void Settings::resetLibrarySettings() { LibrarySettings::fromJson(QJsonObject()); }