Initial prototype of settings manager loads JSON settings file and E1.31 detector uses JSON data to detect devices

This commit is contained in:
Adam Honse 2020-11-04 19:44:10 -06:00
parent 5b15251d46
commit 5b68efd09f
6 changed files with 275 additions and 204 deletions

30
SettingsManager.h Normal file
View file

@ -0,0 +1,30 @@
/*-----------------------------------------*\
| SettingsManager.h |
| |
| OpenRGB Settings Manager maintains a list|
| of application settings in JSON format. |
| Other components may register settings |
| with this class and store/load values. |
| |
| Adam Honse (CalcProgrammer1) 11/4/2020 |
\*-----------------------------------------*/
#pragma once
#include "json.hpp"
using json = nlohmann::json;
class SettingsManager
{
public:
SettingsManager();
~SettingsManager();
json GetSettings(std::string settings_key);
void LoadSettings(std::string filename);
private:
json settings_data;
json settings_prototype;
};