mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 17:10:05 +00:00
Initial loading of JSON-based settings
This commit is contained in:
parent
28ea12cbfe
commit
1c0140fc98
8 changed files with 561 additions and 38 deletions
43
scwx-qt/source/scwx/qt/settings/general_settings.hpp
Normal file
43
scwx-qt/source/scwx/qt/settings/general_settings.hpp
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue