Initial loading of JSON-based settings

This commit is contained in:
Dan Paulat 2021-10-24 13:13:45 -05:00
parent 28ea12cbfe
commit 1c0140fc98
8 changed files with 561 additions and 38 deletions

View file

@ -0,0 +1,43 @@
#pragma once
#include <memory>
#include <string>
#include <boost/json.hpp>
namespace scwx
{
namespace qt
{
namespace settings
{
class GeneralSettingsImpl;
class GeneralSettings
{
public:
explicit GeneralSettings();
~GeneralSettings();
GeneralSettings(const GeneralSettings&) = delete;
GeneralSettings& operator=(const GeneralSettings&) = delete;
GeneralSettings(GeneralSettings&&) noexcept;
GeneralSettings& operator=(GeneralSettings&&) noexcept;
const std::string& default_radar_site();
boost::json::value ToJson();
static std::shared_ptr<GeneralSettings> Create();
static std::shared_ptr<GeneralSettings> Load(const boost::json::value* json,
bool& jsonDirty);
private:
std::unique_ptr<GeneralSettingsImpl> p;
};
} // namespace settings
} // namespace qt
} // namespace scwx