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:
Adam Honse
2026-04-15 11:51:28 -05:00
parent 201f2d7aba
commit 072d27d9dd
75 changed files with 3467 additions and 3068 deletions

View File

@@ -10,8 +10,9 @@
\*---------------------------------------------------------*/
#include <cstdint>
#include "KasaSmartController.h"
#include <nlohmann/json.hpp>
#include "JsonUtils.h"
#include "KasaSmartController.h"
#include "hsv.h"
using json = nlohmann::json;
@@ -64,11 +65,7 @@ bool KasaSmartController::Initialize()
}
json system_information;
try
{
system_information = json::parse(system_info_json);
}
catch (json::parse_error&)
if(!JsonUtils::JsonParse(system_info_json, system_information))
{
/*-----------------------*\
| Can't parse system info |