supercell-wx/scwx-qt/source/scwx/qt/settings/general_settings.hpp
2021-11-06 22:18:02 -05:00

46 lines
991 B
C++

#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() const;
boost::json::value ToJson() const;
static std::shared_ptr<GeneralSettings> Create();
static std::shared_ptr<GeneralSettings> Load(const boost::json::value* json,
bool& jsonDirty);
friend bool operator==(const GeneralSettings& lhs,
const GeneralSettings& rhs);
private:
std::unique_ptr<GeneralSettingsImpl> p;
};
} // namespace settings
} // namespace qt
} // namespace scwx