mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-09-08 11:20:43 -04:00
Settings Rework
* Add JSON string configuration field to RGBController to store device-specific configurations
* This JSON string holds both configuration and schema
* Add settings schema tracking to SettingsManager
* Implement dynamic settings widget that generates a settings UI based on a JSON schema
* Implement SettingsManager callback for notifying of settings changes and settings schema updates
* Always enable Entire Device zone option and use it to enable Edit Device
* Rename SaveSizes to SaveConfiguration in ProfileManager and Sizes.json to Configuration.json
* Add zone flag for indicating that a zone's geometry may change, informing profile manager to ignore this check
* Remove Theme setting and Theme Manager, as this didn't work on most setups anyways and Qt6 has proper Windows dark theming
This commit is contained in:
1 parent
201f2d7aba
commit
072d27d9dd
75 files changed
+3467
-3068
No files matched your search
+22
@@ -0,0 +1,22 @@
|
||||
/*---------------------------------------------------------*\
|
||||
| JsonUtils.h |
|
||||
| |
|
||||
| JSON utility functions |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include "nlohmann/json.hpp"
|
||||
|
||||
class JsonUtils
|
||||
{
|
||||
public:
|
||||
static bool JsonGetBool(nlohmann::json& val, std::string key, bool dft = false);
|
||||
static int JsonGetInt(nlohmann::json& val, std::string key, int dft = 0);
|
||||
static std::string JsonGetString(nlohmann::json& val, std::string key, std::string dft = "", bool allow_empty = true);
|
||||
static bool JsonParse(std::string json_string, nlohmann::json& json_ref);
|
||||
};
|
||||
Reference in new issue
Block a user